|
@@ -25,12 +25,24 @@
|
|
|
<avue-input-tree v-if="item.prop === 'goodsTypeId'" leaf-only multiple style="width: 100%;"
|
|
|
:props="{ label: 'title' }" v-model="form[item.prop]" placeholder=" " type="tree" size="small"
|
|
|
dataType="string" :dic="dicData" tags/>
|
|
|
+
|
|
|
<el-input type="textarea" v-else-if="item.type === 'textarea'" v-model="form[item.prop]" size="small"
|
|
|
autocomplete="off" placeholder=" "></el-input>
|
|
|
+
|
|
|
<el-select v-else-if="item.type === 'select'" style="width: 100%" v-model="form[item.prop]" size="small"
|
|
|
placeholder="请选择" clearable filterable>
|
|
|
<!-- <el-option v-for="(item,index) in selectData" :key="index" :label="item.dictValue" :value="item.dictValue"></el-option>-->
|
|
|
</el-select>
|
|
|
+
|
|
|
+ <el-select v-model="form[item.prop]" style="width: 300px;" size="medium" v-else-if="item.prop === 'supervisorUserIdList'" multiple placeholder="请选择">
|
|
|
+ <el-option
|
|
|
+ v-for="item in userList"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.id">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+
|
|
|
<selectComponent v-else-if="item.prop === 'corpId'" v-model="form[item.prop]"
|
|
|
:configuration="configuration" typeData="GYS" style="width: 100%" />
|
|
|
<el-input type="age" v-else v-model="form[item.prop]" size="small" autocomplete="off"></el-input>
|
|
@@ -223,6 +235,7 @@ import _ from "lodash";
|
|
|
import partOption from "./configuration/partList.json";
|
|
|
import { getPartTree, getGoodstype } from "@/api/basicData/customerInquiry";
|
|
|
import { costCal } from "@/util/calculate";
|
|
|
+import { gainUser } from "@/api/basicData/customerInquiry";
|
|
|
export default {
|
|
|
name: "detailsPage",
|
|
|
data() {
|
|
@@ -401,6 +414,12 @@ export default {
|
|
|
]
|
|
|
},
|
|
|
{
|
|
|
+ label: '分管员',
|
|
|
+ prop: 'supervisorUserIdList',
|
|
|
+ multiple:true,
|
|
|
+ dicData: [],
|
|
|
+ },
|
|
|
+ {
|
|
|
label: "HS代码",
|
|
|
prop: "hsCode",
|
|
|
rules: [
|
|
@@ -674,6 +693,7 @@ export default {
|
|
|
total: 0,
|
|
|
pageSize: 10
|
|
|
},
|
|
|
+ userList: [],
|
|
|
};
|
|
|
},
|
|
|
props: {
|
|
@@ -748,6 +768,11 @@ export default {
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
+ console.log(res.data.data.supervisorUserIdGroup)
|
|
|
+ if (res.data.data.supervisorUserIdGroup != null && res.data.data.supervisorUserIdGroup != '') {
|
|
|
+ res.data.data.supervisorUserIdList = res.data.data.supervisorUserIdGroup.split(',')
|
|
|
+ }
|
|
|
+
|
|
|
this.form = res.data.data;
|
|
|
if (res.data.data.saleGoodsPrice) {
|
|
|
this.contactsData = res.data.data.saleGoodsPrice;
|
|
@@ -770,6 +795,9 @@ export default {
|
|
|
this.getWorkDicts("goods_Props").then(res => {
|
|
|
this.goodsProps = res.data.data;
|
|
|
});
|
|
|
+ gainUser().then(res => {
|
|
|
+ this.userList = res.data.data;
|
|
|
+ });
|
|
|
},
|
|
|
methods: {
|
|
|
copyDoc() {
|
|
@@ -942,11 +970,28 @@ export default {
|
|
|
this.partList.forEach((e, index) => {
|
|
|
e.sort = Number(index + 1)
|
|
|
})
|
|
|
+
|
|
|
+ var userName = null
|
|
|
+ if (this.form.supervisorUserIdList != null) {
|
|
|
+ userName = ''
|
|
|
+ for (const userId of this.form.supervisorUserIdList) {
|
|
|
+ for (const user of this.userList) {
|
|
|
+ if (user.id == userId) {
|
|
|
+ userName += user.name + ','
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ userName = userName.substring(0, userName.length - 1);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
const params = {
|
|
|
...this.form,
|
|
|
type: 0,
|
|
|
saleGoodsPrice: this.contactsData,
|
|
|
buyGoodsPrice: this.purchaseData,
|
|
|
+ supervisorUserIdGroup: this.form.supervisorUserIdList == null || this.form.supervisorUserIdList == [] ? '' : this.form.supervisorUserIdList.toString(),
|
|
|
+ supervisorUserNameGroup: userName,
|
|
|
goodsSpecificationList: this.sftData.concat(this.partList),
|
|
|
};
|
|
|
updateDetail(params).then(res => {
|