|
@@ -78,7 +78,7 @@
|
|
<el-button type="primary" @click="onSubmit('form', '2-')" v-if="(form.status == '1' || form.status == '2-') && status == '1'">
|
|
<el-button type="primary" @click="onSubmit('form', '2-')" v-if="(form.status == '1' || form.status == '2-') && status == '1'">
|
|
添加保存
|
|
添加保存
|
|
</el-button>
|
|
</el-button>
|
|
- <el-button type="primary" @click="onSubmit('form', '3')" v-if="form.status == '2'"> 确认收货 </el-button>
|
|
|
|
|
|
+ <el-button type="primary" @click="onConfirm('3')" v-if="form.status == '2'"> 确认收货 </el-button>
|
|
<el-button type="primary" @click="onSubmit('form', '2')" v-if="form.status == '2'"> 保存 </el-button>
|
|
<el-button type="primary" @click="onSubmit('form', '2')" v-if="form.status == '2'"> 保存 </el-button>
|
|
</el-col>
|
|
</el-col>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -268,7 +268,8 @@ export default {
|
|
let form = this.form;
|
|
let form = this.form;
|
|
let newList = list.filter((i) => i.id != data.id);
|
|
let newList = list.filter((i) => i.id != data.id);
|
|
form.transport = newList;
|
|
form.transport = newList;
|
|
- this.$set(this, `transport`, newList);
|
|
|
|
|
|
+ // this.transport = newList;
|
|
|
|
+ // this.$set(this, `transport`, newList);
|
|
let res;
|
|
let res;
|
|
if (form.id) res = await this.update(form);
|
|
if (form.id) res = await this.update(form);
|
|
if (this.$checkRes(res)) {
|
|
if (this.$checkRes(res)) {
|
|
@@ -277,6 +278,22 @@ export default {
|
|
}
|
|
}
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
+ async onConfirm(val) {
|
|
|
|
+ this.$confirm('是否确认收货', '提示', {
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ }).then(async () => {
|
|
|
|
+ var form = this.form;
|
|
|
|
+ var res;
|
|
|
|
+ form.status = val;
|
|
|
|
+ if (form.id) res = await this.update(form);
|
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
|
+ this.$message({ type: `success`, message: `维护信息成功` });
|
|
|
|
+ this.search();
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ },
|
|
// 提交
|
|
// 提交
|
|
async onSubmit(formName, val) {
|
|
async onSubmit(formName, val) {
|
|
this.$refs[formName].validate(async (valid) => {
|
|
this.$refs[formName].validate(async (valid) => {
|
|
@@ -306,11 +323,11 @@ export default {
|
|
}
|
|
}
|
|
var res;
|
|
var res;
|
|
if (val != undefined || val != '') {
|
|
if (val != undefined || val != '') {
|
|
- // if (this.goodsList.length == 0) {
|
|
|
|
- // form.status = '2';
|
|
|
|
- // } else {
|
|
|
|
- form.status = val;
|
|
|
|
- // }
|
|
|
|
|
|
+ if (this.goodsList.length == 0) {
|
|
|
|
+ form.status = '2';
|
|
|
|
+ } else {
|
|
|
|
+ form.status = val;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
if (form.id) res = await this.update(form);
|
|
if (form.id) res = await this.update(form);
|
|
if (this.$checkRes(res)) {
|
|
if (this.$checkRes(res)) {
|