|
@@ -102,6 +102,13 @@
|
|
|
<el-button type="danger" plain size="small" @click="batchDelete"
|
|
|
:disabled="form.generateTask == '已生成' || form.businessSource == '外部销售'">一键删除</el-button>
|
|
|
<el-button type="primary" plain size="small" @click="quickCopy">快捷复制</el-button>
|
|
|
+ <el-popover width="600" trigger="click">
|
|
|
+ <avue-crud :data="inventoryData" :option="inventoryOption"></avue-crud>
|
|
|
+ <el-button type="primary" plain size="small" slot="reference" @click="viewInventory"
|
|
|
+ :disabled="selectionMultilist.length != 1">查看库存</el-button>
|
|
|
+ </el-popover>
|
|
|
+ <!-- <el-button type="primary" plain size="small"
|
|
|
+ :disabled="selectionMultilist.length != 1">查看库存</el-button> -->
|
|
|
</template>
|
|
|
<template slot="goodsId" slot-scope="{ row }">
|
|
|
{{ row.goodsName }}
|
|
@@ -347,11 +354,36 @@ import {
|
|
|
} from "@/api/tirePartsMall/basicData/customerInformation";
|
|
|
import { getToken } from "@/util/auth";
|
|
|
import { isProcurement } from "@/api/basicData/configuration";
|
|
|
+import { getList as inventoryList } from "@/api/tirePartsMall/inventory";
|
|
|
export default {
|
|
|
name: "detailsPage",
|
|
|
|
|
|
data() {
|
|
|
return {
|
|
|
+ inventoryOption: {
|
|
|
+ header: false,
|
|
|
+ menu: false,
|
|
|
+ column: [
|
|
|
+ {
|
|
|
+ label: '商品名称',
|
|
|
+ prop: 'cname',
|
|
|
+ overHidden: true,
|
|
|
+ }, {
|
|
|
+ label: '仓库',
|
|
|
+ prop: 'storageName',
|
|
|
+ overHidden: true,
|
|
|
+ }, {
|
|
|
+ label: '库存数量',
|
|
|
+ prop: 'balanceQuantity',
|
|
|
+ overHidden: true,
|
|
|
+ }, {
|
|
|
+ label: '批次号',
|
|
|
+ prop: 'dot',
|
|
|
+ overHidden: true,
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ inventoryData: [],
|
|
|
excelBox: false,
|
|
|
reportName: '', // 打印传的名字
|
|
|
SelectSearch: {}, // 添加商品检索
|
|
@@ -1370,6 +1402,12 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ viewInventory() {
|
|
|
+ this.inventoryData = []
|
|
|
+ inventoryList({ cname: this.selectionMultilist[0].goodsName }).then(res => [
|
|
|
+ this.inventoryData = res.data.data.records
|
|
|
+ ])
|
|
|
+ },
|
|
|
uploadAfter(res, done, loading, column) {
|
|
|
if (Array.isArray(res)) {
|
|
|
if (res instanceof Array) {
|
|
@@ -2257,7 +2295,7 @@ export default {
|
|
|
return
|
|
|
}
|
|
|
for (let i in this.form.orderItemsList) {
|
|
|
- this.form.orderItemsList[i].subTotalMoney = Number(this.form.orderItemsList[i].goodsNum * this.form.orderItemsList[i].price)?Number(this.form.orderItemsList[i].goodsNum * this.form.orderItemsList[i].price).toFixed(2):0
|
|
|
+ this.form.orderItemsList[i].subTotalMoney = Number(this.form.orderItemsList[i].goodsNum * this.form.orderItemsList[i].price) ? Number(this.form.orderItemsList[i].goodsNum * this.form.orderItemsList[i].price).toFixed(2) : 0
|
|
|
if (this.form.orderItemsList[i].pid) {
|
|
|
} else {
|
|
|
if (this.form.orderItemsList[i].whether == '1') {
|
|
@@ -2462,7 +2500,7 @@ export default {
|
|
|
|
|
|
this.form.orderItemsList.forEach((items) => {
|
|
|
if (!items.subTotalMoney) {
|
|
|
- items.subTotalMoney = Number(items.goodsNum * items.price)?Number(items.goodsNum * items.price).toFixed(2):0
|
|
|
+ items.subTotalMoney = Number(items.goodsNum * items.price) ? Number(items.goodsNum * items.price).toFixed(2) : 0
|
|
|
items.grossProfit = items.subTotalMoney - items.costprie
|
|
|
}
|
|
|
// let brandName = items.brandId
|
|
@@ -2609,7 +2647,7 @@ export default {
|
|
|
|
|
|
this.form.orderItemsList.forEach((items) => {
|
|
|
if (!items.subTotalMoney) {
|
|
|
- items.subTotalMoney = Number(items.goodsNum * items.price)?Number(items.goodsNum * items.price).toFixed(2):0
|
|
|
+ items.subTotalMoney = Number(items.goodsNum * items.price) ? Number(items.goodsNum * items.price).toFixed(2) : 0
|
|
|
items.grossProfit = items.subTotalMoney - items.costprie
|
|
|
}
|
|
|
})
|