|
@@ -139,6 +139,7 @@
|
|
|
placeholder="请输入客户名称"
|
|
|
popper-class="my-autocomplete"
|
|
|
clearable
|
|
|
+ @clear="handleClearCompany"
|
|
|
@select="handleSelectCompany"
|
|
|
style="width: 100%"
|
|
|
>
|
|
@@ -236,23 +237,11 @@
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <!-- <el-col :span="4">
|
|
|
+ <el-col :span="4">
|
|
|
<el-form-item label="客户标签" prop="customerLabelId">
|
|
|
- <el-select v-model="form.customerLabelId"
|
|
|
- style="width: 100%"
|
|
|
- v-if="editStatus"
|
|
|
- size="small">
|
|
|
- <el-option
|
|
|
- v-for="item in options"
|
|
|
- :key="item.id"
|
|
|
- :label="item.lable"
|
|
|
- :value="item.id"
|
|
|
- />
|
|
|
- </el-select>
|
|
|
- <span v-else>{{ selectedOptionLabel }}</span>
|
|
|
+ <span >{{ selectedOptionLabel }}</span>
|
|
|
</el-form-item>
|
|
|
-
|
|
|
- </el-col> -->
|
|
|
+ </el-col>
|
|
|
<el-col :span="14">
|
|
|
<el-form-item label="备注" prop="remark">
|
|
|
<el-input
|
|
@@ -1375,17 +1364,17 @@ function open(id) {
|
|
|
editStatus.value = true;
|
|
|
title.value = "添加订单信息";
|
|
|
}
|
|
|
- // getOption()
|
|
|
+ getOption()
|
|
|
+}
|
|
|
+function getOption(){
|
|
|
+ listLableNoPage().then(res =>{
|
|
|
+ options.value = res.data
|
|
|
+ })
|
|
|
}
|
|
|
-// function getOption(){
|
|
|
-// listLableNoPage().then(res =>{
|
|
|
-// options.value = res.data
|
|
|
-// })
|
|
|
-// }
|
|
|
-// const selectedOptionLabel = computed(() => {
|
|
|
-// const selectedOption = options.value.find(option => option.id === form.value.customerLabelId);
|
|
|
-// return selectedOption ? selectedOption.lable : '';
|
|
|
-// });
|
|
|
+const selectedOptionLabel = computed(() => {
|
|
|
+ const selectedOption = options.value.find(option => option.id === form.value.customerLabelId);
|
|
|
+ return selectedOption ? selectedOption.lable : '';
|
|
|
+ });
|
|
|
|
|
|
function openSimple(id, optionType) {
|
|
|
reset();
|
|
@@ -1826,8 +1815,11 @@ function handleSelectEmployee(item) {
|
|
|
function handleSelectCompany(item) {
|
|
|
form.value.companyName = item.name;
|
|
|
form.value.companyId = item.id;
|
|
|
+ form.value.customerLabelId = item.customerLabelId
|
|
|
+}
|
|
|
+function handleClearCompany(){
|
|
|
+ form.value.customerLabelId = "";
|
|
|
}
|
|
|
-
|
|
|
function handleSelectProvince(item, index) {
|
|
|
const _provinceCode = item.provinceCode;
|
|
|
const _province = provincesArr.value[index].find((i) => {
|