新增协同所选配方无试验号时给与提示

master
leo 3 years ago
parent 9ac7807abb
commit 7ba1358d41

@ -136,6 +136,7 @@ import {
import { import {
getFactoryList getFactoryList
} from "/src/api/api/factory"; } from "/src/api/api/factory";
import { layer } from '@layui/layer-vue';
export default { export default {
setup() { setup() {
@ -305,6 +306,13 @@ export default {
postData.FWeightUnit = (postData.FWeightUnit || "").trim(); postData.FWeightUnit = (postData.FWeightUnit || "").trim();
postData.FFormulaName = (postData.FFormulaName || "").trim(); postData.FFormulaName = (postData.FFormulaName || "").trim();
postData.FCreateFactoryID=(postData.FCreateFactoryID==-1?"":postData.FCreateFactoryID); postData.FCreateFactoryID=(postData.FCreateFactoryID==-1?"":postData.FCreateFactoryID);
//
if (!postData.FFormulaTestCode) {
layer.msg("所选配方无试验号", { icon : 2, time: 1000})
return false
}
for (let key in postData) { for (let key in postData) {
if (postData[key] == "") return false; if (postData[key] == "") return false;
} }
@ -313,12 +321,14 @@ export default {
// layer.msg('') // layer.msg('')
// return false; // return false;
// } // }
postData.FState = isCreate ? 1 : 0; postData.FState = isCreate ? 1 : 0;
postData = JSON.parse(JSON.stringify(postData)); postData = JSON.parse(JSON.stringify(postData));
if (postData.FTestCode != postData.FFormulaTestCode) { if (postData.FTestCode != postData.FFormulaTestCode) {
this.sureTextCode(postData); this.sureTextCode(postData);
return false; return false;
} }
this._postTermData(postData); this._postTermData(postData);
}, },
//- //-

Loading…
Cancel
Save