|
@@ -121,8 +121,29 @@
|
|
|
<template slot-scope="{type,disabled}" slot="packingUnitForm">
|
|
|
<dic-select style="width: 100%;" v-model="Detailform.packingUnit" placeholder="包装单位" key="id"
|
|
|
label="cnName" url="/blade-los/bpackages/list" :filterable="true" :remote="true"
|
|
|
- res="records" dataName="cnName" @selectChange="dicChange('packingUnit', $event)"></dic-select>
|
|
|
+ res="records" dataName="cnName"
|
|
|
+ @selectChange="dicChange('packingUnit', $event)"></dic-select>
|
|
|
</template>
|
|
|
+ <tempalte slot-scope="{type,disabled}" slot="dgPackingUnitForm">
|
|
|
+ <dic-select v-model="Detailform.dgPackingUnit" placeholder="危险品包装单位" key="dictKey"
|
|
|
+ label="dictValue" url="/blade-system/dict-biz/dictionary?code=hazardous_Units"
|
|
|
+ :filterable="true"></dic-select>
|
|
|
+ </tempalte>
|
|
|
+ <tempalte slot-scope="{type,disabled}" slot="dgPackingLevelForm">
|
|
|
+ <dic-select v-model="Detailform.dgPackingLevel" placeholder="危险品包装等级" key="dictKey"
|
|
|
+ label="dictValue" url="/blade-system/dict-biz/dictionary?code=hazard_Level"
|
|
|
+ :filterable="true"></dic-select>
|
|
|
+ </tempalte>
|
|
|
+ <tempalte slot-scope="{type,disabled}" slot="dgEmerTemperatureUnitForm">
|
|
|
+ <dic-select v-model="Detailform.dgEmerTemperatureUnit" placeholder="Emergency温度单位" key="dictKey"
|
|
|
+ label="dictValue" url="/blade-system/dict-biz/dictionary?code=Emergency_Unit"
|
|
|
+ :filterable="true"></dic-select>
|
|
|
+ </tempalte>
|
|
|
+ <tempalte slot-scope="{type,disabled}" slot="dgCtrlTemperatureUnitForm">
|
|
|
+ <dic-select v-model="Detailform.dgCtrlTemperatureUnit" placeholder="Control温度单位" key="dictKey"
|
|
|
+ label="dictValue" url="/blade-system/dict-biz/dictionary?code=dgCtrlTemperatureUnit_Unit"
|
|
|
+ :filterable="true"></dic-select>
|
|
|
+ </tempalte>
|
|
|
</avue-crud>
|
|
|
</el-tab-pane>
|
|
|
</el-tabs>
|
|
@@ -446,18 +467,13 @@ export default {
|
|
|
width: "120",
|
|
|
overHidden: true,
|
|
|
display: false,
|
|
|
- type: "select",
|
|
|
- dicData: [],
|
|
|
- props: {
|
|
|
- label: "cnName",
|
|
|
- value: "cnName"
|
|
|
- },
|
|
|
+ // type: "select",
|
|
|
+ // props: {
|
|
|
+ // label: "dictValue",
|
|
|
+ // value: "dictKey"
|
|
|
+ // },
|
|
|
cell: true,
|
|
|
- remote: true,
|
|
|
- dicUrl: '/api/blade-los/bunits/list?cnName={{key}}',
|
|
|
- dicFormatter: (res => {
|
|
|
- return res.data.records
|
|
|
- }),
|
|
|
+ // dicUrl: '/api/blade-system/dict-biz/dictionary?code=hazardous_Units',
|
|
|
},
|
|
|
{
|
|
|
label: "危险品包装等级",
|
|
@@ -473,6 +489,8 @@ export default {
|
|
|
prop: "dgFlashPoint",
|
|
|
labelWidth: 100,
|
|
|
width: "120",
|
|
|
+ type: 'number',
|
|
|
+ controls: false,
|
|
|
overHidden: true,
|
|
|
display: false,
|
|
|
cell: true,
|
|
@@ -553,12 +571,16 @@ export default {
|
|
|
prop: "dgDcWeight",
|
|
|
labelWidth: 100,
|
|
|
width: "120",
|
|
|
+ type: 'number',
|
|
|
+ controls: false,
|
|
|
overHidden: true,
|
|
|
cell: true,
|
|
|
},
|
|
|
{
|
|
|
label: "Emergency温度",
|
|
|
prop: "dgEmerTemperature",
|
|
|
+ type: 'number',
|
|
|
+ controls: false,
|
|
|
labelWidth: 100,
|
|
|
width: "120",
|
|
|
overHidden: true,
|
|
@@ -575,6 +597,8 @@ export default {
|
|
|
{
|
|
|
label: "Control温度",
|
|
|
prop: "dgCtrlTemperature",
|
|
|
+ type: 'number',
|
|
|
+ controls: false,
|
|
|
labelWidth: 100,
|
|
|
width: "120",
|
|
|
overHidden: true,
|
|
@@ -591,6 +615,8 @@ export default {
|
|
|
{
|
|
|
label: "左超 厘米",
|
|
|
prop: "overLeft",
|
|
|
+ type: 'number',
|
|
|
+ controls: false,
|
|
|
labelWidth: 100,
|
|
|
width: "120",
|
|
|
overHidden: true,
|
|
@@ -599,6 +625,8 @@ export default {
|
|
|
{
|
|
|
label: "右超 厘米",
|
|
|
prop: "overRight",
|
|
|
+ type: 'number',
|
|
|
+ controls: false,
|
|
|
labelWidth: 100,
|
|
|
width: "120",
|
|
|
overHidden: true,
|
|
@@ -607,6 +635,8 @@ export default {
|
|
|
{
|
|
|
label: "前超 厘米",
|
|
|
prop: "overFront",
|
|
|
+ type: 'number',
|
|
|
+ controls: false,
|
|
|
labelWidth: 100,
|
|
|
width: "120",
|
|
|
overHidden: true,
|
|
@@ -615,6 +645,8 @@ export default {
|
|
|
{
|
|
|
label: "后超 厘米",
|
|
|
prop: "overBack",
|
|
|
+ type: 'number',
|
|
|
+ controls: false,
|
|
|
labelWidth: 100,
|
|
|
width: "120",
|
|
|
overHidden: true,
|
|
@@ -623,6 +655,8 @@ export default {
|
|
|
{
|
|
|
label: "超高 厘米",
|
|
|
prop: "overTop",
|
|
|
+ type: 'number',
|
|
|
+ controls: false,
|
|
|
labelWidth: 100,
|
|
|
width: "120",
|
|
|
overHidden: true,
|
|
@@ -642,7 +676,7 @@ export default {
|
|
|
this.optionDetail = await this.getColumnData(this.getColumnName(309.4), this.optionBackDetail);
|
|
|
this.bcommodityListfun()
|
|
|
this.packingUnitListfun()
|
|
|
- this.dgPackingUnitListfun()
|
|
|
+ // this.dgPackingUnitListfun()
|
|
|
this.ifInvoiceWorkDictsfun()
|
|
|
},
|
|
|
watch: {
|
|
@@ -690,6 +724,11 @@ export default {
|
|
|
},
|
|
|
// 货物明细单个保存接口
|
|
|
rowSaveDetail(row, done, loading) {
|
|
|
+ for (let key in row) {
|
|
|
+ if (row[key] == "") {
|
|
|
+ row[key] = null
|
|
|
+ }
|
|
|
+ }
|
|
|
row.billNo = this.assemblyForm.billNo
|
|
|
row.ppId = this.assemblyForm.id
|
|
|
row.pid = this.selectionList[0].id
|
|
@@ -707,12 +746,13 @@ export default {
|
|
|
this.$set(row, 'packingUnit', item.cnName)
|
|
|
}
|
|
|
}
|
|
|
- for (let item of this.dgPackingUnitData) {
|
|
|
- if (item.cnName == row.cnName) {
|
|
|
- this.$set(row, 'dgPackingUnitId', item.id)
|
|
|
- this.$set(row, 'dgPackingUnit', item.cnName)
|
|
|
- }
|
|
|
- }
|
|
|
+ // for (let item of this.dgPackingUnitData) {
|
|
|
+ // if (item.cnName == row.cnName) {
|
|
|
+ // this.$set(row, 'dgPackingUnitId', item.id)
|
|
|
+ // this.$set(row, 'dgPackingUnit', item.cnName)
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ console.log(row, 33333)
|
|
|
containerscommoditySubmit(row).then(res => {
|
|
|
this.$message.success("操作成功!");
|
|
|
this.$emit('billsDetailfun')
|
|
@@ -759,12 +799,12 @@ export default {
|
|
|
this.$set(row, 'packingUnit', item.cnName)
|
|
|
}
|
|
|
}
|
|
|
- for (let item of this.dgPackingUnitData) {
|
|
|
- if (item.cnName == row.cnName) {
|
|
|
- this.$set(row, 'dgPackingUnitId', item.id)
|
|
|
- this.$set(row, 'dgPackingUnit', item.cnName)
|
|
|
- }
|
|
|
- }
|
|
|
+ // for (let item of this.dgPackingUnitData) {
|
|
|
+ // if (item.cnName == row.cnName) {
|
|
|
+ // this.$set(row, 'dgPackingUnitId', item.id)
|
|
|
+ // this.$set(row, 'dgPackingUnit', item.cnName)
|
|
|
+ // }
|
|
|
+ // }
|
|
|
containerscommoditySubmit(row).then(res => {
|
|
|
this.$message.success("操作成功!");
|
|
|
this.$emit('billsDetailfun')
|
|
@@ -773,8 +813,8 @@ export default {
|
|
|
loading();
|
|
|
})
|
|
|
},
|
|
|
- allEdit(){
|
|
|
- this.containersCommodityList.forEach(row=>{
|
|
|
+ allEdit() {
|
|
|
+ this.containersCommodityList.forEach(row => {
|
|
|
this.$set(row, '$cellEdit', true)
|
|
|
})
|
|
|
},
|
|
@@ -812,11 +852,29 @@ export default {
|
|
|
this.$message.warning("请选择至少一条数据");
|
|
|
return;
|
|
|
}
|
|
|
+ let multiList = []
|
|
|
+ let arr = []
|
|
|
+ multiList = this.selectionDetailList
|
|
|
+ arr = this.containersCommodityList
|
|
|
let ids = [];
|
|
|
this.selectionDetailList.forEach(ele => {
|
|
|
ids.push(ele.id);
|
|
|
});
|
|
|
- this.containerscommodityRemovefun(ids.join(","))
|
|
|
+ const itemsWithId = multiList.filter(item => item.hasOwnProperty('id'));
|
|
|
+ multiList.forEach((item) => {
|
|
|
+ for (let index in arr) {
|
|
|
+ if (JSON.stringify(item) == JSON.stringify(arr[index])) {
|
|
|
+ arr.splice(Number(index), 1)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ if (itemsWithId.length != 0) {
|
|
|
+ containerscommodityRemove(ids.join(",")).then(res => {
|
|
|
+ this.$message.success("操作成功!");
|
|
|
+ this.$emit('billsDetailfun')
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
},
|
|
|
// 箱货物明细删除接口
|
|
|
containerscommodityRemovefun(id, index) {
|
|
@@ -827,6 +885,7 @@ export default {
|
|
|
}).then(() => {
|
|
|
containerscommodityRemove(id).then(res => {
|
|
|
this.$message.success("操作成功!");
|
|
|
+ this.containersCommodityList.splice(index, 1)
|
|
|
this.$emit('billsDetailfun')
|
|
|
})
|
|
|
})
|
|
@@ -846,12 +905,12 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
// 获取危险品包装单位
|
|
|
- dgPackingUnitListfun() {
|
|
|
- getBunitsList(1, 10).then(res => {
|
|
|
- this.dgPackingUnitData = res.data.data.records
|
|
|
- this.findObject(this.optionDetail.column, "dgPackingUnit").dicData = res.data.data.records
|
|
|
- })
|
|
|
- },
|
|
|
+ // dgPackingUnitListfun() {
|
|
|
+ // getBunitsList(1, 10).then(res => {
|
|
|
+ // this.dgPackingUnitData = res.data.data.records
|
|
|
+ // this.findObject(this.optionDetail.column, "dgPackingUnit").dicData = res.data.data.records
|
|
|
+ // })
|
|
|
+ // },
|
|
|
// 全部是否字典
|
|
|
ifInvoiceWorkDictsfun() {
|
|
|
getWorkDicts('ifInvoice').then(res => {
|
|
@@ -916,7 +975,6 @@ export default {
|
|
|
}
|
|
|
this.ifInvoiceWorkDictsfun()
|
|
|
this.packingUnitListfun()
|
|
|
- this.dgPackingUnitListfun()
|
|
|
},
|
|
|
//自定义列重置
|
|
|
async resetColumnTwo(ref, option, optionBack, code) {
|
|
@@ -928,7 +986,6 @@ export default {
|
|
|
}
|
|
|
this.ifInvoiceWorkDictsfun()
|
|
|
this.packingUnitListfun()
|
|
|
- this.dgPackingUnitListfun()
|
|
|
},
|
|
|
|
|
|
}
|