|
@@ -14,18 +14,26 @@
|
|
|
</a-page-header>
|
|
|
<!-- 内容 -->
|
|
|
<a-page-header title="单号:CG2021010100001" ></a-page-header>
|
|
|
-
|
|
|
+
|
|
|
<!-- 基础信息 -->
|
|
|
<a-card size="small" :bordered="false" class="bulkWarehousingOrderEdit-cont">
|
|
|
<a-collapse :activeKey="['1']">
|
|
|
<a-collapse-panel key="1">
|
|
|
<template slot="header">
|
|
|
基础信息
|
|
|
- <a-button type="primary" shape="circle" size="small" icon="edit" class="edit-circle-btn" id="bulkWarehousingOrderEdit-edit-circle-btn" @click.stop="handleEditInfo" />
|
|
|
+ <!-- <a-button
|
|
|
+ type="primary"
|
|
|
+ shape="circle"
|
|
|
+ size="small"
|
|
|
+ icon="edit"
|
|
|
+ class="edit-circle-btn"
|
|
|
+ id="bulkWarehousingOrderEdit-edit-circle-btn"
|
|
|
+ @click.stop="handleEditInfo" /> -->
|
|
|
</template>
|
|
|
<a-descriptions :column="3">
|
|
|
- <a-descriptions-item label="供应商">箭冠营销中心</a-descriptions-item>
|
|
|
- <a-descriptions-item label="类型">箭冠营销中心</a-descriptions-item>
|
|
|
+ <a-descriptions-item label="供应商">{{ (basicInfoData&&basicInfoData.supplierName) || '--' }}</a-descriptions-item>
|
|
|
+ <a-descriptions-item label="类型">{{ (basicInfoData&&basicInfoData.sparePartsTypeName) || '--' }}</a-descriptions-item>
|
|
|
+ <a-descriptions-item label="备注">{{ (basicInfoData&&basicInfoData.remarks) || '--' }}</a-descriptions-item>
|
|
|
</a-descriptions>
|
|
|
</a-collapse-panel>
|
|
|
</a-collapse>
|
|
@@ -50,7 +58,14 @@
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="产品品牌">
|
|
|
- <a-select placeholder="请选择" id="bulkWarehousingOrderEdit-state" allowClear v-model="queryParam.dataSourceNo" :showSearch="true" option-filter-prop="children" :filter-option="filterOption">
|
|
|
+ <a-select
|
|
|
+ placeholder="请选择"
|
|
|
+ id="bulkWarehousingOrderEdit-state"
|
|
|
+ allowClear
|
|
|
+ v-model="queryParam.dataSourceNo"
|
|
|
+ :showSearch="true"
|
|
|
+ option-filter-prop="children"
|
|
|
+ :filter-option="filterOption">
|
|
|
<a-select-option v-for="item in brandData" :key="item.salesChannelNo" :value="item.salesChannelNo">{{ item.salesChannelName }}</a-select-option>
|
|
|
</a-select>
|
|
|
</a-form-item>
|
|
@@ -71,46 +86,50 @@
|
|
|
<s-table
|
|
|
class="sTable"
|
|
|
ref="table"
|
|
|
- size="default"
|
|
|
+ size="small"
|
|
|
:rowKey="(record) => record.id"
|
|
|
:columns="columns"
|
|
|
+ :customRow="handleClickRow"
|
|
|
:data="loadData"
|
|
|
+ :scroll="{ x: 1700, y: 300 }"
|
|
|
bordered>
|
|
|
<!-- 成本价 -->
|
|
|
<template slot="costPrice" slot-scope="text, record">
|
|
|
<a-input-number
|
|
|
id="bulkWarehousingOrderEdit-costPrice"
|
|
|
- :value="record.costPrice"
|
|
|
+ v-model="record.costPrice"
|
|
|
:precision="2"
|
|
|
:min="0"
|
|
|
:max="999999"
|
|
|
- placeholder="请输入" />
|
|
|
+ placeholder="请输入"
|
|
|
+ style="width: 100%;" />
|
|
|
</template>
|
|
|
<!-- 数量 -->
|
|
|
<template slot="quantity" slot-scope="text, record">
|
|
|
<a-input-number
|
|
|
id="bulkWarehousingOrderEdit-quantity"
|
|
|
- :value="record.quantity"
|
|
|
+ v-model="record.quantity"
|
|
|
:precision="0"
|
|
|
:min="0"
|
|
|
:max="999999"
|
|
|
- placeholder="请输入" />
|
|
|
+ placeholder="请输入"
|
|
|
+ style="width: 100%;" />
|
|
|
</template>
|
|
|
<!-- 仓库 -->
|
|
|
<template slot="warehouse" slot-scope="text, record">
|
|
|
- <a-select id="bulkWarehousingOrderEdit-warehouse" placeholder="请选择" allowClear v-model="record.warehouse">
|
|
|
- <a-select-option v-for="item in customeList" :key="item.salesChannelNo" :value="item.salesChannelNo">{{ item.salesChannelName }}</a-select-option>
|
|
|
+ <a-select id="bulkWarehousingOrderEdit-warehouse" placeholder="请选择" allowClear v-model="record.warehouse" style="width: 100%;">
|
|
|
+ <a-select-option v-for="item in warehouseList" :key="item.warehouseSn" :value="item.warehouseSn">{{ item.name }}</a-select-option>
|
|
|
</a-select>
|
|
|
</template>
|
|
|
<!-- 仓位 -->
|
|
|
<template slot="position" slot-scope="text, record">
|
|
|
- <a-select id="bulkWarehousingOrderEdit-position" placeholder="请选择" allowClear v-model="record.position">
|
|
|
- <a-select-option v-for="item in customeList" :key="item.salesChannelNo" :value="item.salesChannelNo">{{ item.salesChannelName }}</a-select-option>
|
|
|
+ <a-select id="bulkWarehousingOrderEdit-position" placeholder="请选择" allowClear v-model="record.position" style="width: 100%;">
|
|
|
+ <a-select-option v-for="item in warehouseList" :key="item.salesChannelNo" :value="item.salesChannelNo">{{ item.name }}</a-select-option>
|
|
|
</a-select>
|
|
|
</template>
|
|
|
<!-- 操作 -->
|
|
|
<template slot="action" slot-scope="text, record">
|
|
|
- <a-button size="small" type="primary" @click="handleAdd(record)" id="bulkWarehousingOrderEdit-add-btn">添加</a-button>
|
|
|
+ <a-button size="small" type="primary" class="button-primary" @click="handleAdd(record)" id="bulkWarehousingOrderEdit-add-btn">添加</a-button>
|
|
|
</template>
|
|
|
</s-table>
|
|
|
</div>
|
|
@@ -129,13 +148,13 @@
|
|
|
<div>
|
|
|
<!-- 总计 -->
|
|
|
<a-alert type="info" showIcon style="margin-bottom:15px">
|
|
|
- <div slot="message">总款数 <strong>6</strong> ,总数量 <strong>6</strong> ,总成本¥<strong>6.33</strong></div>
|
|
|
+ <div slot="message">总款数 <strong>{{ (productTotal&&productTotal.productTotalCategory) || 0 }}</strong> ,总数量 <strong>{{ (productTotal&&productTotal.productTotalQty) || 0 }}</strong> ,总成本¥<strong>{{ (productTotal&&productTotal.productTotalCost) || 0 }}</strong></div>
|
|
|
</a-alert>
|
|
|
<!-- 列表 -->
|
|
|
<s-table
|
|
|
class="sTable"
|
|
|
ref="table"
|
|
|
- size="default"
|
|
|
+ size="small"
|
|
|
:rowKey="(record) => record.id"
|
|
|
:columns="chooseColumns"
|
|
|
:data="chooseLoadData"
|
|
@@ -144,7 +163,7 @@
|
|
|
<template slot="costPrice" slot-scope="text, record">
|
|
|
<a-input-number
|
|
|
id="bulkWarehousingOrderEdit-costPrice"
|
|
|
- :value="record.costPrice"
|
|
|
+ v-model="record.costPrice"
|
|
|
:precision="2"
|
|
|
:min="0"
|
|
|
:max="999999"
|
|
@@ -154,7 +173,7 @@
|
|
|
<template slot="quantity" slot-scope="text, record">
|
|
|
<a-input-number
|
|
|
id="bulkWarehousingOrderEdit-quantity"
|
|
|
- :value="record.quantity"
|
|
|
+ v-model="record.quantity"
|
|
|
:precision="0"
|
|
|
:min="0"
|
|
|
:max="999999"
|
|
@@ -163,13 +182,13 @@
|
|
|
<!-- 仓库 -->
|
|
|
<template slot="warehouse" slot-scope="text, record">
|
|
|
<a-select id="bulkWarehousingOrderEdit-warehouse" placeholder="请选择" allowClear v-model="record.warehouse">
|
|
|
- <a-select-option v-for="item in customeList" :key="item.salesChannelNo" :value="item.salesChannelNo">{{ item.salesChannelName }}</a-select-option>
|
|
|
+ <a-select-option v-for="item in warehouseList" :key="item.salesChannelNo" :value="item.salesChannelNo">{{ item.salesChannelName }}</a-select-option>
|
|
|
</a-select>
|
|
|
</template>
|
|
|
<!-- 仓位 -->
|
|
|
<template slot="position" slot-scope="text, record">
|
|
|
<a-select id="bulkWarehousingOrderEdit-position" placeholder="请选择" allowClear v-model="record.position">
|
|
|
- <a-select-option v-for="item in customeList" :key="item.salesChannelNo" :value="item.salesChannelNo">{{ item.salesChannelName }}</a-select-option>
|
|
|
+ <a-select-option v-for="item in customeList" :key="item.salesChannelNo" :value="item.salesChannelNo">{{ item.salesChannelName }}</a-select-option>
|
|
|
</a-select>
|
|
|
</template>
|
|
|
<!-- 操作 -->
|
|
@@ -187,152 +206,171 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import { STable, VSelect } from '@/components'
|
|
|
- import basicInfoModal from './basicInfoModal.vue'
|
|
|
- export default{
|
|
|
- components: { STable, VSelect, basicInfoModal },
|
|
|
- data(){
|
|
|
- return{
|
|
|
- queryParam: {
|
|
|
-
|
|
|
- },
|
|
|
- brandData: [], // 产品品牌 下拉数据
|
|
|
- typeData: [], // 产品类别 下拉数据
|
|
|
- disabled: false, // 查询、重置按钮是否可操作
|
|
|
- // 表头
|
|
|
- columns: [
|
|
|
- { title: '产品编码', dataIndex: 'creatDate', align: 'center', sorter: true, customRender: function (text) { return text || '--' } },
|
|
|
- { title: '产品名称', dataIndex: 'custName', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '原厂编码', dataIndex: 'totalP', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '产品品牌', dataIndex: 'custsName', align: 'center', sorter: true, customRender: function (text) { return text || '--' } },
|
|
|
- { title: '单位', dataIndex: 'custsNdame', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '成本价', scopedSlots: { customRender: 'costPrice' }, align: 'center' },
|
|
|
- { title: '数量', scopedSlots: { customRender: 'quantity' }, align: 'center' },
|
|
|
- { title: '仓库', scopedSlots: { customRender: 'warehouse' }, align: 'center' },
|
|
|
- { title: '仓位', scopedSlots: { customRender: 'position' }, align: 'center' },
|
|
|
- { title: '操作', scopedSlots: { customRender: 'action' }, width: 150, align: 'center' }
|
|
|
- ],
|
|
|
- // 加载数据方法 必须为 Promise 对象
|
|
|
- loadData: parameter => {
|
|
|
- this.disabled = true
|
|
|
- // return customerBundleDelayList( Object.assign(parameter, this.queryParam) ).then(res => {
|
|
|
- // const data = res.data
|
|
|
- // const no = (data.pageNo - 1) * data.pageSize
|
|
|
- // for (var i = 0; i < data.list.length; i++) {
|
|
|
- // data.list[i].no = no + i + 1
|
|
|
- // }
|
|
|
- // this.disabled = false
|
|
|
- // return data
|
|
|
- // })
|
|
|
- const _this = this
|
|
|
- return new Promise(function(resolve, reject){
|
|
|
- const data = {
|
|
|
- pageNo: 1,
|
|
|
- pageSize: 10,
|
|
|
- list: [
|
|
|
- { id: '1', purchaseNo: 'jgqp11111111111', creatDate: '产品1', custName: 'jgqp111123545', totalP: '箭冠品牌', totalNums: '产品分类1', totalPrice: '5', payType: '122' }
|
|
|
- ],
|
|
|
- count: 10
|
|
|
- }
|
|
|
- const no = (data.pageNo - 1) * data.pageSize
|
|
|
- for (var i = 0; i < data.list.length; i++) {
|
|
|
- data.list[i].no = no + i + 1
|
|
|
- }
|
|
|
- _this.disabled = false
|
|
|
- resolve(data)
|
|
|
- })
|
|
|
- },
|
|
|
- // 表头
|
|
|
- chooseColumns: [
|
|
|
- { title: '产品编码', dataIndex: 'creatDate', align: 'center', sorter: true },
|
|
|
- { title: '产品名称', dataIndex: 'custName', align: 'center' },
|
|
|
- { title: '原厂编码', dataIndex: 'totalP', align: 'center' },
|
|
|
- { title: '产品品牌', dataIndex: 'custsName', align: 'center', sorter: true },
|
|
|
- { title: '单位', dataIndex: 'custsNdame', align: 'center' },
|
|
|
- { title: '成本价', scopedSlots: { customRender: 'costPrice' }, align: 'center' },
|
|
|
- { title: '数量', scopedSlots: { customRender: 'quantity' }, align: 'center' },
|
|
|
- { title: '成本小计', dataIndex: 'custsNdsame', align: 'center' },
|
|
|
- { title: '仓库', scopedSlots: { customRender: 'warehouse' }, align: 'center' },
|
|
|
- { title: '仓位', scopedSlots: { customRender: 'position' }, align: 'center' },
|
|
|
- { title: '操作', scopedSlots: { customRender: 'action' }, width: 150, align: 'center' }
|
|
|
- ],
|
|
|
- // 加载数据方法 必须为 Promise 对象
|
|
|
- chooseLoadData: parameter => {
|
|
|
- this.disabled = true
|
|
|
- // return customerBundleDelayList( Object.assign(parameter, this.queryParam) ).then(res => {
|
|
|
- // const data = res.data
|
|
|
- // const no = (data.pageNo - 1) * data.pageSize
|
|
|
- // for (var i = 0; i < data.list.length; i++) {
|
|
|
- // data.list[i].no = no + i + 1
|
|
|
- // }
|
|
|
- // this.disabled = false
|
|
|
- // return data
|
|
|
- // })
|
|
|
- const _this = this
|
|
|
- return new Promise(function(resolve, reject){
|
|
|
- const data = {
|
|
|
- pageNo: 1,
|
|
|
- pageSize: 10,
|
|
|
- list: [
|
|
|
- { id: '1', purchaseNo: 'jgqp11111111111', custssName: 0, creatDate: '产品1', custName: 'jgqp111123545', totalP: '箭冠品牌', totalNums: '产品分类1', totalPrice: '5', payType: '122' }
|
|
|
- ],
|
|
|
- count: 10
|
|
|
- }
|
|
|
- const no = (data.pageNo - 1) * data.pageSize
|
|
|
- for (var i = 0; i < data.list.length; i++) {
|
|
|
- data.list[i].no = no + i + 1
|
|
|
- }
|
|
|
- _this.disabled = false
|
|
|
- resolve(data)
|
|
|
- })
|
|
|
- },
|
|
|
- openModal: false, // 选择基本信息弹框是否显示
|
|
|
- customeList: [], // 仓库 下拉数据
|
|
|
- }
|
|
|
- },
|
|
|
- methods: {
|
|
|
- // 重置
|
|
|
- resetSearchForm () {
|
|
|
- this.queryParam.orderBundleNo = ''
|
|
|
- this.queryParam.orderBundle.custMobile = ''
|
|
|
- this.queryParam.bundleName = ''
|
|
|
- this.queryParam.itemName = ''
|
|
|
- this.oldTime = undefined
|
|
|
- this.newTime = undefined
|
|
|
- this.$refs.table.refresh(true)
|
|
|
- },
|
|
|
- // 添加
|
|
|
- handleAdd(row){},
|
|
|
- // 删除
|
|
|
- handleDel(row){},
|
|
|
- // 编辑基本信息
|
|
|
- handleEditInfo(){
|
|
|
- this.openModal = true
|
|
|
- },
|
|
|
- // 基本信息 保存
|
|
|
- handleOk(){
|
|
|
-
|
|
|
- },
|
|
|
- // 导入明细
|
|
|
- handleImport(){
|
|
|
- console.log(333)
|
|
|
+import { STable, VSelect } from '@/components'
|
|
|
+import basicInfoModal from './basicInfoModal.vue'
|
|
|
+import { sparePartsPurDetail, sparePartsPurDetailList, sparePartsPurDetailCount } from '@/api/sparePartsPur'
|
|
|
+import { dealerProductList } from '@/api/dealerProduct'
|
|
|
+import { warehouseAllList } from '@/api/warehouse'
|
|
|
+export default {
|
|
|
+ components: { STable, VSelect, basicInfoModal },
|
|
|
+ data () {
|
|
|
+ return {
|
|
|
+ queryParam: {
|
|
|
+ productBrandSn: undefined
|
|
|
+ // productBrandSn: undefined,
|
|
|
},
|
|
|
- // 返回列表
|
|
|
- handleBack(){
|
|
|
- this.$router.push({ path: '/bulkManagement/bulkWarehousingOrder/list'})
|
|
|
+ brandData: [], // 产品品牌 下拉数据
|
|
|
+ typeData: [], // 产品类别 下拉数据
|
|
|
+ disabled: false, // 查询、重置按钮是否可操作
|
|
|
+ // 表头
|
|
|
+ columns: [
|
|
|
+ { title: '产品编码', dataIndex: 'code', width: 200, align: 'center', sorter: true, customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '产品名称', dataIndex: 'name', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '原厂编码', dataIndex: 'origCode', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '产品品牌', dataIndex: 'productBrandName', width: 200, align: 'center', sorter: true, customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '单位', dataIndex: 'unit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '成本价', scopedSlots: { customRender: 'costPrice' }, width: 150, align: 'center' },
|
|
|
+ { title: '数量', scopedSlots: { customRender: 'quantity' }, width: 150, align: 'center' },
|
|
|
+ { title: '仓库', scopedSlots: { customRender: 'warehouse' }, width: 200, align: 'center' },
|
|
|
+ { title: '仓位', scopedSlots: { customRender: 'position' }, width: 200, align: 'center' },
|
|
|
+ { title: '操作', scopedSlots: { customRender: 'action' }, width: 100, align: 'center', fixed: 'right' }
|
|
|
+ ],
|
|
|
+ // 加载数据方法 必须为 Promise 对象
|
|
|
+ loadData: parameter => {
|
|
|
+ this.disabled = true
|
|
|
+ return dealerProductList(Object.assign(parameter, this.queryParam)).then(res => {
|
|
|
+ const data = res.data
|
|
|
+ const no = (data.pageNo - 1) * data.pageSize
|
|
|
+ for (var i = 0; i < data.list.length; i++) {
|
|
|
+ data.list[i].no = no + i + 1
|
|
|
+ }
|
|
|
+ this.disabled = false
|
|
|
+ this.getWarehouseList()
|
|
|
+ console.log('--------数据', data)
|
|
|
+ return data
|
|
|
+ })
|
|
|
},
|
|
|
- filterOption(input, option) {
|
|
|
- return (
|
|
|
- option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
- )
|
|
|
+ // 表头
|
|
|
+ chooseColumns: [
|
|
|
+ { title: '产品编码', dataIndex: 'creatDate', align: 'center', sorter: true },
|
|
|
+ { title: '产品名称', dataIndex: 'custName', align: 'center' },
|
|
|
+ { title: '原厂编码', dataIndex: 'totalP', align: 'center' },
|
|
|
+ { title: '产品品牌', dataIndex: 'custsName', align: 'center', sorter: true },
|
|
|
+ { title: '单位', dataIndex: 'custsNdame', align: 'center' },
|
|
|
+ { title: '成本价', scopedSlots: { customRender: 'costPrice' }, align: 'center' },
|
|
|
+ { title: '数量', scopedSlots: { customRender: 'quantity' }, align: 'center' },
|
|
|
+ { title: '成本小计', dataIndex: 'custsNdsame', align: 'center' },
|
|
|
+ { title: '仓库', scopedSlots: { customRender: 'warehouse' }, align: 'center' },
|
|
|
+ { title: '仓位', scopedSlots: { customRender: 'position' }, align: 'center' },
|
|
|
+ { title: '操作', scopedSlots: { customRender: 'action' }, width: 150, align: 'center' }
|
|
|
+ ],
|
|
|
+ // 加载数据方法 必须为 Promise 对象
|
|
|
+ chooseLoadData: parameter => {
|
|
|
+ this.disabled = true
|
|
|
+ return sparePartsPurDetailList(Object.assign(parameter, { sparePartsPurchaseSn: this.$route.params.sn })).then(res => {
|
|
|
+ const data = res.data
|
|
|
+ const no = (data.pageNo - 1) * data.pageSize
|
|
|
+ for (var i = 0; i < data.list.length; i++) {
|
|
|
+ data.list[i].no = no + i + 1
|
|
|
+ }
|
|
|
+ this.disabled = false
|
|
|
+ return data
|
|
|
+ })
|
|
|
},
|
|
|
+ openModal: false, // 选择基本信息弹框是否显示
|
|
|
+ warehouseList: [], // 仓库 下拉数据
|
|
|
+ basicInfoData: null, // 基本信息
|
|
|
+ productTotal: null // 合计
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ // 重置
|
|
|
+ resetSearchForm () {
|
|
|
+ this.queryParam.orderBundleNo = ''
|
|
|
+ this.queryParam.orderBundle.custMobile = ''
|
|
|
+ this.queryParam.bundleName = ''
|
|
|
+ this.queryParam.itemName = ''
|
|
|
+ this.oldTime = undefined
|
|
|
+ this.newTime = undefined
|
|
|
+ this.$refs.table.refresh(true)
|
|
|
+ },
|
|
|
+ // 双击快速添加
|
|
|
+ handleClickRow (record) {
|
|
|
+ return {
|
|
|
+ on: {
|
|
|
+ dblclick: (event) => {
|
|
|
+ console.log(record)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
},
|
|
|
- beforeRouteEnter (to, from, next) {
|
|
|
- next(vm => {
|
|
|
- vm.openModal = false
|
|
|
+ // 获取详情
|
|
|
+ getDetail () {
|
|
|
+ sparePartsPurDetail({ id: this.$route.params.id }).then(res => {
|
|
|
+ if (res.status == 200) {
|
|
|
+ this.basicInfoData = res.data
|
|
|
+ } else {
|
|
|
+ this.basicInfoData = null
|
|
|
+ }
|
|
|
})
|
|
|
+ },
|
|
|
+ // 添加
|
|
|
+ handleAdd (row) {},
|
|
|
+ // 删除
|
|
|
+ handleDel (row) {},
|
|
|
+ // 编辑基本信息
|
|
|
+ handleEditInfo () {
|
|
|
+ this.openModal = true
|
|
|
+ },
|
|
|
+ // 基本信息 保存
|
|
|
+ handleOk () {
|
|
|
+
|
|
|
+ },
|
|
|
+ // 导入明细
|
|
|
+ handleImport () {
|
|
|
+ console.log(333)
|
|
|
+ },
|
|
|
+ // 返回列表
|
|
|
+ handleBack () {
|
|
|
+ this.$router.push({ path: '/bulkManagement/bulkWarehousingOrder/list' })
|
|
|
+ },
|
|
|
+ // 仓库下拉数据
|
|
|
+ getWarehouseList () {
|
|
|
+ warehouseAllList({}).then(res => {
|
|
|
+ if (res.status == 200) {
|
|
|
+ this.warehouseList = res.data
|
|
|
+ const defaultFlagInd = this.warehouseList.findIndex(item => item.defaultFlag == 1)
|
|
|
+ console.log(defaultFlagInd, this.loadData)
|
|
|
+ // this.loadData.map(item => {
|
|
|
+ // item.warehouse = this.warehouseList[defaultFlagInd].warehouseSn
|
|
|
+ // })
|
|
|
+ } else {
|
|
|
+ this.warehouseList = []
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 合计
|
|
|
+ getDetailCount () {
|
|
|
+ sparePartsPurDetailCount({ sparePartsPurchaseSn: this.$route.params.sn }).then(res => {
|
|
|
+ if (res.status == 200) {
|
|
|
+ this.productTotal = res.data
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ filterOption (input, option) {
|
|
|
+ return (
|
|
|
+ option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
+ )
|
|
|
}
|
|
|
+ },
|
|
|
+ beforeRouteEnter (to, from, next) {
|
|
|
+ next(vm => {
|
|
|
+ vm.openModal = false
|
|
|
+ vm.getDetail()
|
|
|
+ vm.getDetailCount()
|
|
|
+ })
|
|
|
}
|
|
|
+}
|
|
|
</script>
|
|
|
|
|
|
<style lang="less">
|