单据类型相关修改

ywj_dev
anthonywj 2 years ago
parent 63ea8e6fb8
commit 35128c8d73

@ -222,6 +222,7 @@ export default {
vailDispatch: null,
vailGroupBuy: null,
inStock: null,
actionType: null,
},
enableMap: {
true: "是",
@ -299,6 +300,22 @@ export default {
this.$message.error("出入库类型不能为空!");
return;
}
if (isBlank(this.inputQuery.name)) {
this.$message.error("单据类型名称不能为空!");
return;
}
if (isBlank(this.inputQuery.actionType)) {
this.$message.error("请选择单据类型!");
return;
}
if (isBlank(this.inputQuery.inStock)) {
this.$message.error("请选择是否更改库存!");
return;
}
if (isBlank(this.inputQuery.busType)) {
this.$message.error("请选择特定页面!");
return;
}
insertBusType(this.inputQuery)
.then((response) => {
if (response.code == 20000) {
@ -315,14 +332,32 @@ export default {
},
onModifySubmit() {
if (this.inputQuery.name == "" || this.inputQuery.name == null) {
this.$message.error("单据类型不能为空!");
if (isBlank(this.inputQuery.name)) {
this.$message.error("单据类型名称不能为空!");
return;
}
if (this.inputQuery.mainAction == "" || this.inputQuery.mainAction == null) {
this.$message.error("出入库类型不能为空!");
return;
}
if (isBlank(this.inputQuery.name)) {
this.$message.error("单据类型名称不能为空!");
return;
}
if (isBlank(this.inputQuery.actionType)) {
this.$message.error("请选择单据类型!");
return;
}
if (isBlank(this.inputQuery.inStock)) {
this.$message.error("请选择是否更改库存!");
return;
}
if (isBlank(this.inputQuery.busType)) {
this.$message.error("请选择特定页面!");
return;
}
updateBusType(this.inputQuery)
.then((response) => {
if (response.code == 20000) {
@ -414,7 +449,8 @@ export default {
preInBack: null,
vailDispatch: null,
vailGroupBuy: null,
inStock:null,
inStock: null,
actionType: null,
}
this.addDialogVisible = true;
},

@ -28,7 +28,35 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="11" type="flex">
<el-form-item label="单据类型" prop="actionType">
<el-select v-model="inputQuery.actionType"
size="small"
style="width: 90%"
placeholder="请选择单据类型"
>
<el-option label="带票" :value="1"></el-option>
<el-option label="预验收" :value="2"></el-option>
<el-option label="寄售" :value="3"></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex">
<el-col :span="11" class="el-col">
<el-form-item label="是否更改库存" prop="inStock">
<el-select v-model="inputQuery.inStock"
size="small"
style="width: 90%"
placeholder=""
>
<el-option label="是" :value="true"></el-option>
<el-option label="否" :value="false"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="11" type="flex">
<el-form-item label="特定页面" prop="busType">
<el-select v-model="inputQuery.busType"
@ -39,29 +67,29 @@
<el-option label="无" :value="1"></el-option>
<el-option label="送货单管理" :value="2"></el-option>
<el-option label="到货单管理" :value="3"></el-option>
<el-option label="退货单管理" :value="4"></el-option>
</el-select>
</el-form-item>
</el-col>
<!-- <el-col :span="11">-->
<!-- <el-form-item label="往来信息类型" prop="corpType">-->
<!-- <el-select v-model="inputQuery.corpType"-->
<!-- size="small"-->
<!-- style="width: 90%"-->
<!-- placeholder="往来信息"-->
<!-- @change="corpTypeChange">-->
<!-- <el-option-->
<!-- v-for="item in options"-->
<!-- :key="item.value"-->
<!-- :label="item.label"-->
<!-- :value="item.value">-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
</el-row>
<!-- <el-col :span="11">-->
<!-- <el-form-item label="往来信息类型" prop="corpType">-->
<!-- <el-select v-model="inputQuery.corpType"-->
<!-- size="small"-->
<!-- style="width: 90%"-->
<!-- placeholder="往来信息"-->
<!-- @change="corpTypeChange">-->
<!-- <el-option-->
<!-- v-for="item in options"-->
<!-- :key="item.value"-->
<!-- :label="item.label"-->
<!-- :value="item.value">-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-row type="flex">-->
<!-- <el-col :span="11">-->
<!-- <el-form-item label="内部进出平衡补单" prop="supplementOrderType">-->
@ -108,18 +136,7 @@
<!-- </el-row>-->
<el-row type="flex">
<el-col :span="11" class="el-col">
<el-form-item label="是否更改库存" prop="inStock">
<el-select v-model="inputQuery.inStock"
size="small"
style="width: 90%"
placeholder=""
>
<el-option label="是" :value="true"></el-option>
<el-option label="否" :value="false"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item label="单据前缀" prop="prefix">
@ -181,7 +198,6 @@
</el-col>
</el-row>
</el-form>
<el-dialog
title="单据类型高级设置"
:visible.sync="settingDialogVisible"
@ -194,7 +210,6 @@
append-to-body
>
<busTypeAdvancedSettings :inputQuery="inputQuery"></busTypeAdvancedSettings>
<div slot="footer" class="dialog-footer">
<el-button type="primary" size="small" @click="saveSettings"
>提交
@ -233,7 +248,37 @@ export default {
data() {
return {
formRules: {},
formRules: {
name: [{required: true, message: "请输入单据类型名称", trigger: "blur"}],
mainAction: [
{
required: true,
message: "请选择出入库类型",
trigger: "change"
}
],
actionType: [
{
required: true,
message: "请选择单据类型",
trigger: "change"
}
],
inStock: [
{
required: true,
message: "请选择是否更改库存",
trigger: "change"
}
],
busType: [
{
required: true,
message: "请选择特定页面",
trigger: "change"
}
],
},
filterQuery: {
enabled: true,
isBuType: true,
@ -337,15 +382,18 @@ export default {
cancelDialog() {
this.settingDialogVisible = false;
},
},
}
,
computed: {
corpType() {
return this.inputQuery.corpType;
}
},
}
,
components: {
busTypeAdvancedSettings
},
}
,
watch: {
corpType: function (val) {
if (val != 1) {
@ -355,7 +403,8 @@ export default {
this.inputQuery.orderTypeEnable = false;
}
}
},
}
,
created() {
if (this.inputQuery.mainAction != null && this.inputQuery.mainAction != "") {
@ -364,8 +413,10 @@ export default {
this.getList();
this.findSpecialMethod();
this.oldData = Object.assign({}, this.inputQuery);
},
};
}
,
}
;
</script>
<style scoped>

Loading…
Cancel
Save