|
@@ -26,7 +26,8 @@
|
|
<a-card size="small" :bordered="false" class="bulkWarehousingOrderEdit-cont">
|
|
<a-card size="small" :bordered="false" class="bulkWarehousingOrderEdit-cont">
|
|
<!-- 操作按钮 -->
|
|
<!-- 操作按钮 -->
|
|
<div class="table-operator">
|
|
<div class="table-operator">
|
|
- <a-button id="bulkWarehousingOrderEdit-add" type="primary" class="button-error" @click="handleEdit()">新增产品</a-button>
|
|
|
|
|
|
+ <a-button id="bulkWarehousingOrderEdit-add" type="primary" class="button-primary" @click="handleEdit()">新增产品</a-button>
|
|
|
|
+ <a-button id="bulkWarehousingOrderEdit-import" type="primary" class="button-primary" @click="openGuideModal=true">导入产品</a-button>
|
|
</div>
|
|
</div>
|
|
<!-- 总计 -->
|
|
<!-- 总计 -->
|
|
<a-alert type="info" v-if="productTotal" style="margin-bottom:10px">
|
|
<a-alert type="info" v-if="productTotal" style="margin-bottom:10px">
|
|
@@ -74,6 +75,8 @@
|
|
style="padding: 0 60px;">保存并返回</a-button>
|
|
style="padding: 0 60px;">保存并返回</a-button>
|
|
</div>
|
|
</div>
|
|
<spare-parts-product-modal :openModal="openModal" :itemSn="itemSn" :nowData="productTotal" @ok="$refs.table.refresh(true)" @close="closeModal" />
|
|
<spare-parts-product-modal :openModal="openModal" :itemSn="itemSn" :nowData="productTotal" @ok="$refs.table.refresh(true)" @close="closeModal" />
|
|
|
|
+ <!-- 导入产品 -->
|
|
|
|
+ <importGuideModal :openModal="openGuideModal" :params="{sparePartsSn: $route.params.sn}" @close="openGuideModal=false" @ok="hanldeOk" />
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -81,21 +84,22 @@
|
|
import { STable, VSelect } from '@/components'
|
|
import { STable, VSelect } from '@/components'
|
|
import { getOperationalPrecision } from '@/libs/tools.js'
|
|
import { getOperationalPrecision } from '@/libs/tools.js'
|
|
import sparePartsProductModal from './productModal.vue'
|
|
import sparePartsProductModal from './productModal.vue'
|
|
-import { sparePartsDetailList, sparePartsPageCount, sparePartsDeleteDetail } from '@/api/spareParts'
|
|
|
|
|
|
+import ImportGuideModal from './importGuideModal.vue'
|
|
|
|
+import { sparePartsDetailList, sparePartsPageCount, sparePartsDeleteDetail, sparePartsDetailBatchInsert } from '@/api/spareParts'
|
|
export default {
|
|
export default {
|
|
- components: { STable, VSelect, sparePartsProductModal },
|
|
|
|
|
|
+ components: { STable, VSelect, sparePartsProductModal, ImportGuideModal },
|
|
data () {
|
|
data () {
|
|
return {
|
|
return {
|
|
spinning: false,
|
|
spinning: false,
|
|
// 表头
|
|
// 表头
|
|
columns: [
|
|
columns: [
|
|
{ title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
|
|
{ title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
|
|
- { title: '产品编码', dataIndex: 'productCode',width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '产品名称', dataIndex: 'productName',width: '25%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
|
|
+ { title: '产品编码', dataIndex: 'productCode', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '产品名称', dataIndex: 'productName', width: '25%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
{ title: '单位', dataIndex: 'unit', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '单位', dataIndex: 'unit', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '入库数量', dataIndex: 'productQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
{ title: '入库数量', dataIndex: 'productQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
- { title: '入库单价', dataIndex: 'productCost',width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
- { title: '小计', dataIndex: 'subtotal',width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
|
|
+ { title: '入库单价', dataIndex: 'productCost', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
+ { title: '小计', dataIndex: 'subtotal', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
|
|
{ title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
|
|
],
|
|
],
|
|
// 加载数据方法 必须为 Promise 对象
|
|
// 加载数据方法 必须为 Promise 对象
|
|
@@ -115,7 +119,8 @@ export default {
|
|
openModal: false, // 选择基本信息弹框是否显示
|
|
openModal: false, // 选择基本信息弹框是否显示
|
|
basicInfoData: null, // 基本信息
|
|
basicInfoData: null, // 基本信息
|
|
productTotal: null, // 合计
|
|
productTotal: null, // 合计
|
|
- itemSn: ''
|
|
|
|
|
|
+ itemSn: '',
|
|
|
|
+ openGuideModal: false // 导入产品引导
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
@@ -150,6 +155,14 @@ export default {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ // 导入产品
|
|
|
|
+ hanldeOk (obj) {
|
|
|
|
+ sparePartsDetailBatchInsert(obj).then(res => {
|
|
|
|
+ if (res.status == 200) {
|
|
|
|
+ this.$refs.table.refresh(true)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
// 返回列表
|
|
// 返回列表
|
|
handleBack () {
|
|
handleBack () {
|
|
this.$router.push({ path: '/purchasingManagement/bulkWarehousingOrder/list', query: { closeLastOldTab: true } })
|
|
this.$router.push({ path: '/purchasingManagement/bulkWarehousingOrder/list', query: { closeLastOldTab: true } })
|