|
@@ -26,12 +26,23 @@
|
|
|
</trade-card>
|
|
|
<trade-card title="明细信息">
|
|
|
<avue-crud :option="optionContacts" v-model="formContacts" ref="formContacts" :data="form.shipItemsList"
|
|
|
- :key="key" @row-save="rowSave" @row-update="rowUpdate"
|
|
|
+ :key="key" @row-save="rowSave" @row-update="rowUpdate" @selection-change="selectionContacts"
|
|
|
@resetColumn="resetColumnTwo('formContacts', 'optionContacts', 'optionContactsBack', 430)"
|
|
|
@saveColumn="saveColumnTwo('formContacts', 'optionContacts', 'optionContactsBack', 430)">
|
|
|
- <template slot-scope="scope" slot="menuLeft">
|
|
|
+ <template slot-scope="{scope,row}" slot="menuLeft">
|
|
|
<el-button type="primary" icon="el-icon-printer" size="small" @click="adddiailsfun">录入明细</el-button>
|
|
|
<el-button type="primary" icon="el-icon-printer" size="small" @click="handlePrint">打印</el-button>
|
|
|
+ <el-popover width="800" trigger="click" placement="right">
|
|
|
+ <avue-crud :data="inventoryData" :option="inventoryOption">
|
|
|
+ <template slot-scope="{row}" slot="menu">
|
|
|
+ <el-button type="text" icon="el-icon-refresh" size="small" :disabled="row.storageId != form.storageId"
|
|
|
+ @click.stop="synchronous(row)">更新库存
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ </avue-crud>
|
|
|
+ <el-button type="primary" plain size="small" slot="reference" @click="viewInventory"
|
|
|
+ :disabled="selectionMultilist.length != 1">同步库存</el-button>
|
|
|
+ </el-popover>
|
|
|
</template>
|
|
|
<template slot-scope="{type,size,row,index,disabled}" slot="menu">
|
|
|
<el-button :size="size" :disabled="disabled || isAddDisabled" :type="type"
|
|
@@ -103,12 +114,53 @@ import { dotList } from "@/api/tirePartsMall/purchasingManagement/warehouseEntry
|
|
|
import { isProcurement } from "@/api/basicData/configuration";
|
|
|
import dialogAssembly from "@/views/tirePartsMall/salesManagement/outboundWorkOrderL/dialogAssembly.vue";
|
|
|
import { getKh } from "@/api/tirePartsMall/salesManagement/saleOrder";
|
|
|
-
|
|
|
+import { getList as inventoryList } from "@/api/tirePartsMall/inventory";
|
|
|
|
|
|
export default {
|
|
|
name: "detailsPage",
|
|
|
data() {
|
|
|
return {
|
|
|
+ selectionMultilist: [],
|
|
|
+ inventoryData: [],
|
|
|
+ inventoryOption: {
|
|
|
+ header: false,
|
|
|
+ menu: true,
|
|
|
+ menuWidth: 90,
|
|
|
+ editBtn: false,
|
|
|
+ delBtn: false,
|
|
|
+ column: [
|
|
|
+ {
|
|
|
+ label: '商品名称',
|
|
|
+ prop: 'cname',
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '仓库',
|
|
|
+ prop: 'storageName',
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '结余数量',
|
|
|
+ prop: 'balanceQuantity',
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '结余数量(融资)',
|
|
|
+ prop: 'balanceQuantityFinancing',
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '结余数量(自有)',
|
|
|
+ prop: 'balanceQuantityHave',
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '批次号',
|
|
|
+ prop: 'dot',
|
|
|
+ overHidden: true,
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
whetherFinancing: 0,
|
|
|
picihaolist: [], // 批次号数据
|
|
|
tableData: [],
|
|
@@ -252,6 +304,8 @@ export default {
|
|
|
dialogTop: 25,
|
|
|
dialogWidth: "80%",
|
|
|
showSummary: true,
|
|
|
+ tip: false,
|
|
|
+ selection: true,
|
|
|
sumColumnList: [
|
|
|
{
|
|
|
name: 'goodsNum',
|
|
@@ -270,6 +324,7 @@ export default {
|
|
|
label: '商品编码',
|
|
|
disabled: true,
|
|
|
prop: 'goodsNo',
|
|
|
+ overHidden: true,
|
|
|
width: 100
|
|
|
}, {
|
|
|
label: '批次号',
|
|
@@ -789,6 +844,23 @@ export default {
|
|
|
this.$store.commit("DOMIO_IN_ALLOCATW");
|
|
|
},
|
|
|
methods: {
|
|
|
+ viewInventory() {
|
|
|
+ inventoryList({ cname: this.selectionMultilist[0].goodsName, dot: this.selectionMultilist[0].dot, storageId: this.form.storageId }).then(res => [
|
|
|
+ this.inventoryData = res.data.data.records
|
|
|
+ ])
|
|
|
+ },
|
|
|
+ synchronous(row) {
|
|
|
+ this.form.shipItemsList.forEach(e => {
|
|
|
+ if (e.goodsName == this.selectionMultilist[0].goodsName) {
|
|
|
+ e.inventory = row.balanceQuantity
|
|
|
+ e.inventoryFinancing = row.balanceQuantityFinancing
|
|
|
+ e.inventoryHave = row.balanceQuantityHave
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ selectionContacts(list) {
|
|
|
+ this.selectionMultilist = list
|
|
|
+ },
|
|
|
// 撤销调拨
|
|
|
revoke() {
|
|
|
this.$refs["form"].validate((valid, done) => {
|