|
@@ -9,6 +9,7 @@
|
|
|
style="width: 100%"
|
|
|
class="demo-ruleForm"
|
|
|
>
|
|
|
+ <p>returnCode{{ returnCode }}</p>
|
|
|
<el-row>
|
|
|
<!-- <el-form-item label="供应商仓库" -->
|
|
|
<el-col :span="4" style="width: 370px; padding: 0 0 0 10px">
|
|
@@ -29,7 +30,7 @@
|
|
|
:disabled="false"
|
|
|
:isDetail="false"
|
|
|
:isRelation="true"
|
|
|
- :companyCode="parmValue.wsm_supplierNo"
|
|
|
+ :companyCode="ruleForm.wsm_supplierNo"
|
|
|
@searchChange="stockChange"
|
|
|
/>
|
|
|
</el-col>
|
|
@@ -38,8 +39,7 @@
|
|
|
<el-button type="primary" @click="submitForm" v-if="true"
|
|
|
>保 存</el-button
|
|
|
>
|
|
|
- <!-- id === 'add' ||
|
|
|
- (status === '0' && powers.some((item) => item == '005')) -->
|
|
|
+ <!-- id === 'add' || (status === '0' && powers.some((item) => item == '005')) -->
|
|
|
<el-button
|
|
|
type="primary"
|
|
|
@click="statusConfirm('1', '发起审核流程')"
|
|
@@ -79,7 +79,7 @@ import resToken from "@/mixins/resToken";
|
|
|
import { isnumber } from "@/utils/validate.js";
|
|
|
export default {
|
|
|
name: "purchase_check",
|
|
|
- props: ["id", "showModelThis", "newTime"],
|
|
|
+ props: ["id", "showModelThis", "newTime", "returnCode"],
|
|
|
mixins: [resToken],
|
|
|
data() {
|
|
|
const validatemobile = (rule, value, callback) => {
|
|
@@ -94,6 +94,7 @@ export default {
|
|
|
}
|
|
|
};
|
|
|
return {
|
|
|
+ wsm_code: [],
|
|
|
wsm_supplierNo: [],
|
|
|
loading: false,
|
|
|
status: "", //存储详情接口返的状态
|
|
@@ -102,6 +103,7 @@ export default {
|
|
|
hand_name: "", //交接人
|
|
|
ruleForm: {
|
|
|
wsm_supplierNo: "",
|
|
|
+ wsm_code: "",
|
|
|
},
|
|
|
rulesThis: this.rules,
|
|
|
// 验证规则
|
|
@@ -114,6 +116,11 @@ export default {
|
|
|
},
|
|
|
],
|
|
|
},
|
|
|
+ pageInfo: {
|
|
|
+ size: 15,
|
|
|
+ curr: 1,
|
|
|
+ total: 0,
|
|
|
+ },
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
@@ -131,7 +138,7 @@ export default {
|
|
|
},
|
|
|
|
|
|
created() {
|
|
|
- this.initForm();
|
|
|
+ // this.initForm();
|
|
|
},
|
|
|
watch: {
|
|
|
id: function (val) {
|
|
@@ -193,19 +200,12 @@ export default {
|
|
|
await this.$refs.ruleForm.validate(async (valid) => {
|
|
|
if (valid) {
|
|
|
this.loading = true;
|
|
|
- const model = {
|
|
|
- id: this.id,
|
|
|
- resign_uid: rUid,
|
|
|
- hand_uid: hUid,
|
|
|
- };
|
|
|
- let res = {};
|
|
|
- if (this.id === "add") {
|
|
|
- delete model["id"];
|
|
|
- res = await asyncRequest.add(model);
|
|
|
- } else {
|
|
|
- res = await asyncRequest.update(model);
|
|
|
+ console.log(this.ruleForm);
|
|
|
+ let model = {
|
|
|
+ returnCode:this.returnCode,
|
|
|
+ wsm_code:this.ruleForm.wsm_code
|
|
|
}
|
|
|
-
|
|
|
+ const res = await asyncRequest.afterFeed(model);
|
|
|
this.loading = false;
|
|
|
if (res && res.code === 0) {
|
|
|
const title = this.id === "add" ? "添加成功!" : "修改成功!";
|
|
@@ -248,31 +248,30 @@ export default {
|
|
|
},
|
|
|
async supplierChange(e) {
|
|
|
if (e && e.id) {
|
|
|
- this.parmValue.wsm_supplierNo = e.code;
|
|
|
+ this.ruleForm.wsm_supplierNo = e.code;
|
|
|
this.wsm_supplierNo = [e.code];
|
|
|
} else {
|
|
|
- this.parmValue.wsm_supplierNo = "";
|
|
|
+ this.ruleForm.wsm_supplierNo = "";
|
|
|
this.wsm_supplierNo = [];
|
|
|
}
|
|
|
- this.parmValue.wsm_code = "";
|
|
|
+ this.ruleForm.wsm_code = "";
|
|
|
this.wsm_code = [];
|
|
|
- this.parmValue.page = 1;
|
|
|
- this.pageInfo.curr = 1;
|
|
|
- await this.searchList();
|
|
|
+ // this.ruleForm.page = 1;
|
|
|
+ // this.pageInfo.curr = 1;
|
|
|
+ // await this.searchList();
|
|
|
},
|
|
|
async stockChange(e) {
|
|
|
if (e && e.id) {
|
|
|
- this.parmValue.wsm_code = e.code;
|
|
|
+ this.ruleForm.wsm_code = e.code;
|
|
|
this.wsm_code = [e.code];
|
|
|
} else {
|
|
|
- this.parmValue.wsm_code = "";
|
|
|
+ this.ruleForm.wsm_code = "";
|
|
|
this.wsm_code = [];
|
|
|
}
|
|
|
-
|
|
|
console.log(e);
|
|
|
- this.parmValue.page = 1;
|
|
|
- this.pageInfo.curr = 1;
|
|
|
- await this.searchList();
|
|
|
+ // this.ruleForm.page = 1;
|
|
|
+ // this.pageInfo.curr = 1;
|
|
|
+ // await this.searchList();
|
|
|
},
|
|
|
},
|
|
|
};
|