|
|
@@ -140,10 +140,20 @@
|
|
|
@click="rowAdd(row)"
|
|
|
>添加商品</el-button
|
|
|
>
|
|
|
- <el-button type="success" size="small" :disabled="isAddBtn||(form.id && form.status != '录入')" icon="el-icon-bottom" @click="excelDialogfun('名称')"
|
|
|
+ <el-button
|
|
|
+ type="success"
|
|
|
+ size="small"
|
|
|
+ :disabled="isAddBtn || (form.id && form.status != '录入')"
|
|
|
+ icon="el-icon-bottom"
|
|
|
+ @click="excelDialogfun('名称')"
|
|
|
>按名称导入
|
|
|
</el-button>
|
|
|
- <el-button type="success" size="small" :disabled="isAddBtn||(form.id && form.status != '录入')" icon="el-icon-bottom" @click="excelDialogfun('code')"
|
|
|
+ <el-button
|
|
|
+ type="success"
|
|
|
+ size="small"
|
|
|
+ :disabled="isAddBtn || (form.id && form.status != '录入')"
|
|
|
+ icon="el-icon-bottom"
|
|
|
+ @click="excelDialogfun('code')"
|
|
|
>按Code导入
|
|
|
</el-button>
|
|
|
<el-button type="primary" icon="el-icon-printer" size="small" @click="handlePrint">打印</el-button>
|
|
|
@@ -746,8 +756,6 @@ export default {
|
|
|
label: "电话",
|
|
|
disabled: false,
|
|
|
prop: "phone",
|
|
|
- type: "number",
|
|
|
- controls: false
|
|
|
},
|
|
|
{
|
|
|
label: "地址",
|
|
|
@@ -1300,15 +1308,15 @@ export default {
|
|
|
if (res.data.data == 1) {
|
|
|
this.findObject(this.optionContacts.column, "pattern").label = "规格型号1";
|
|
|
this.findObject(this.optionTwo.column, "brandItem").label = "规格型号1";
|
|
|
- this.findObject(this.optionTwo.column, "originalFactory").search = false;
|
|
|
- this.findObject(this.optionTwo.column, "explosionProof").search = false;
|
|
|
- this.findObject(this.optionTwo.column, "selfRecovery").search = false;
|
|
|
- this.findObject(this.optionTwo.column, "explosionProof").hide = true;
|
|
|
- this.findObject(this.optionTwo.column, "originalFactory").hide = true;
|
|
|
- this.findObject(this.optionTwo.column, "selfRecovery").hide = true;
|
|
|
- this.findObject(this.optionTwo.column, "explosionProof").showColumn = false;
|
|
|
- this.findObject(this.optionTwo.column, "originalFactory").showColumn = false;
|
|
|
- this.findObject(this.optionTwo.column, "selfRecovery").showColumn = false;
|
|
|
+ // this.findObject(this.optionTwo.column, "originalFactory").search = false;
|
|
|
+ // this.findObject(this.optionTwo.column, "explosionProof").search = false;
|
|
|
+ // this.findObject(this.optionTwo.column, "selfRecovery").search = false;
|
|
|
+ // this.findObject(this.optionTwo.column, "explosionProof").hide = true;
|
|
|
+ // this.findObject(this.optionTwo.column, "originalFactory").hide = true;
|
|
|
+ // this.findObject(this.optionTwo.column, "selfRecovery").hide = true;
|
|
|
+ // this.findObject(this.optionTwo.column, "explosionProof").showColumn = false;
|
|
|
+ // this.findObject(this.optionTwo.column, "originalFactory").showColumn = false;
|
|
|
+ // this.findObject(this.optionTwo.column, "selfRecovery").showColumn = false;
|
|
|
}
|
|
|
});
|
|
|
this.findObject(this.optionContacts.column, "goodsId").change = ({ value, column }) => {
|
|
|
@@ -1923,70 +1931,67 @@ export default {
|
|
|
this.$set(this.optionForm, "disabled", true);
|
|
|
this.$set(this.optionContactsBack, "disabled", true);
|
|
|
this.$refs["form"].validate((valid, done) => {
|
|
|
+ done();
|
|
|
if (valid) {
|
|
|
- this.$refs["form"].validate((valid, done) => {
|
|
|
- done();
|
|
|
- if (valid) {
|
|
|
- const loading = this.$loading({
|
|
|
- lock: true,
|
|
|
- text: "加载中",
|
|
|
- spinner: "el-icon-loading",
|
|
|
- background: "rgba(255,255,255,0.7)"
|
|
|
- });
|
|
|
- inboundTask({
|
|
|
- bsType: "CG",
|
|
|
- ...this.form
|
|
|
- })
|
|
|
- .then(res => {
|
|
|
- this.refresh(res.data.data.id);
|
|
|
- // this.isDisabledTask = false
|
|
|
- this.editButton = true;
|
|
|
- this.isDisabledTask = true;
|
|
|
- // 将按钮文本更改为"撤销任务"
|
|
|
- this.buttonText = "撤销任务";
|
|
|
- // 将按钮颜色更改为对应的颜色
|
|
|
- this.buttonColor = "warning"; // 比如改为warning
|
|
|
- this.refresh(res.data.data.id, true);
|
|
|
- this.isContacts = true;
|
|
|
- this.isAdd = true;
|
|
|
- this.isDisabled = true;
|
|
|
- // this.findObject(this.optionForm,'disabled') = true
|
|
|
- // this.findObject(this.optionContactsBack,'disabled') = true
|
|
|
- this.$message.success("生成入库任务成功");
|
|
|
- this.isApplySettlement = false;
|
|
|
- loading.close();
|
|
|
-
|
|
|
- // generateShipTask(this.form).then(res => {
|
|
|
- // console.log(res.data);
|
|
|
- // // 将按钮文本更改为"撤销任务"
|
|
|
- // this.buttonText = '撤销任务';
|
|
|
- // // 将按钮颜色更改为对应的颜色
|
|
|
- // this.buttonColor = 'warning'; // 比如改为warning
|
|
|
- // this.refresh(res.data.data.id, true)
|
|
|
- // this.isContacts = true
|
|
|
- // this.isAdd = true
|
|
|
- // this.isDisabled = true
|
|
|
- // // this.findObject(this.optionForm,'disabled') = true
|
|
|
- // // this.findObject(this.optionContactsBack,'disabled') = true
|
|
|
- // this.$message.success("生成入库任务成功");
|
|
|
- // this.isApplySettlement = false
|
|
|
- // loading.close();
|
|
|
- //
|
|
|
- // }).finally(() => {
|
|
|
- // loading.close();
|
|
|
- // });
|
|
|
- })
|
|
|
- .finally(() => {
|
|
|
- loading.close();
|
|
|
- });
|
|
|
- } else {
|
|
|
- return false;
|
|
|
+ for (let i in this.form.orderItemsList) {
|
|
|
+ if (this.form.orderItemsList[i].goodsNum <= 0) {
|
|
|
+ return this.$message.warning(`采购明细序号${Number(i) + 1}的数量不能为零`);
|
|
|
}
|
|
|
+ }
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: "加载中",
|
|
|
+ spinner: "el-icon-loading",
|
|
|
+ background: "rgba(255,255,255,0.7)"
|
|
|
});
|
|
|
+ inboundTask({
|
|
|
+ bsType: "CG",
|
|
|
+ ...this.form
|
|
|
+ })
|
|
|
+ .then(res => {
|
|
|
+ this.refresh(res.data.data.id);
|
|
|
+ // this.isDisabledTask = false
|
|
|
+ this.editButton = true;
|
|
|
+ this.isDisabledTask = true;
|
|
|
+ // 将按钮文本更改为"撤销任务"
|
|
|
+ this.buttonText = "撤销任务";
|
|
|
+ // 将按钮颜色更改为对应的颜色
|
|
|
+ this.buttonColor = "warning"; // 比如改为warning
|
|
|
+ this.refresh(res.data.data.id, true);
|
|
|
+ this.isContacts = true;
|
|
|
+ this.isAdd = true;
|
|
|
+ this.isDisabled = true;
|
|
|
+ // this.findObject(this.optionForm,'disabled') = true
|
|
|
+ // this.findObject(this.optionContactsBack,'disabled') = true
|
|
|
+ this.$message.success("生成入库任务成功");
|
|
|
+ this.isApplySettlement = false;
|
|
|
+ loading.close();
|
|
|
|
|
|
- done();
|
|
|
+ // generateShipTask(this.form).then(res => {
|
|
|
+ // console.log(res.data);
|
|
|
+ // // 将按钮文本更改为"撤销任务"
|
|
|
+ // this.buttonText = '撤销任务';
|
|
|
+ // // 将按钮颜色更改为对应的颜色
|
|
|
+ // this.buttonColor = 'warning'; // 比如改为warning
|
|
|
+ // this.refresh(res.data.data.id, true)
|
|
|
+ // this.isContacts = true
|
|
|
+ // this.isAdd = true
|
|
|
+ // this.isDisabled = true
|
|
|
+ // // this.findObject(this.optionForm,'disabled') = true
|
|
|
+ // // this.findObject(this.optionContactsBack,'disabled') = true
|
|
|
+ // this.$message.success("生成入库任务成功");
|
|
|
+ // this.isApplySettlement = false
|
|
|
+ // loading.close();
|
|
|
+ //
|
|
|
+ // }).finally(() => {
|
|
|
+ // loading.close();
|
|
|
+ // });
|
|
|
+ })
|
|
|
+ .finally(() => {
|
|
|
+ loading.close();
|
|
|
+ });
|
|
|
} else {
|
|
|
- this.$message.error("请选择仓库");
|
|
|
+ return false;
|
|
|
}
|
|
|
});
|
|
|
}
|