单据类型相关修改

ywj_dev
anthonywj 2 years ago
parent 63ea8e6fb8
commit 35128c8d73

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

@ -28,7 +28,35 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </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-col :span="11" type="flex">
<el-form-item label="特定页面" prop="busType"> <el-form-item label="特定页面" prop="busType">
<el-select v-model="inputQuery.busType" <el-select v-model="inputQuery.busType"
@ -39,10 +67,11 @@
<el-option label="无" :value="1"></el-option> <el-option label="无" :value="1"></el-option>
<el-option label="送货单管理" :value="2"></el-option> <el-option label="送货单管理" :value="2"></el-option>
<el-option label="到货单管理" :value="3"></el-option> <el-option label="到货单管理" :value="3"></el-option>
<el-option label="退货单管理" :value="4"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row>
<!-- <el-col :span="11">--> <!-- <el-col :span="11">-->
<!-- <el-form-item label="往来信息类型" prop="corpType">--> <!-- <el-form-item label="往来信息类型" prop="corpType">-->
@ -60,7 +89,6 @@
<!-- </el-select>--> <!-- </el-select>-->
<!-- </el-form-item>--> <!-- </el-form-item>-->
<!-- </el-col>--> <!-- </el-col>-->
</el-row>
<!-- <el-row type="flex">--> <!-- <el-row type="flex">-->
<!-- <el-col :span="11">--> <!-- <el-col :span="11">-->
@ -108,18 +136,7 @@
<!-- </el-row>--> <!-- </el-row>-->
<el-row type="flex"> <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-col :span="11">
<el-form-item label="单据前缀" prop="prefix"> <el-form-item label="单据前缀" prop="prefix">
@ -181,7 +198,6 @@
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
<el-dialog <el-dialog
title="单据类型高级设置" title="单据类型高级设置"
:visible.sync="settingDialogVisible" :visible.sync="settingDialogVisible"
@ -194,7 +210,6 @@
append-to-body append-to-body
> >
<busTypeAdvancedSettings :inputQuery="inputQuery"></busTypeAdvancedSettings> <busTypeAdvancedSettings :inputQuery="inputQuery"></busTypeAdvancedSettings>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" size="small" @click="saveSettings" <el-button type="primary" size="small" @click="saveSettings"
>提交 >提交
@ -233,7 +248,37 @@ export default {
data() { data() {
return { 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: { filterQuery: {
enabled: true, enabled: true,
isBuType: true, isBuType: true,
@ -337,15 +382,18 @@ export default {
cancelDialog() { cancelDialog() {
this.settingDialogVisible = false; this.settingDialogVisible = false;
}, },
}, }
,
computed: { computed: {
corpType() { corpType() {
return this.inputQuery.corpType; return this.inputQuery.corpType;
} }
}, }
,
components: { components: {
busTypeAdvancedSettings busTypeAdvancedSettings
}, }
,
watch: { watch: {
corpType: function (val) { corpType: function (val) {
if (val != 1) { if (val != 1) {
@ -355,7 +403,8 @@ export default {
this.inputQuery.orderTypeEnable = false; this.inputQuery.orderTypeEnable = false;
} }
} }
}, }
,
created() { created() {
if (this.inputQuery.mainAction != null && this.inputQuery.mainAction != "") { if (this.inputQuery.mainAction != null && this.inputQuery.mainAction != "") {
@ -364,8 +413,10 @@ export default {
this.getList(); this.getList();
this.findSpecialMethod(); this.findSpecialMethod();
this.oldData = Object.assign({}, this.inputQuery); this.oldData = Object.assign({}, this.inputQuery);
}, }
}; ,
}
;
</script> </script>
<style scoped> <style scoped>

Loading…
Cancel
Save