|
@@ -23,15 +23,17 @@
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="物流公司" prop="post_company">
|
|
|
- <el-input
|
|
|
- placeholder="物流公司"
|
|
|
+ <search-express
|
|
|
:disabled="
|
|
|
!(status === '5' && powers.some((item) => item == '032'))
|
|
|
"
|
|
|
- v-model="ruleForm.post_company"
|
|
|
- maxlength="100"
|
|
|
- >
|
|
|
- </el-input>
|
|
|
+ :value="ruleForm.post_company"
|
|
|
+ :placeholder="'物流公司'"
|
|
|
+ :names="''"
|
|
|
+ :size="'mini'"
|
|
|
+ :is-detail="false"
|
|
|
+ @searchChange="handleCompany"
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="10">
|
|
@@ -62,7 +64,7 @@
|
|
|
<script>
|
|
|
import asyncRequest from "@/apis/service/purchaseIn/wsmInOrder";
|
|
|
import resToken from "@/mixins/resToken";
|
|
|
-import { isnumber,isAlphanumeric } from "@/utils/validate";
|
|
|
+import { isnumber, isAlphanumeric } from "@/utils/validate";
|
|
|
export default {
|
|
|
name: "wsmInOrderAdd",
|
|
|
props: ["id", "sitem", "newTime", "modelSitem"],
|
|
@@ -112,7 +114,7 @@ export default {
|
|
|
modelId: "",
|
|
|
ruleForm: {
|
|
|
return_num: "",
|
|
|
- post_company: "",
|
|
|
+ post_company: [],
|
|
|
post_code: "",
|
|
|
},
|
|
|
rules: {
|
|
@@ -123,8 +125,8 @@ export default {
|
|
|
},
|
|
|
post_company: {
|
|
|
required: true,
|
|
|
- message: "请输入物流公司",
|
|
|
- trigger: "blur",
|
|
|
+ message: "请选择物流公司",
|
|
|
+ trigger: "change",
|
|
|
},
|
|
|
post_code: {
|
|
|
required: true,
|
|
@@ -173,13 +175,17 @@ export default {
|
|
|
this.ruleForm = {
|
|
|
wsm_in_code: wsm_in_code || "",
|
|
|
return_num: return_num || "0",
|
|
|
- post_company: post_company || "",
|
|
|
+ post_company: post_company ? [post_company] : [],
|
|
|
post_code: post_code || "",
|
|
|
};
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
-
|
|
|
+ handleCompany(e) {
|
|
|
+ const { code, label } = e;
|
|
|
+ this.ruleForm.post_company = code ? [label] : [];
|
|
|
+ this.$refs.ruleForm.validateField("post_company");
|
|
|
+ },
|
|
|
// 保存更改
|
|
|
async submitForm() {
|
|
|
await this.$refs.ruleForm.validate(async (valid) => {
|