|
@@ -10,6 +10,8 @@ import {
|
|
|
saveAndSubmit,
|
|
|
} from "@/api/changeApply/basic";
|
|
|
|
|
|
+import { REFER } from "@/components/popover-select/api";
|
|
|
+
|
|
|
export default {
|
|
|
name: "AddChangeOrders",
|
|
|
props: {
|
|
@@ -362,8 +364,27 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
// 物料编码
|
|
|
- materialCodeChange(rows, props) {
|
|
|
- console.log(rows, props, "rows, props");
|
|
|
+ async materialCodeChange(prop) {
|
|
|
+ let { factory } = prop;
|
|
|
+ try {
|
|
|
+ // this.loading = true;
|
|
|
+ let { code, rows } = await REFER(
|
|
|
+ {
|
|
|
+ type: "MANUFACTURER_PARAM",
|
|
|
+ search: "",
|
|
|
+ id: factory,
|
|
|
+ isPage: true,
|
|
|
+ },
|
|
|
+ { pageNum: 1, pageSize: 10 }
|
|
|
+ );
|
|
|
+ if (rows[0]) {
|
|
|
+ let { manufacturerOther } = rows[0];
|
|
|
+ prop["brand"] = manufacturerOther.brand;
|
|
|
+ }
|
|
|
+ } catch (error) {
|
|
|
+ } finally {
|
|
|
+ // this.loading = false;
|
|
|
+ }
|
|
|
},
|
|
|
},
|
|
|
created() {},
|
|
@@ -449,6 +470,16 @@ export default {
|
|
|
:size="$attrs.size"
|
|
|
:height="420"
|
|
|
>
|
|
|
+ <template slot="materialCode" slot-scope="scope">
|
|
|
+ <component
|
|
|
+ v-bind="scope.attr"
|
|
|
+ v-model="scope.row[scope.item.key]"
|
|
|
+ :size="$attrs.size"
|
|
|
+ :source.sync="scope.row"
|
|
|
+ @change="materialCodeChange(scope.row)"
|
|
|
+ >
|
|
|
+ </component>
|
|
|
+ </template>
|
|
|
<template slot="materialName" slot-scope="scope">
|
|
|
<component
|
|
|
v-bind="scope.attr"
|