|
|
@@ -29,7 +29,6 @@
|
|
|
:prop="'datasource.' + $index + '.technicalDrawings'"
|
|
|
>
|
|
|
<fileMain v-model="row.technicalDrawings" type="view"></fileMain>
|
|
|
-
|
|
|
</el-form-item>
|
|
|
</template>
|
|
|
<template v-slot:remark="{ row, $index }">
|
|
|
@@ -87,17 +86,17 @@
|
|
|
:prop="'datasource.' + $index + '.industryArtFiles'"
|
|
|
>
|
|
|
<fileMain v-model="row.industryArtFiles" type="view"></fileMain>
|
|
|
-<!-- <div v-if="row.industryArtFiles && row.industryArtFiles?.length">-->
|
|
|
-<!-- <el-link-->
|
|
|
-<!-- v-for="link in row.industryArtFiles"-->
|
|
|
-<!-- :key="link.id"-->
|
|
|
-<!-- type="primary"-->
|
|
|
-<!-- :underline="false"-->
|
|
|
-<!-- @click="downloadFile(link)"-->
|
|
|
-<!-- >-->
|
|
|
-<!-- {{ link.name }}</el-link-->
|
|
|
-<!-- >-->
|
|
|
-<!-- </div>-->
|
|
|
+ <!-- <div v-if="row.industryArtFiles && row.industryArtFiles?.length">-->
|
|
|
+ <!-- <el-link-->
|
|
|
+ <!-- v-for="link in row.industryArtFiles"-->
|
|
|
+ <!-- :key="link.id"-->
|
|
|
+ <!-- type="primary"-->
|
|
|
+ <!-- :underline="false"-->
|
|
|
+ <!-- @click="downloadFile(link)"-->
|
|
|
+ <!-- >-->
|
|
|
+ <!-- {{ link.name }}</el-link-->
|
|
|
+ <!-- >-->
|
|
|
+ <!-- </div>-->
|
|
|
</el-form-item>
|
|
|
</template>
|
|
|
<template v-slot:otherFiles="{ row, $index }">
|
|
|
@@ -106,17 +105,17 @@
|
|
|
:prop="'datasource.' + $index + '.otherFiles'"
|
|
|
>
|
|
|
<fileMain v-model="row.otherFiles" type="view"></fileMain>
|
|
|
-<!-- <div v-if="row.otherFiles && row.otherFiles?.length">-->
|
|
|
-<!-- <el-link-->
|
|
|
-<!-- v-for="link in row.otherFiles"-->
|
|
|
-<!-- :key="link.id"-->
|
|
|
-<!-- type="primary"-->
|
|
|
-<!-- :underline="false"-->
|
|
|
-<!-- @click="downloadFile(link)"-->
|
|
|
-<!-- >-->
|
|
|
-<!-- {{ link.name }}</el-link-->
|
|
|
-<!-- >-->
|
|
|
-<!-- </div>-->
|
|
|
+ <!-- <div v-if="row.otherFiles && row.otherFiles?.length">-->
|
|
|
+ <!-- <el-link-->
|
|
|
+ <!-- v-for="link in row.otherFiles"-->
|
|
|
+ <!-- :key="link.id"-->
|
|
|
+ <!-- type="primary"-->
|
|
|
+ <!-- :underline="false"-->
|
|
|
+ <!-- @click="downloadFile(link)"-->
|
|
|
+ <!-- >-->
|
|
|
+ <!-- {{ link.name }}</el-link-->
|
|
|
+ <!-- >-->
|
|
|
+ <!-- </div>-->
|
|
|
</el-form-item>
|
|
|
</template>
|
|
|
<template v-slot:warehouseNum="scope">
|
|
|
@@ -131,20 +130,25 @@
|
|
|
<span class="is-required">{{ column.label }}</span>
|
|
|
</template>
|
|
|
<template v-slot:stockLedger="scope">
|
|
|
- <el-form-item
|
|
|
- style="margin-bottom: 20px">
|
|
|
+ <el-form-item style="margin-bottom: 20px">
|
|
|
<el-popover
|
|
|
- @hide="()=>selection=[]"
|
|
|
+ @hide="() => (selection = [])"
|
|
|
placement="right"
|
|
|
width="60%"
|
|
|
- trigger="hover">
|
|
|
- <ele-pro-table :ref="'childrenTable'+scope.$index"
|
|
|
- row-key="id"
|
|
|
- max-height="300px"
|
|
|
- :selection.sync="selection"
|
|
|
- :needPage="false" :columns="childrenColumns" :toolkit="[]"
|
|
|
- :datasource="scope.row.sendProductDetail"
|
|
|
- cache-key="stockLedgerRoleTable" class="time-form">
|
|
|
+ trigger="hover"
|
|
|
+ >
|
|
|
+ <ele-pro-table
|
|
|
+ :ref="'childrenTable' + scope.$index"
|
|
|
+ row-key="id"
|
|
|
+ max-height="300px"
|
|
|
+ :selection.sync="selection"
|
|
|
+ :needPage="false"
|
|
|
+ :columns="childrenColumns"
|
|
|
+ :toolkit="[]"
|
|
|
+ :datasource="scope.row.sendProductDetail"
|
|
|
+ cache-key="stockLedgerRoleTable"
|
|
|
+ class="time-form"
|
|
|
+ >
|
|
|
<!-- 表头工具栏 -->
|
|
|
<template v-slot:toolbar="childrenScope">
|
|
|
<el-button
|
|
|
@@ -152,7 +156,8 @@
|
|
|
type="primary"
|
|
|
icon="el-icon-plus"
|
|
|
class="ele-btn-icon"
|
|
|
- @click="stockLedgerSelect(scope.row,scope.$index)">
|
|
|
+ @click="stockLedgerSelect(scope.row, scope.$index)"
|
|
|
+ >
|
|
|
选择
|
|
|
</el-button>
|
|
|
<el-button
|
|
|
@@ -161,13 +166,13 @@
|
|
|
icon="el-icon-delete"
|
|
|
class="ele-btn-icon"
|
|
|
:disabled="!selection.length"
|
|
|
- @click="stockLedgerRemove(scope.$index)">
|
|
|
+ @click="stockLedgerRemove(scope.$index)"
|
|
|
+ >
|
|
|
删除
|
|
|
</el-button>
|
|
|
</template>
|
|
|
</ele-pro-table>
|
|
|
<el-button type="text" slot="reference">明细</el-button>
|
|
|
-
|
|
|
</el-popover>
|
|
|
</el-form-item>
|
|
|
</template>
|
|
|
@@ -192,8 +197,12 @@
|
|
|
@changeParent="changeParent"
|
|
|
></product-list>
|
|
|
<!-- 库存台账 -->
|
|
|
- <stock-ledger-dialog v-if="stockLedgerDialogFlag" :stock-ledger-dialog-flag.sync="stockLedgerDialogFlag"
|
|
|
- ref="stockLedgerDialogRef" @getStockLedger="getStockLedger"></stock-ledger-dialog>
|
|
|
+ <stock-ledger-dialog
|
|
|
+ v-if="stockLedgerDialogFlag"
|
|
|
+ :stock-ledger-dialog-flag.sync="stockLedgerDialogFlag"
|
|
|
+ ref="stockLedgerDialogRef"
|
|
|
+ @getStockLedger="getStockLedger"
|
|
|
+ ></stock-ledger-dialog>
|
|
|
</el-form>
|
|
|
</template>
|
|
|
<script>
|
|
|
@@ -206,9 +215,9 @@
|
|
|
} from '@/api/bpm/components/saleManage/saleorder';
|
|
|
|
|
|
import { copyObj } from '@/utils/util';
|
|
|
- import StockLedgerDialog from "@/views/bpm/handleTask/components/saleOrder/invoice/stockLedger/stockLedgerDialog.vue";
|
|
|
+ import StockLedgerDialog from '@/views/bpm/handleTask/components/saleOrder/invoice/stockLedger/stockLedgerDialog.vue';
|
|
|
// import fileMain from "@/components/addDoc/index.vue";
|
|
|
- import {lbjtList } from '@/enum/dict.js';
|
|
|
+ import { lbjtList } from '@/enum/dict.js';
|
|
|
|
|
|
export default {
|
|
|
mixins: [dictMixins],
|
|
|
@@ -246,25 +255,25 @@
|
|
|
type: 'index',
|
|
|
columnKey: 'index',
|
|
|
align: 'center',
|
|
|
- fixed: 'left',
|
|
|
+ fixed: 'left'
|
|
|
},
|
|
|
{
|
|
|
minWidth: 100,
|
|
|
prop: 'code',
|
|
|
label: '编码',
|
|
|
- align: 'center',
|
|
|
+ align: 'center'
|
|
|
},
|
|
|
{
|
|
|
minWidth: 140,
|
|
|
prop: 'barcodes',
|
|
|
label: '发货条码',
|
|
|
- align: 'center',
|
|
|
+ align: 'center'
|
|
|
},
|
|
|
{
|
|
|
minWidth: 100,
|
|
|
prop: 'engrave',
|
|
|
label: '刻码',
|
|
|
- align: 'center',
|
|
|
+ align: 'center'
|
|
|
}
|
|
|
],
|
|
|
selection: [],
|
|
|
@@ -279,7 +288,7 @@
|
|
|
form: {
|
|
|
datasource: []
|
|
|
},
|
|
|
- rules: {},
|
|
|
+ rules: {}
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
@@ -303,14 +312,14 @@
|
|
|
type: 'index',
|
|
|
columnKey: 'index',
|
|
|
align: 'center',
|
|
|
- fixed: 'left',
|
|
|
+ fixed: 'left'
|
|
|
},
|
|
|
{
|
|
|
width: 200,
|
|
|
prop: 'productName',
|
|
|
label: '名称',
|
|
|
slot: 'productName',
|
|
|
- align: 'center',
|
|
|
+ align: 'center'
|
|
|
},
|
|
|
{
|
|
|
width: 120,
|
|
|
@@ -345,7 +354,7 @@
|
|
|
prop: 'customerMark',
|
|
|
label: '客户代号',
|
|
|
slot: 'customerMark',
|
|
|
- align: 'center',
|
|
|
+ align: 'center'
|
|
|
},
|
|
|
{
|
|
|
width: 120,
|
|
|
@@ -373,12 +382,13 @@
|
|
|
align: 'center',
|
|
|
label: '属性类型',
|
|
|
formatter: (row, column) => {
|
|
|
- if(row.produceType){
|
|
|
- return row.produceType.map(item=>{
|
|
|
- return lbjtList[item]
|
|
|
- }).toString()
|
|
|
+ if (row.produceType) {
|
|
|
+ return row.produceType
|
|
|
+ .map((item) => {
|
|
|
+ return lbjtList[item];
|
|
|
+ })
|
|
|
+ .toString();
|
|
|
}
|
|
|
-
|
|
|
},
|
|
|
showOverflowTooltip: true
|
|
|
},
|
|
|
@@ -426,14 +436,14 @@
|
|
|
prop: 'singleWeight',
|
|
|
label: '单重',
|
|
|
slot: 'singleWeight',
|
|
|
- align: "center"
|
|
|
+ align: 'center'
|
|
|
},
|
|
|
{
|
|
|
width: 200,
|
|
|
prop: 'receiveTotalWeight',
|
|
|
label: '收货总重',
|
|
|
slot: 'receiveTotalWeight',
|
|
|
- align: "center",
|
|
|
+ align: 'center',
|
|
|
headerSlot: 'headerTotalCount'
|
|
|
},
|
|
|
{
|
|
|
@@ -441,7 +451,7 @@
|
|
|
prop: 'sendTotalWeight',
|
|
|
label: '发货总重',
|
|
|
slot: 'sendTotalWeight',
|
|
|
- align: "center",
|
|
|
+ align: 'center'
|
|
|
},
|
|
|
|
|
|
{
|
|
|
@@ -449,14 +459,14 @@
|
|
|
prop: 'increaseTotalWeight',
|
|
|
label: '增重重量',
|
|
|
slot: 'increaseTotalWeight',
|
|
|
- align: "center"
|
|
|
+ align: 'center'
|
|
|
},
|
|
|
{
|
|
|
width: 100,
|
|
|
prop: 'weightUnit',
|
|
|
label: '重量单位',
|
|
|
slot: 'weightUnit',
|
|
|
- align: "center"
|
|
|
+ align: 'center'
|
|
|
},
|
|
|
|
|
|
{
|
|
|
@@ -494,14 +504,16 @@
|
|
|
slot: 'deliveryDays',
|
|
|
align: 'center'
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
{
|
|
|
width: 200,
|
|
|
prop: 'guaranteePeriod',
|
|
|
label: '有效期',
|
|
|
slot: 'guaranteePeriod',
|
|
|
formatter: (_row, _column, cellValue) => {
|
|
|
- return (_row.guaranteePeriod || '') + _row.guaranteePeriodUnitName;
|
|
|
+ return (
|
|
|
+ (_row.guaranteePeriod || '') + _row.guaranteePeriodUnitName
|
|
|
+ );
|
|
|
},
|
|
|
align: 'center'
|
|
|
},
|
|
|
@@ -521,10 +533,9 @@
|
|
|
minWidth: 200,
|
|
|
showOverflowTooltip: true,
|
|
|
formatter: (row, column) => {
|
|
|
-
|
|
|
return row.provenance && row.provenance.length
|
|
|
? row.provenance
|
|
|
- .map((item) => this.getDictValue('产地', item ))
|
|
|
+ .map((item) => this.getDictValue('产地', item))
|
|
|
.join(',')
|
|
|
: '';
|
|
|
}
|
|
|
@@ -567,38 +578,43 @@
|
|
|
fixed: 'right',
|
|
|
showOverflowTooltip: true
|
|
|
}
|
|
|
- ]
|
|
|
+ ];
|
|
|
}
|
|
|
},
|
|
|
+ mounted() {
|
|
|
+ this.clientEnvironmentId =
|
|
|
+ this.this.$store.state.user.info.clientEnvironmentId;
|
|
|
+ },
|
|
|
methods: {
|
|
|
//发货明细选择
|
|
|
stockLedgerSelect(row, index) {
|
|
|
- this.curIndex = index
|
|
|
- this.stockLedgerDialogFlag = true
|
|
|
+ this.curIndex = index;
|
|
|
+ this.stockLedgerDialogFlag = true;
|
|
|
this.$nextTick(() => {
|
|
|
- this.$refs.stockLedgerDialogRef.init(row.sendProductDetail,row)
|
|
|
- })
|
|
|
+ this.$refs.stockLedgerDialogRef.init(row.sendProductDetail, row);
|
|
|
+ });
|
|
|
},
|
|
|
//获取
|
|
|
getStockLedger(sendProductDetail) {
|
|
|
- if (!this.form.datasource[this.curIndex].sendProductDetail) this.form.datasource[this.curIndex].sendProductDetail = []
|
|
|
- let row = this.form.datasource[this.curIndex]
|
|
|
- row.sendProductDetail.push(...sendProductDetail)
|
|
|
- this.form.datasource[this.curIndex] = row
|
|
|
- this.$refs['childrenTable'+this.curIndex].reload()
|
|
|
- this.$refs.table.reload()
|
|
|
+ if (!this.form.datasource[this.curIndex].sendProductDetail)
|
|
|
+ this.form.datasource[this.curIndex].sendProductDetail = [];
|
|
|
+ let row = this.form.datasource[this.curIndex];
|
|
|
+ row.sendProductDetail.push(...sendProductDetail);
|
|
|
+ this.form.datasource[this.curIndex] = row;
|
|
|
+ this.$refs['childrenTable' + this.curIndex].reload();
|
|
|
+ this.$refs.table.reload();
|
|
|
},
|
|
|
//删除发货明细
|
|
|
stockLedgerRemove(PIndex) {
|
|
|
- let row = this.form.datasource[PIndex]
|
|
|
- this.selection.forEach(item => {
|
|
|
- let index = row.sendProductDetail.findIndex(i => i.id == item.id)
|
|
|
- row.sendProductDetail.splice(index, 1)
|
|
|
- })
|
|
|
- this.form.datasource[PIndex] = row
|
|
|
- this.$refs['childrenTable' + PIndex].reload()
|
|
|
- this.$refs.table.reload()
|
|
|
- this.selection = []
|
|
|
+ let row = this.form.datasource[PIndex];
|
|
|
+ this.selection.forEach((item) => {
|
|
|
+ let index = row.sendProductDetail.findIndex((i) => i.id == item.id);
|
|
|
+ row.sendProductDetail.splice(index, 1);
|
|
|
+ });
|
|
|
+ this.form.datasource[PIndex] = row;
|
|
|
+ this.$refs['childrenTable' + PIndex].reload();
|
|
|
+ this.$refs.table.reload();
|
|
|
+ this.selection = [];
|
|
|
},
|
|
|
async warehouseChange(index, row) {
|
|
|
let warehouseIds =
|