Commit 875e8494 authored by dcy's avatar dcy

Merge remote-tracking branch 'origin/dev' into dev

parents 698de892 0481d232
......@@ -106,7 +106,8 @@ export default {
this.resetCustomerFollowForm()
if (!!this.customerId) getCustomerContactsListByCustomer({customerId: this.customerId}).then(r => {
this.customerContactsList = r.data
this.customerFollow.form.customerId = this.customerId
this.$set(this.customerFollow.form, 'customerId', this.customerId)
// this.customerFollow.form.customerId = this.customerId
})
listServiceUser().then(r => {
this.serviceUserList = r.data
......
......@@ -19,7 +19,7 @@
<el-option v-for="item in importWarehouseList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
......@@ -82,7 +82,7 @@
<!-- 对话框(添加 / 修改) -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-form-item label="始发地" prop="startWarehouseId">
<el-select v-model="form.startWarehouseId" placeholder="请选择始发地">
<el-option v-for="item in exportWarehouseList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option>
......@@ -143,7 +143,7 @@ import { getChannelList } from '@/api/ecw/channel';
import { getWarehouseList } from "@/api/ecw/warehouse"
export default {
name: "FutureBox",
name: "indexFutureBox",
components: {
},
data() {
......@@ -187,7 +187,8 @@ export default {
// 表单校验
rules: {
},
warehouseList: []
warehouseList: [],
channelList: [],
};
},
computed: {
......@@ -224,6 +225,8 @@ export default {
}
},
created() {
// 查询渠道
getChannelList().then((res) => (this.channelList = res.data));
this.transportTypes = this.getDictDatas(
this.DICT_TYPE.ECW_TRANSPORT_TYPE
).filter((item) => item.value == "1" || item.value == "2");
......
......@@ -571,4 +571,8 @@ export default {
.formShow div{
flex: 1;
}
.dialog-footer{
display: flex;
flex-direction: row !important;
}
</style>
......@@ -106,8 +106,8 @@
<span slot="append"></span>
</el-input>
</el-form-item>
<el-form-item label="总方数量" style="width: 300px">
<el-input v-model="form.sumWeight" placeholder="请输入总量">
<el-form-item label="总量" style="width: 300px">
<el-input v-model="form.sumWeight" placeholder="请输入总量">
<span slot="append">kg</span>
</el-input>
</el-form-item>
......
......@@ -8,7 +8,7 @@
<el-input v-model="form.brandName" placeholder="商标"></el-input>
</el-form-item>
<el-form-item :label="`商标${index + 1}分类`">
<el-select v-model="form.productTypeId" :placeholder="`请选择商标${index + 1}分类`" @change="form.productIds = [], updateValue()">
<el-select v-model="form.productTypeId" :placeholder="`请选择商标${index + 1}分类`" @change="form.productIds = [0], updateValue()">
<el-option
v-for="item in productTypeList"
:key="item.id"
......@@ -19,7 +19,7 @@
</el-select>
</el-form-item>
<el-form-item :label="`商标${index + 1}商品`">
<el-select v-model="form.productIds" :placeholder="`请选择商标${index + 1}商品`" multiple filterable @change="updateValue">
<el-select v-model="form.productIds" :placeholder="`请选择商标${index + 1}商品`" multiple filterable clearable @change="updateValue">
<el-option
v-for="item in getProductListByTypeId(form.productTypeId)"
:key="item.id"
......@@ -73,9 +73,22 @@ export default {
},
methods: {
getProductListByTypeId(typeId) {
return typeId === 0 ? [] : this.productList.filter((p) => p.typeId === typeId)
return [
{id: 0, titleZh: '全部'},
...(typeId === 0 ? [] : this.productList.filter((p) => p.typeId === typeId))
]
},
// 删除商品0
delete0(){
if (this.form.productIds.length > 1){
const index = this.form.productIds.indexOf(0)
if (index !== -1) {
this.form.productIds.splice(index, 1)
}
}
},
updateValue() {
this.delete0()
const trademarkCategoryRelList = []
this.form.productIds.forEach(productId => {
trademarkCategoryRelList.push({
......
......@@ -124,7 +124,7 @@
trademarkCategoryRelList: []
})">添加商标</el-button>
<div slot="footer" class="dialog-footer">
<div slot="footer" style="text-align: center">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
......@@ -143,7 +143,6 @@ import {getProductList} from "@/api/ecw/product"
import BrandForm from "@/views/ecw/productBrank/BrandForm"
import Empower from "@/views/ecw/productBrank/Empower"
export default {
name: "ProductBrank",
components: {
......@@ -182,6 +181,10 @@ export default {
form: {},
// 表单校验
rules: {
titleZh: [{ required: true, message: '请输入品牌中文标题', trigger: "blur" }],
titleEn: [{ required: true, message: '请输入品牌英文标题', trigger: "blur" }],
// aorder: [{ required: true, message: '请输入排序', trigger: "blur" }],
filing: [{ required: true, message: '请选择是否备案', trigger: "change" }],
},
recordStatus: getDictDatas(DICT_TYPE.BRAND_REG_TYPE),
......@@ -196,7 +199,7 @@ export default {
created() {
this.getList();
getProductTypeList().then(r => {
this.productTypeList = r.data
this.productTypeList = [{id: 0, titleZh: '全部'}, ...r.data]
})
getProductList().then(r => {
this.productList = r.data
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment