|
@@ -52,7 +52,7 @@
|
|
:columns="columns"
|
|
:columns="columns"
|
|
:customRow="handleClickRow"
|
|
:customRow="handleClickRow"
|
|
:data="loadData"
|
|
:data="loadData"
|
|
- :scroll="{ x: 1120, y: 300 }"
|
|
|
|
|
|
+ :scroll="{ x: 990, y: 300 }"
|
|
bordered>
|
|
bordered>
|
|
<!-- 操作 -->
|
|
<!-- 操作 -->
|
|
<template slot="action" slot-scope="text, record">
|
|
<template slot="action" slot-scope="text, record">
|
|
@@ -99,8 +99,8 @@
|
|
</div>
|
|
</div>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :span="7" style="text-align: right;">
|
|
<a-col :span="7" style="text-align: right;">
|
|
- <!-- <a-button size="small" id="allocateBillEdit-import-btn">导入明细</a-button> -->
|
|
|
|
- <a-button size="small" type="danger" style="margin-left: 8px" @click.stop="handleDel('', 'all')" id="chainTransferOutEdit-del-all-btn">整单删除</a-button>
|
|
|
|
|
|
+ <a-button size="small" id="allocateBillEdit-import-btn" @click="openGuideModal=true">导入产品</a-button>
|
|
|
|
+ <a-button size="small" type="danger" style="margin-left: 5px" @click.stop="handleDel('', 'all')" id="chainTransferOutEdit-del-all-btn">整单删除</a-button>
|
|
</a-col>
|
|
</a-col>
|
|
</a-row>
|
|
</a-row>
|
|
<!-- 列表 -->
|
|
<!-- 列表 -->
|
|
@@ -111,7 +111,7 @@
|
|
:rowKey="(record) => record.id"
|
|
:rowKey="(record) => record.id"
|
|
:columns="chooseColumns"
|
|
:columns="chooseColumns"
|
|
:dataSource="chooseLoadData"
|
|
:dataSource="chooseLoadData"
|
|
- :scroll="{ x: 955, y: 300 }"
|
|
|
|
|
|
+ :scroll="{ x: 1090, y: 300 }"
|
|
:loading="loading"
|
|
:loading="loading"
|
|
:pagination="false"
|
|
:pagination="false"
|
|
bordered>
|
|
bordered>
|
|
@@ -154,6 +154,8 @@
|
|
@click="handleSubmit"
|
|
@click="handleSubmit"
|
|
style="padding: 0 60px;">提交</a-button>
|
|
style="padding: 0 60px;">提交</a-button>
|
|
</div>
|
|
</div>
|
|
|
|
+ <!-- 导入产品 -->
|
|
|
|
+ <importGuideModal :openModal="openGuideModal" :params="importParams" @close="openGuideModal=false" @ok="hanldeOk" />
|
|
<!-- 打印 -->
|
|
<!-- 打印 -->
|
|
<div id="print"></div>
|
|
<div id="print"></div>
|
|
</div>
|
|
</div>
|
|
@@ -162,10 +164,11 @@
|
|
<script>
|
|
<script>
|
|
import { STable, VSelect } from '@/components'
|
|
import { STable, VSelect } from '@/components'
|
|
import tablePagination from '@/views/common/tablePagination.vue'
|
|
import tablePagination from '@/views/common/tablePagination.vue'
|
|
|
|
+import ImportGuideModal from './importGuideModal.vue'
|
|
import { queryStockProductPage } from '@/api/stock'
|
|
import { queryStockProductPage } from '@/api/stock'
|
|
-import { allocateBillDetailList, allocateBillDetailCount, allocateBillDetailSave, allocateBillSubmit, allocateBillDetailDel, allocateBillDetailDelAll, allocateBillDetailPrint } from '@/api/allocateBill'
|
|
|
|
|
|
+import { allocateBillDetailList, allocateBillDetailCount, allocateBillDetailSave, allocateBillSubmit, allocateBillDetailDel, allocateBillDetailDelAll, allocateBillDetailPrint, allocateBillBatchInsert } from '@/api/allocateBill'
|
|
export default {
|
|
export default {
|
|
- components: { STable, VSelect, tablePagination },
|
|
|
|
|
|
+ components: { STable, VSelect, tablePagination, ImportGuideModal },
|
|
data () {
|
|
data () {
|
|
return {
|
|
return {
|
|
spinning: false,
|
|
spinning: false,
|
|
@@ -188,10 +191,10 @@ export default {
|
|
warehouseList: [], // 仓库 下拉数据
|
|
warehouseList: [], // 仓库 下拉数据
|
|
// 表头
|
|
// 表头
|
|
columns: [
|
|
columns: [
|
|
- { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
|
|
|
|
- { title: '产品编码', dataIndex: 'productCode', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
|
|
+ { title: '序号', dataIndex: 'no', width: 70, align: 'center' },
|
|
|
|
+ { title: '产品编码', dataIndex: 'productCode', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '产品名称', dataIndex: 'productName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
{ title: '产品名称', dataIndex: 'productName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
- { title: '原厂编码', dataIndex: 'productOrigCode', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
|
|
+ { title: '原厂编码', dataIndex: 'productOrigCode', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '成本价', dataIndex: 'lastStockCost', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
{ title: '成本价', dataIndex: 'lastStockCost', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
{ title: '售价', dataIndex: 'productPrice', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
{ title: '售价', dataIndex: 'productPrice', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
{ title: '库存数量', dataIndex: 'currentStockQty', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
{ title: '库存数量', dataIndex: 'currentStockQty', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
@@ -213,10 +216,10 @@ export default {
|
|
},
|
|
},
|
|
// 表头
|
|
// 表头
|
|
chooseColumns: [
|
|
chooseColumns: [
|
|
- { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
|
|
|
|
- { title: '产品编码', dataIndex: 'productEntity.code', width: 150, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
|
|
+ { title: '序号', dataIndex: 'no', width: 70, align: 'center' },
|
|
|
|
+ { title: '产品编码', dataIndex: 'productEntity.code', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '产品名称', dataIndex: 'productEntity.name', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
{ title: '产品名称', dataIndex: 'productEntity.name', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
- { title: '原厂编码', dataIndex: 'productEntity.origCode', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
|
|
+ { title: '原厂编码', dataIndex: 'productEntity.origCode', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '成本价', dataIndex: 'cost', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
{ title: '成本价', dataIndex: 'cost', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
{ title: '售价', dataIndex: 'price', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
{ title: '售价', dataIndex: 'price', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
{ title: '库存数量', dataIndex: 'currentStockQty', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
{ title: '库存数量', dataIndex: 'currentStockQty', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
@@ -230,7 +233,16 @@ export default {
|
|
current: 1,
|
|
current: 1,
|
|
pageSize: 20
|
|
pageSize: 20
|
|
},
|
|
},
|
|
- productTotal: null // 合计
|
|
|
|
|
|
+ productTotal: null, // 合计
|
|
|
|
+ openGuideModal: false // 导入产品引导
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ computed: {
|
|
|
|
+ importParams () {
|
|
|
|
+ const obj = {
|
|
|
|
+ allocateSn: this.$route.params.sn
|
|
|
|
+ }
|
|
|
|
+ return obj
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
@@ -251,6 +263,14 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ // 导入产品
|
|
|
|
+ hanldeOk (obj) {
|
|
|
|
+ allocateBillBatchInsert(obj).then(res => {
|
|
|
|
+ if (res.status == 200) {
|
|
|
|
+ this.getChooseProductList(1)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
// 已选产品 重置
|
|
// 已选产品 重置
|
|
chooseResetSearchForm () {
|
|
chooseResetSearchForm () {
|
|
this.chooseQueryParam.productCode = ''
|
|
this.chooseQueryParam.productCode = ''
|