|
@@ -84,6 +84,7 @@
|
|
|
<span v-for="item in $refs.crud.DIC.status" :style="{color: item.colour}" v-if="item.dictKey == row.status">{{item.dictValue}}</span>
|
|
|
</template>
|
|
|
<template slot="menuLeft" slot-scope="scope">
|
|
|
+ <el-button type="primary" size="small" @click="rowaddfun">录入明细</el-button>
|
|
|
<el-button type="success" size="small" :disabled="option.disabled" @click="importBox">提取</el-button>
|
|
|
<el-button :disabled="option.disabled" type="success" size="small" icon="el-icon-bottom" @click="importBoxTwo">导入</el-button>
|
|
|
<el-button class="el-icon-download" type="info" size="small" :disabled="!form.id" @click="openReport">报表打印</el-button>
|
|
@@ -668,7 +669,7 @@ export default {
|
|
|
selection: true,
|
|
|
addBtnText: "录入明细",
|
|
|
refreshBtn: false,
|
|
|
- addBtn: true,
|
|
|
+ addBtn: false,
|
|
|
span: 8,
|
|
|
searchMenuSpan: 18,
|
|
|
addRowBtn: false,
|
|
@@ -849,7 +850,9 @@ export default {
|
|
|
tradingBoxFilesList: [],
|
|
|
selectionList: [],
|
|
|
disabled: false,
|
|
|
- costData: {}
|
|
|
+ costData: {},
|
|
|
+ // 保存数据的次数
|
|
|
+ baocunindex:0
|
|
|
}
|
|
|
},
|
|
|
async created() {
|
|
@@ -928,11 +931,11 @@ export default {
|
|
|
this.$set(this.optionForm, "disabled", false)
|
|
|
//箱信息
|
|
|
this.$set(this.option, "disabled", false)
|
|
|
- this.$set(this.option, "addBtn", true)
|
|
|
+ // this.$set(this.option, "addBtn", true)
|
|
|
this.$set(this.option, "menu", true)
|
|
|
//费用信息
|
|
|
this.$set(this.$refs.boxCost.option, "disabled", false)
|
|
|
- this.$set(this.$refs.boxCost.option, "addBtn", true)
|
|
|
+ // this.$set(this.$refs.boxCost.option, "addBtn", true)
|
|
|
this.$set(this.$refs.boxCost.option, "menu", true)
|
|
|
//附件和顶部按钮
|
|
|
this.disabled = false
|
|
@@ -971,6 +974,7 @@ export default {
|
|
|
this.dataList = this.dataList.concat(res.transportItemList)
|
|
|
this.dataListTwo = this.dataListTwo.concat(res.transportItemFeesList)
|
|
|
this.$message.success("导入成功!");
|
|
|
+ this.baocunindex = 1
|
|
|
loading = false;
|
|
|
done();
|
|
|
},
|
|
@@ -1020,6 +1024,9 @@ export default {
|
|
|
exchangeRate: item.exchangeRate || 1,
|
|
|
amount: item.amount
|
|
|
})
|
|
|
+
|
|
|
+ this.transportItemSubmitfunfun(item)
|
|
|
+
|
|
|
loading.close();
|
|
|
}).catch(()=>{
|
|
|
loading.close();
|
|
@@ -1050,6 +1057,7 @@ export default {
|
|
|
});
|
|
|
generateStack(data).then(res => {
|
|
|
this.$message.success("生成堆存成功")
|
|
|
+ this.baocunindex = 1
|
|
|
this.dialogVisible = false
|
|
|
this.disabledVisible = false
|
|
|
this.formState = {}
|
|
@@ -1377,11 +1385,11 @@ export default {
|
|
|
this.$set(this.optionForm, "disabled", false)
|
|
|
//箱信息
|
|
|
this.$set(this.option, "disabled", false)
|
|
|
- this.$set(this.option, "addBtn", true)
|
|
|
+ // this.$set(this.option, "addBtn", true)
|
|
|
this.$set(this.option, "menu", true)
|
|
|
//费用信息
|
|
|
this.$set(this.$refs.boxCost.option, "disabled", false)
|
|
|
- this.$set(this.$refs.boxCost.option, "addBtn", true)
|
|
|
+ // this.$set(this.$refs.boxCost.option, "addBtn", true)
|
|
|
this.$set(this.$refs.boxCost.option, "menu", true)
|
|
|
//附件和顶部按钮
|
|
|
this.disabled = false
|
|
@@ -1444,6 +1452,7 @@ export default {
|
|
|
} else {
|
|
|
this.$message.success("新增成功")
|
|
|
}
|
|
|
+ this.baocunindex = 0
|
|
|
loading.close();
|
|
|
this.refresh(res.data.data.id)
|
|
|
}).catch(()=>{
|
|
@@ -1452,6 +1461,21 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ // 箱信息添加
|
|
|
+ rowaddfun(){
|
|
|
+ this.$refs["form"].validate((valid,done) => {
|
|
|
+ if (valid) {
|
|
|
+ const idp = this.form.id?this.form.id:this.onLoad.id
|
|
|
+ if (!idp) {
|
|
|
+ return this.$message.warning('请先填写保存数据');
|
|
|
+ }else {
|
|
|
+ this.$refs.crud.rowAdd()
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ return this.$message.warning('请先填写基础信息');
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
// 箱信息数据
|
|
|
rowSave(form, done, loading) {
|
|
|
let result = this.dataList.some((item) => {
|
|
@@ -1540,6 +1564,7 @@ export default {
|
|
|
pid:this.form.id,
|
|
|
}).then(res=>{
|
|
|
this.$message.success("操作成功!");
|
|
|
+ this.baocunindex = 1
|
|
|
this.xiangpagefun(this.page)
|
|
|
})
|
|
|
},
|
|
@@ -1549,6 +1574,10 @@ export default {
|
|
|
},
|
|
|
backToList(type) {
|
|
|
if (type == 0){
|
|
|
+ console.log(this.baocunindex,1246)
|
|
|
+ if (this.baocunindex != 0) {
|
|
|
+ return this.$message.warning('请先填写保存数据');
|
|
|
+ }
|
|
|
if (this.detailData.id){
|
|
|
this.$router.push({
|
|
|
path: '/boxManagement/importReturnTrip/index'
|
|
@@ -1596,11 +1625,11 @@ export default {
|
|
|
this.$set(this.optionForm, "disabled", false)
|
|
|
//箱信息
|
|
|
this.$set(this.option, "disabled", false)
|
|
|
- this.$set(this.option, "addBtn", true)
|
|
|
+ // this.$set(this.option, "addBtn", true)
|
|
|
this.$set(this.option, "menu", true)
|
|
|
//费用信息
|
|
|
this.$set(this.$refs.boxCost.option, "disabled", false)
|
|
|
- this.$set(this.$refs.boxCost.option, "addBtn", true)
|
|
|
+ // this.$set(this.$refs.boxCost.option, "addBtn", true)
|
|
|
this.$set(this.$refs.boxCost.option, "menu", true)
|
|
|
//附件和顶部按钮
|
|
|
this.disabled = false
|
|
@@ -1610,11 +1639,11 @@ export default {
|
|
|
this.$set(this.optionForm, "disabled", false)
|
|
|
//箱信息
|
|
|
this.$set(this.option, "disabled", false)
|
|
|
- this.$set(this.option, "addBtn", true)
|
|
|
+ // this.$set(this.option, "addBtn", true)
|
|
|
this.$set(this.option, "menu", true)
|
|
|
//费用信息
|
|
|
this.$set(this.$refs.boxCost.option, "disabled", false)
|
|
|
- this.$set(this.$refs.boxCost.option, "addBtn", true)
|
|
|
+ // this.$set(this.$refs.boxCost.option, "addBtn", true)
|
|
|
this.$set(this.$refs.boxCost.option, "menu", true)
|
|
|
//附件和顶部按钮
|
|
|
this.disabled = false
|