7/2 基础数据

演示数据2.0
wangwei 9 months ago
parent 48fe52f69f
commit 98e7a7b264

@ -102,7 +102,7 @@
</el-col>
<el-col :span="4" :offset="14" >
<el-button-group >
<el-button type="primary" @click.native="save()" :loading="loading">保存</el-button>
<el-button type="primary" @click.native="save()" :loading="saveLoading">保存</el-button>
</el-button-group>
</el-col>
</el-row>
@ -153,13 +153,16 @@ export default {
children: "children",
label: "label"
},
saveLoading: false,
}
},
methods: {
save(){
this.addData.deptCategory = this.getDeptAllCheckedKeys()
this.saveLoading = true
updateBindCategory(this.addData).then((response) => {
if (response.code == 20000) {
this.saveLoading = false
this.selectDialog = !this.selectDialog
this.getData(this.query.deptCode)
this.$message.success("保存成功");
@ -167,6 +170,7 @@ export default {
this.$message.error(response.message);
}
}).catch(() => {
this.saveLoading = false
this.$message.error("保存失败");
});
},

@ -30,7 +30,7 @@
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button>
<el-button type="primary" icon="el-icon-search" @click="search"></el-button>
<el-button type="primary" icon="el-icon-plus" @click.native="handleForm(null, null)"
:disabled="!configParms.basicCorp">新增
:disabled="!configParms.basicCorp" >新增
</el-button>
<el-button type="primary" icon="el-icon-bottom-right" @click="intentDetail"></el-button>
</el-button-group>

@ -3,7 +3,7 @@
<el-card>
<el-button-group style="display: flex">
<el-button type="primary" @click.native="submitUpload()" style="margin: 0 60px 10px auto; height: 35px"
:loading="loading">提交
:loading="submitLoading">提交
</el-button>
</el-button-group>
<el-form :model="filterQuery" class="query-form" size="mini" label-width="120px" v-if="showSearch">
@ -215,6 +215,7 @@ export default {
},
],
},
submitLoading: false,
};
},
methods: {
@ -390,7 +391,9 @@ export default {
var query = {
billNo: this.filterQuery.billNo
}
this.submitLoading = true
addDestinyProcess(query).then((response) => {
this.submitLoading = false
if (response.code == 20000) {
this.closeDialogpr()
} else {
@ -398,6 +401,7 @@ export default {
}
})
.catch(() => {
this.submitLoading = false
this.$message.error(response.message);
});
}

@ -43,7 +43,7 @@
</el-col>
</el-row>
<div style="text-align: center; margin-top: 10px;">
<el-button type="primary" size="small" icon="search" @click="onModifySubmit"></el-button>
<el-button type="primary" size="small" icon="search" @click="onModifySubmit" :loading="submitLoading">提交</el-button>
<el-button type="primary" size="small" icon="search" @click="closeDialog"></el-button>
</div>
</el-card>
@ -81,6 +81,7 @@ export default {
code: null,
remark: null,
},
submitLoading: false
};
},
methods: {
@ -91,25 +92,30 @@ export default {
if (isBlank(this.editLogin.code)) {
return this.$message.error("模板编号不能为空");
}
this.submitLoading = true
if (this.editLogin.id != null) {
editModeldestiny(this.editLogin).then(res => {
this.submitLoading = false
if (res.code == 20000) {
this.closeDialog();
} else {
this.$message.error(res.message);
}
}).catch(() => {
this.submitLoading = false
this.$message.error("编辑失败!");
});
} else {
this.editLogin.type = this.type
addModeldestiny(this.editLogin).then(res => {
this.submitLoading = false
if (res.code == 20000) {
this.closeDialog();
} else {
this.$message.error(res.message);
}
}).catch(() => {
this.submitLoading = false
this.$message.error("提交失败!");
});
}

@ -78,7 +78,7 @@
<el-button icon="el-icon-view" type="primary" @click="hideSearch">/</el-button>
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button>
<el-button type="primary" icon="el-icon-search" @click="search"></el-button>
<el-button type="primary" icon="el-icon-plus" @click="confirmSelect"></el-button>
<el-button type="primary" icon="el-icon-plus" @click="confirmSelect" :loading="confirmLoading">确定</el-button>
</el-button-group>
</div>
<el-divider style="margin: 15px"></el-divider>
@ -305,16 +305,16 @@ export default {
this.combine();
},
combine() {
this.loading = true;
this.confirmLoading = true;
addModeldestinyProduct({pId: this.editQuery.id, list: this.lists}).then((response) => {
this.loading = false;
this.confirmLoading = false;
if (response.code === 20000) {
this.closeDialog(response.data);
} else {
this.$message.error(response.message);
}
}).catch(() => {
this.loading = false;
this.confirmLoading = false;
});
},
},

@ -70,8 +70,8 @@
<el-button icon="el-icon-view" type="primary" @click="hideSearch">/</el-button>
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button>
<el-button type="primary" icon="el-icon-search" @click="submit"></el-button>
<el-button type="primary" icon="el-icon-plus" @click="instentProduct"></el-button>
<el-button type="primary" icon="el-icon-search" @click="SelectInstentProduct"></el-button>
<el-button type="primary" icon="el-icon-plus" @click="instentProduct" :loading="instentLoading">选入</el-button>
<el-button type="primary" icon="el-icon-search" @click="SelectInstentProduct" :loading="SelectInstentLoading">查询选入</el-button>
</el-button-group>
@ -135,6 +135,8 @@ export default {
},
productList: [],
loading: false,
instentLoading: false,
SelectInstentLoading: false,
showSearch: true,
productType: null,
editQuery: null,
@ -188,6 +190,7 @@ export default {
}
this.filterQuery.page = 1;
this.SelectInstentLoading = true
this.getselectList();
},
@ -226,6 +229,7 @@ export default {
getselectList(){
SelectproductList(this.filterQuery)
.then((res) =>{
this.SelectInstentLoading = false
if(res.code == 20000){
this.$message.success("选入成功!");
this.closeDialog();
@ -259,7 +263,9 @@ export default {
}
var ids = this.productList.map((item) => item.id)
var data = {code: this.rId, ids: ids}
this.instentLoading = true
saveRel(data).then((response) => {
this.instentLoading = false
if (response.code == 20000) {
this.$message.success("选入成功!");
this.closeDialog();
@ -267,6 +273,7 @@ export default {
this.$message.error(response.message);
}
}).catch(() => {
this.instentLoading = false
});
},

@ -1684,6 +1684,7 @@
size="small"
icon="search"
@click="onAddSubmit(false)"
:loading="onAddLoading"
>提交
</el-button>
<el-button
@ -2035,6 +2036,7 @@ export default {
useNumEnable: true,
vueRouteSource: 1, // 1:2
isSelect: false,
onAddLoading: false,
};
},
filters: {
@ -2513,8 +2515,10 @@ export default {
onAddSubmit(relSubmit) {
this.editFormat.relSubmit = relSubmit;
console.log(this.editFormat);
this.onAddLoading = true
updatetUdiInfos(this.editFormat)
.then((response) => {
this.onAddLoading = false
if (response.code == 20000) {
this.getList();
this.cancelDialog();
@ -2524,6 +2528,7 @@ export default {
}
})
.catch(() => {
this.onAddLoading = false
this.cancelDialog();
});
},

@ -162,7 +162,7 @@
</el-col>
</el-row>
<div style="text-align: center; margin-bottom: 10px;">
<el-button type="primary" @click="saveNewProduct"></el-button>
<el-button type="primary" @click="saveNewProduct" :loading="saveLoading">提交</el-button>
<el-button type="primary" @click="closeAddDialog"></el-button>
</div>
</el-form>
@ -205,6 +205,7 @@ export default {
},
thirdSys: [],
classifyList: [],
saveLoading: false,
}
},
@ -279,8 +280,9 @@ export default {
this.$message.warning('产品属性不能为空!')
return
}
this.saveLoading = true
addProduct(this.newProductData).then((res) => {
this.saveLoading = false
if (res.code == 20000) {
this.$message.success('添加成功')
//
@ -289,6 +291,7 @@ export default {
this.$message.error(res.message)
}
}).catch((error) => {
this.saveLoading = false
this.$message.error(error.message)
})
},

@ -519,6 +519,7 @@
<el-button
type="primary"
@click.native="forInvSubmit()"
:loading="subLoading"
>提交
</el-button
>
@ -1574,6 +1575,7 @@ export default {
limit: 20,
zczbhhzbapzbh: null,
},
subLoading: false,
};
},
filters: {},
@ -1797,8 +1799,10 @@ export default {
this.$message.error("名称不能为空!");
return
}
this.subLoading = true
if (this.subData.id != null) {
uodateBasicHospType(this.subData).then((response) => {
this.subLoading = false
if (response.code == 20000) {
this.subFormVisible = false;
this.getTerrList();
@ -1806,10 +1810,12 @@ export default {
this.$message.error(response.message);
}
}).catch(() => {
this.subLoading = false
this.subFormVisible = false;
});
} else {
saveBasicHospType(this.subData).then((response) => {
this.subLoading = false
if (response.code == 20000) {
this.subFormVisible = false;
this.getTerrList();
@ -1817,6 +1823,7 @@ export default {
this.$message.error(response.message);
}
}).catch(() => {
this.subLoading = false
this.subFormVisible = false;
});
}

@ -739,7 +739,7 @@
></product-single-edit>
<div style="text-align: center;margin-top: 12px">
<el-button type="primary" size="small" icon="search" @click="onAddSingleSubmit(false)"
<el-button type="primary" size="small" icon="search" @click="onAddSingleSubmit(false)" :loading="addLoading"
>提交
</el-button>
<el-button type="primary" size="small" icon="search" @click="cancelDialog"
@ -824,6 +824,7 @@ export default {
nameCode: null
},
classifyList: [],
addLoading: false,
}
},
components: {
@ -970,8 +971,10 @@ export default {
this.editSingleDiDialogVisible = true;
},
onAddSingleSubmit() {
this.addLoading = true
updatetSingleUdiInfo(this.editSingleFormat)
.then((response) => {
this.addLoading = false
if (response.code == 20000) {
let ttquery = {
id: this.relevanceEdit.id
@ -983,6 +986,7 @@ export default {
}
})
.catch(() => {
this.addLoading = false
this.cancelDialog();
});
},

@ -92,6 +92,7 @@
<el-button
type="primary"
@click.native="forInvSubmit()"
:loading="submitLoading"
>提交
</el-button
>
@ -193,6 +194,7 @@ export default {
subTotal: 0,
sysList: [],
sysSubList: [],
submitLoading: false,
};
},
methods: {
@ -266,7 +268,9 @@ export default {
return
}
if(this.subData.id!=null){
this.submitLoading = true
uodateBasicHospType(this.subData).then((response) => {
this.submitLoading = false
if (response.code == 20000) {
this.subFormVisible = false;
this.getList();
@ -274,6 +278,7 @@ export default {
this.$message.error(response.message);
}
}).catch(() => {
this.submitLoading = false
this.subFormVisible = false;
});
}else{

@ -6,7 +6,7 @@
<el-button
type="primary"
@click.native="saveOrder('1')"
:loading="loading"
:loading="saveLoading"
>提交单据
</el-button
>
@ -184,6 +184,7 @@ export default {
pId:null,
billNo:null,
loading: false,
saveLoading: false,
index: null,
formLoading: false,
formVisible: false,
@ -236,6 +237,7 @@ export default {
}
}
if (status == "1") {
this.saveLoading = true
this.submitFunction(status);
} else {
if (this.codeArray.length < 1) {
@ -271,6 +273,9 @@ export default {
}
inserThrOrderWeb(tQuery)
.then(response => {
if (status == '1'){
this.saveLoading = false
}
this.loading = false;
if (response.code === 20000) {
this.$message.success(tMessage + "成功");
@ -280,6 +285,9 @@ export default {
}
})
.catch(() => {
if (status == '1'){
this.saveLoading = false
}
this.loading = false;
})
},

@ -54,7 +54,7 @@
<el-button icon="el-icon-view" type="primary" @click="hideSearch">/</el-button>
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button>
<el-button type="primary" icon="el-icon-search" @click="search"></el-button>
<el-button type="primary" icon="el-icon-plus" @click="confirmSelect"></el-button>
<el-button type="primary" icon="el-icon-plus" @click="confirmSelect" :loading="commitLoding">确定</el-button>
</el-button-group>
</div>
<el-divider style="margin: 15px"></el-divider>
@ -114,7 +114,7 @@
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="selectCert"> </el-button>
<el-button type="primary" @click="selectCert" > </el-button>
<el-button @click="dialogFormVisible = false"> </el-button>
</div>
</el-dialog>
@ -225,6 +225,7 @@ export default {
dialogFormVisible: false,
multipleSelection: null,
nameCode:null,
commitLoding:false
};
},
@ -347,7 +348,9 @@ export default {
supId: this.multipleSelection.customerId,
zczbhhzbapzbh: this.multipleSelection.zczbhhzbapzbh
};
this.commitLoding = true
addOrderDetail(tQuery).then((response) => {
this.commitLoding = false
this.loading = false;
if (response.code === 20000) {
this.closeDialog(response.data);
@ -360,6 +363,7 @@ export default {
this.$message.error(response.message);
}
}).catch(() => {
this.commitLoding = false
this.loading = false;
});

@ -80,7 +80,7 @@
>
<modifyDialog :inputQuery="inputQuery"></modifyDialog>
<div slot="footer" class="dialog-footer">
<el-button type="primary" size="small" icon="search" @click="onAddSubmit"
<el-button type="primary" size="small" icon="search" @click="onAddSubmit" :loading="addLoading"
>提交
</el-button
>
@ -100,7 +100,7 @@
>
<modifyDialog :inputQuery="inputQuery"></modifyDialog>
<div slot="footer" class="dialog-footer">
<el-button type="primary" size="small" icon="search" @click="onModifySubmit"
<el-button type="primary" size="small" icon="search" @click="onModifySubmit" :loading="upLoading"
>提交
</el-button
>
@ -167,6 +167,8 @@ export default {
loading: false,
thirdSysDetail: {},
configParms: {},
addLoading: false,
upLoading: false,
};
},
@ -276,8 +278,10 @@ export default {
return;
}
this.addLoading = true
insertBussinessType(this.inputQuery)
.then((response) => {
this.addLoading = false
if (response.code === 20000) {
this.loading = false;
this.cancelDialog();
@ -287,6 +291,7 @@ export default {
}
})
.catch(() => {
this.addLoading = false
this.loading = false;
this.cancelDialog();
});
@ -312,8 +317,10 @@ export default {
return;
}
this.upLoading = true
updateBussinessType(this.inputQuery)
.then((response) => {
this.upLoading = false
if (response.code === 20000) {
this.loading = false;
this.cancelDialog();
@ -323,6 +330,7 @@ export default {
}
})
.catch(() => {
this.upLoading = false
this.loading = false;
this.cancelDialog();
});

@ -262,7 +262,7 @@
<el-button
type="primary"
@click.native="forSubSubmit()"
:loading="formLoading"
:loading="forLoading"
>提交
</el-button
>
@ -343,6 +343,7 @@ export default {
false: "仓库",
},
formLoading: false,
forLoading: false,
subFormVisible: false,
formVisible: false,
formData: formJson,

@ -1,248 +1,274 @@
<template>
<el-form :model="newProductData" label-width="120px">
<el-row type="flex">
<el-col :span="11" type="flex">
<el-form-item label="第三方系统" prop="thirdSysFk">
<el-select
style="width: 90%"
v-model="newProductData.thirdSysFk" placeholder="请选择第三方系统"
>
<el-option
v-for="item in thirdSys"
:key="item.value"
:label="item.thirdName"
:value="item.thirdId">
<span style="float: left">{{ item.thirdName }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{
item.thirdId
}}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex">
<el-col :span="11" type="flex">
<el-form-item label="产品编码:" prop="code">
<el-input style="width: 90%" size="small" placeholder="请输入产品编码" v-model.trim="newProductData.code"></el-input></el-form-item>
</el-col>
<el-col :span="11" type="flex">
<el-form-item label="产品名称:" prop="name">
<el-input style="width: 90%" size="small" placeholder="请输入产品名称" v-model.trim="newProductData.name"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex">
<el-col :span="11" class="el-col">
<el-form-item label="规格型号:" prop="spec">
<el-input style="width: 90%" size="small" placeholder="请输入规格型号" v-model.trim="newProductData.spec"></el-input>
</el-form-item>
</el-col>
<el-col :span="11" class="el-col">
<el-form-item label="计量单位:" prop="measname">
<el-input style="width: 90%" size="small" placeholder="请输入计量单位" v-model.trim="newProductData.measname"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex">
<el-col :span="11" class="el-col">
<el-form-item label="生产企业:" prop="manufactory">
<el-input style="width: 90%" size="small" placeholder="请输入生产企业" v-model.trim="newProductData.manufactory"></el-input>
</el-form-item>
</el-col>
<el-col :span="11" class="el-col">
<el-form-item label="注册证号:" prop="registerNo">
<el-input style="width: 90%" size="small" placeholder="请输入注册证号" v-model.trim="newProductData.registerNo"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex">
<el-col :span="11" class="el-col">
<el-form-item label="医疗器械注册人:" prop="ylqxzcrbarmc">
<el-input style="width: 90%" size="small" placeholder="请输入医疗器械注册人" v-model.trim="newProductData.ylqxzcrbarmc"></el-input>
</el-form-item>
</el-col>
<el-col :span="11" class="el-col">
<el-form-item label="注册人英文名称:" prop="ylqxzcrbarywmc">
<el-input style="width: 90%" size="small" placeholder="请输入注册人英文名称" v-model.trim="newProductData.ylqxzcrbarywmc"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex">
<el-col :span="11" class="el-col">
<el-form-item label="产品类别:" prop="cplb">
<el-input style="width: 90%" size="small" placeholder="请输入产品类别" v-model.trim="newProductData.cplb"></el-input>
</el-form-item>
</el-col>
<el-col :span="11" class="el-col">
<el-form-item label="分类编码:" prop="flbm">
<el-input style="width: 90%" size="small" placeholder="请输入分类编码" v-model.trim="newProductData.flbm"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex">
<el-col :span="11" class="el-col">
<el-form-item label="商品条码:" prop="sptm">
<el-input style="width: 90%" size="small" placeholder="请输入商品条码" v-model.trim="newProductData.sptm"></el-input>
</el-form-item>
</el-col>
<el-col :span="11" class="el-col">
<el-form-item label="医保编码:" prop="ybbm">
<el-input style="width: 90%" size="small" placeholder="请输入医保编码" v-model.trim="newProductData.ybbm"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex">
<el-col :span="11" class="el-col">
<el-form-item label="统一社会信用号:" prop="tyshxydm">
<el-input style="width: 90%" size="small" placeholder="请输入统一社会信用号" v-model.trim="newProductData.tyshxydm"></el-input>
</el-form-item>
</el-col>
<el-col :span="11" class="el-col">
<el-form-item label="器械类别:" prop="qxlb">
<el-input style="width: 90%" size="small" placeholder="请输入器械类别" v-model.trim="newProductData.qxlb"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-form :model="newProductData" label-width="120px">
<el-row type="flex">
<el-col :span="11" type="flex">
<el-form-item label="第三方系统" prop="thirdSysFk">
<el-select
style="width: 90%"
v-model="newProductData.thirdSysFk" placeholder="请选择第三方系统"
>
<el-option
v-for="item in thirdSys"
:key="item.value"
:label="item.thirdName"
:value="item.thirdId"
>
<span style="float: left">{{ item.thirdName }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{
item.thirdId
}}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex">
<el-col :span="11" type="flex">
<el-form-item label="产品编码:" prop="code">
<el-input style="width: 90%" size="small" placeholder="请输入产品编码" v-model.trim="newProductData.code"
></el-input>
</el-form-item>
</el-col>
<el-col :span="11" type="flex">
<el-form-item label="产品名称:" prop="name">
<el-input style="width: 90%" size="small" placeholder="请输入产品名称" v-model.trim="newProductData.name"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex">
<el-col :span="11" class="el-col">
<el-form-item label="规格型号:" prop="spec">
<el-input style="width: 90%" size="small" placeholder="请输入规格型号" v-model.trim="newProductData.spec"
></el-input>
</el-form-item>
</el-col>
<el-col :span="11" class="el-col">
<el-form-item label="计量单位:" prop="measname">
<el-input style="width: 90%" size="small" placeholder="请输入计量单位" v-model.trim="newProductData.measname"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex">
<el-col :span="11" class="el-col">
<el-form-item label="生产企业:" prop="manufactory">
<el-input style="width: 90%" size="small" placeholder="请输入生产企业"
v-model.trim="newProductData.manufactory"
></el-input>
</el-form-item>
</el-col>
<el-col :span="11" class="el-col">
<el-form-item label="注册证号:" prop="registerNo">
<el-input style="width: 90%" size="small" placeholder="请输入注册证号"
v-model.trim="newProductData.registerNo"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex">
<el-col :span="11" class="el-col">
<el-form-item label="医疗器械注册人:" prop="ylqxzcrbarmc">
<el-input style="width: 90%" size="small" placeholder="请输入医疗器械注册人"
v-model.trim="newProductData.ylqxzcrbarmc"
></el-input>
</el-form-item>
</el-col>
<el-col :span="11" class="el-col">
<el-form-item label="注册人英文名称:" prop="ylqxzcrbarywmc">
<el-input style="width: 90%" size="small" placeholder="请输入注册人英文名称"
v-model.trim="newProductData.ylqxzcrbarywmc"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex">
<el-col :span="11" class="el-col">
<el-form-item label="产品类别:" prop="cplb">
<el-input style="width: 90%" size="small" placeholder="请输入产品类别" v-model.trim="newProductData.cplb"
></el-input>
</el-form-item>
</el-col>
<el-col :span="11" class="el-col">
<el-form-item label="分类编码:" prop="flbm">
<el-input style="width: 90%" size="small" placeholder="请输入分类编码" v-model.trim="newProductData.flbm"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex">
<el-col :span="11" class="el-col">
<el-form-item label="商品条码:" prop="sptm">
<el-input style="width: 90%" size="small" placeholder="请输入商品条码" v-model.trim="newProductData.sptm"
></el-input>
</el-form-item>
</el-col>
<el-col :span="11" class="el-col">
<el-form-item label="医保编码:" prop="ybbm">
<el-input style="width: 90%" size="small" placeholder="请输入医保编码" v-model.trim="newProductData.ybbm"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex">
<el-col :span="11" class="el-col">
<el-form-item label="统一社会信用号:" prop="tyshxydm">
<el-input style="width: 90%" size="small" placeholder="请输入统一社会信用号"
v-model.trim="newProductData.tyshxydm"
></el-input>
</el-form-item>
</el-col>
<el-col :span="11" class="el-col">
<el-form-item label="器械类别:" prop="qxlb">
<el-input style="width: 90%" size="small" placeholder="请输入器械类别" v-model.trim="newProductData.qxlb"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex">
<el-col :span="23" class="el-col">
<el-form-item label="产品描述:" prop="cpms">
<el-input style="width: 92%" type="textarea" size="mini" rows="3" placeholder="请输入产品描述" v-model.trim="newProductData.cpms"></el-input>
</el-form-item>
</el-col>
</el-row>
<div style='text-align: center; margin-bottom: 10px;'>
<el-button type="primary" @click="saveNewProduct"></el-button>
<el-button type="primary" @click="closeAddDialog"></el-button>
</div>
</el-form>
<el-row type="flex">
<el-col :span="23" class="el-col">
<el-form-item label="产品描述:" prop="cpms">
<el-input style="width: 92%" type="textarea" size="mini" rows="3" placeholder="请输入产品描述"
v-model.trim="newProductData.cpms"
></el-input>
</el-form-item>
</el-col>
</el-row>
<div style="text-align: center; margin-bottom: 10px;">
<el-button type="primary" @click="saveNewProduct" :loading="saveLoading">提交</el-button>
<el-button type="primary" @click="closeAddDialog"></el-button>
</div>
</el-form>
</template>
<script>
import {saveNewProduct} from "@/api/thrsys/thrProducts";
import { saveNewProduct } from '@/api/thrsys/thrProducts'
import {getBasicThirdSys} from "@/api/thrsys/basicThirdSys";
import {addProduct} from "@/api/thrsys/thrProductsAdd";
import { getBasicThirdSys } from '@/api/thrsys/basicThirdSys'
import { addProduct } from '@/api/thrsys/thrProductsAdd'
export default {
name: "ThrProductsAdd",
props: {
newType: {
type: Object,
required: true,
},
closeAddDialog: {
type: Function,
required: true,
},
},
data() {
return {
newProductData: {
name: '',
code: null,
registerNo: null,
manufactory: null,
spec: null,
measname: null,
ylqxzcrbarmc: null,
ylqxzcrbarywmc: null,
cplb: null,
flbm: null,
sptm: null,
ybbm: null,
tyshxydm: null,
qxlb: null,
cplx:null,
cpms: null,
thirdSysFk: null,
cpdls: null
},
thirdSys: [],
}
name: 'ThrProductsAdd',
props: {
newType: {
type: Object,
required: true
},
methods: {
saveNewProduct() {
this.addProductVisible = false;
if (this.$isBlank(this.newProductData.thirdSysFk)) {
this.$message.warning("第三方系统不能为空!");
return;
}
if (this.$isBlank(this.newProductData.code)) {
this.$message.warning("产品编码为空!");
return;
}
if (this.$isBlank(this.newProductData.name)) {
this.$message.warning("产品名称不能为空!");
return;
}
closeAddDialog: {
type: Function,
required: true
}
},
data() {
return {
newProductData: {
name: '',
code: null,
registerNo: null,
manufactory: null,
spec: null,
measname: null,
ylqxzcrbarmc: null,
ylqxzcrbarywmc: null,
cplb: null,
flbm: null,
sptm: null,
ybbm: null,
tyshxydm: null,
qxlb: null,
cplx: null,
cpms: null,
thirdSysFk: null,
cpdls: null
},
thirdSys: [],
saveLoading: false,
}
if (this.$isBlank(this.newProductData.spec)) {
this.$message.warning("规格型号不能为空");
return;
}
if (this.$isBlank(this.newProductData.measname)) {
this.$message.warning("计量单位不能为空!");
return;
}
if (this.$isBlank(this.newProductData.manufactory)) {
this.$message.warning("生产企业不能为空!");
return;
}
if (this.$isBlank(this.newProductData.registerNo)) {
this.$message.warning("注册证号不能为空!");
return;
}
},
methods: {
saveNewProduct() {
this.addProductVisible = false
if (this.$isBlank(this.newProductData.thirdSysFk)) {
this.$message.warning('第三方系统不能为空!')
return
}
if (this.$isBlank(this.newProductData.code)) {
this.$message.warning('产品编码为空!')
return
}
if (this.$isBlank(this.newProductData.name)) {
this.$message.warning('产品名称不能为空!')
return
}
if (this.$isBlank(this.newProductData.spec)) {
this.$message.warning('规格型号不能为空')
return
}
if (this.$isBlank(this.newProductData.measname)) {
this.$message.warning('计量单位不能为空!')
return
}
if (this.$isBlank(this.newProductData.manufactory)) {
this.$message.warning('生产企业不能为空!')
return
}
if (this.$isBlank(this.newProductData.registerNo)) {
this.$message.warning('注册证号不能为空!')
return
}
this.saveLoading = true
if (this.newType == 1) {
saveNewProduct(this.newProductData).then((res) => {
this.saveLoading = false
if (res.code == 20000) {
this.$message.success('添加成功')
//
this.$emit('closeAddDialog', true)
this.closeAddDialog(true)
} else {
this.$message.error(res.message)
}
}).catch((error) => {
this.saveLoading = false
// this.$message.error(error.message);
})
} else if (this.newType == 2) {
addProduct(this.newProductData).then((res) => {
this.saveLoading = false
if (res.code == 20000) {
this.$message.success('添加成功')
//
this.closeAddDialog(true)
} else {
this.$message.error(res.message)
}
}).catch((error) => {
this.saveLoading = false
// this.$message.error(error.message);
})
}
if (this.newType == 1) {
saveNewProduct(this.newProductData).then((res) => {
if (res.code == 20000) {
this.$message.success("添加成功");
//
this.$emit("closeAddDialog", true);
this.closeAddDialog(true);
} else {
this.$message.error(res.message);
}
}).catch((error) => {
// this.$message.error(error.message);
})
} else if (this.newType == 2) {
addProduct(this.newProductData).then((res) => {
if (res.code == 20000) {
this.$message.success("添加成功");
//
this.closeAddDialog(true);
}else {
this.$message.error(res.message);
}
}).catch((error) => {
// this.$message.error(error.message);
})
}
},
getBasicThirdSys() {
let query = {
enabled: true,
};
getBasicThirdSys(query)
.then((response) => {
this.thirdSys = response.data.list || [];
})
.catch(() => {
this.loading = false;
this.list = [];
});
},
},
created() {
this.getBasicThirdSys();
},
getBasicThirdSys() {
let query = {
enabled: true
}
getBasicThirdSys(query)
.then((response) => {
this.thirdSys = response.data.list || []
})
.catch(() => {
this.loading = false
this.list = []
})
}
},
created() {
this.getBasicThirdSys()
}
}
</script>

Loading…
Cancel
Save