|
@@ -18,53 +18,44 @@
|
|
|
>
|
|
|
<flexbox class="ygp-form-items" align="flex-start" justify="flex-start">
|
|
|
<el-form-item label="经销商名称" prop="colAddress" style="width: 50%;">
|
|
|
- <el-input v-model="form.colAddress" placeholder="请输入采集器编号" v-if="!editId" />
|
|
|
- <span v-else :class="loading?'el-icon-loading':''">{{detail.colAddress}}</span>
|
|
|
+ <el-input v-model="form.name" placeholder="请输入经销商名称" />
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="手机号码" prop="colAddress" style="width: 50%;">
|
|
|
- <el-input v-model="form.colAddress" placeholder="请输入采集器编号" v-if="!editId" />
|
|
|
- <span v-else :class="loading?'el-icon-loading':''">{{detail.colAddress}}</span>
|
|
|
+ <el-form-item label="手机号码" prop="mobile" style="width: 50%;">
|
|
|
+ <el-input v-model="form.mobile" placeholder="请输入采集器编号"/>
|
|
|
</el-form-item>
|
|
|
</flexbox>
|
|
|
<flexbox class="ygp-form-items" align="flex-start" justify="flex-start">
|
|
|
- <el-form-item label="上级渠道" prop="custId" style="width: 50%;">
|
|
|
+ <el-form-item label="上级渠道" prop="parentId" style="width: 50%;">
|
|
|
<el-select
|
|
|
- v-if="!editId"
|
|
|
- v-model="form.custId"
|
|
|
- placeholder="请选择客户"
|
|
|
+ v-model="form.parentId"
|
|
|
+ placeholder="请选择上级渠道"
|
|
|
style="width: 100%;"
|
|
|
filterable
|
|
|
clearable
|
|
|
- @change="getCustStoreItem"
|
|
|
>
|
|
|
<el-option
|
|
|
- v-for="(item, index) in custOptions"
|
|
|
+ v-for="(item, index) in channelList"
|
|
|
:key="index"
|
|
|
:label="item.name"
|
|
|
- :value="item.custId"
|
|
|
+ :value="item.channelId"
|
|
|
/>
|
|
|
</el-select>
|
|
|
- <span v-else :class="loading?'el-icon-loading':''">{{detail.customer && detail.customer.name}}</span>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="联系人" prop="colAddress" style="width: 50%;">
|
|
|
- <el-input v-model="form.colAddress" placeholder="请输入采集器编号" v-if="!editId" />
|
|
|
- <span v-else :class="loading?'el-icon-loading':''">{{detail.colAddress}}</span>
|
|
|
+ <el-form-item label="联系人" prop="contact" style="width: 50%;">
|
|
|
+ <el-input v-model="form.contact" placeholder="请输入联系人" />
|
|
|
</el-form-item>
|
|
|
</flexbox>
|
|
|
<flexbox class="ygp-form-items" align="flex-start" justify="flex-start">
|
|
|
- <el-form-item label="佣金比例" prop="colAddress" style="width: 50%;">
|
|
|
- <el-input v-model="form.colAddress" placeholder="请输入采集器编号" v-if="!editId" />
|
|
|
- <span v-else :class="loading?'el-icon-loading':''">{{detail.colAddress}}</span>
|
|
|
+ <el-form-item label="佣金比例" prop="commRate" style="width: 50%;">
|
|
|
+ <el-input v-model="form.commRate" placeholder="请输入佣金比例" />
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="经销商类型" prop="typeId" style="width: 50%;">
|
|
|
+ <el-form-item label="门店类型" prop="siteType" style="width: 50%;">
|
|
|
<el-select
|
|
|
- v-if="!editId"
|
|
|
- v-model="form.typeId"
|
|
|
- placeholder="请选择类型"
|
|
|
+ v-model="form.siteType"
|
|
|
+ placeholder="请选择门店类型"
|
|
|
style="width: 100%;"
|
|
|
filterable
|
|
|
clearable
|
|
|
- :disabled="editId?true:false"
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="(item, index) in typeOptions"
|
|
@@ -73,89 +64,105 @@
|
|
|
:value="item.typeId"
|
|
|
/>
|
|
|
</el-select>
|
|
|
- <span v-else :class="loading?'el-icon-loading':''">{{detail.typeId && detail.typeId.desc}}</span>
|
|
|
</el-form-item>
|
|
|
</flexbox>
|
|
|
-
|
|
|
<flexbox class="ygp-form-items" align="flex-start" justify="flex-start">
|
|
|
- <el-form-item label="地区" style="width: 50%;">
|
|
|
- <el-select v-model="form.status" placeholder="选择省份" clearable size="small" style="width: 33%;margin-right: 1px;">
|
|
|
+ <el-form-item label="门店名称" prop="siteName" style="width: 100%;">
|
|
|
+ <el-input v-model="form.siteName" placeholder="例如xxxx店, 对用户可见" />
|
|
|
+ </el-form-item>
|
|
|
+ </flexbox>
|
|
|
+ <flexbox class="ygp-form-items" align="flex-start" justify="flex-start">
|
|
|
+ <el-form-item label="省" prop="provinceId" style="width: 30%;">
|
|
|
+ <el-select
|
|
|
+ v-model="form.provinceId"
|
|
|
+ placeholder="选择省份"
|
|
|
+ clearable
|
|
|
+ size="small"
|
|
|
+ @change="getCityList()"
|
|
|
+ style="width: 100%;margin-right: 1px;">
|
|
|
<el-option
|
|
|
- v-for="dict in statusOptions"
|
|
|
- :key="dict.dictValue"
|
|
|
- :label="dict.dictLabel"
|
|
|
- :value="dict.dictValue"
|
|
|
+ v-for="item in provinceList"
|
|
|
+ :key="item.areaId"
|
|
|
+ :label="item.areaName"
|
|
|
+ :value="item.areaId"
|
|
|
/>
|
|
|
</el-select>
|
|
|
- <el-select v-model="form.status" placeholder="选择市" clearable size="small" style="width: 33%;margin-right: 1px;">
|
|
|
+
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="市" prop="cityId" style="width: 30%;">
|
|
|
+ <el-select
|
|
|
+ v-model="form.cityId"
|
|
|
+ placeholder="选择市"
|
|
|
+ clearable
|
|
|
+ size="small"
|
|
|
+ @change="getAreaList()"
|
|
|
+ style="width: 100%;margin-right: 1px;">
|
|
|
<el-option
|
|
|
- v-for="dict in statusOptions"
|
|
|
- :key="dict.dictValue"
|
|
|
- :label="dict.dictLabel"
|
|
|
- :value="dict.dictValue"
|
|
|
+ v-for="item in cityList"
|
|
|
+ :key="item.areaId"
|
|
|
+ :label="item.areaName"
|
|
|
+ :value="item.areaId"
|
|
|
/>
|
|
|
</el-select>
|
|
|
- <el-select v-model="form.status" placeholder="选择区" clearable size="small" style="width: 33%;margin-right: 1px;">
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="区" prop="areaId" style="width: 30%;" >
|
|
|
+ <el-select v-model="form.areaId"
|
|
|
+ placeholder="选择区"
|
|
|
+ clearable
|
|
|
+ size="small"
|
|
|
+ @change="getAreaName()"
|
|
|
+ style="width: 100%;margin-right: 1px;">
|
|
|
<el-option
|
|
|
- v-for="dict in statusOptions"
|
|
|
- :key="dict.dictValue"
|
|
|
- :label="dict.dictLabel"
|
|
|
- :value="dict.dictValue"
|
|
|
+ v-for="item in areaList"
|
|
|
+ :key="item.areaId"
|
|
|
+ :label="item.areaName"
|
|
|
+ :value="item.areaId"
|
|
|
/>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="详细地址" prop="colAddress" style="width: 50%;">
|
|
|
- <el-input v-model="form.colAddress" placeholder="请输入采集器编号" v-if="!editId" />
|
|
|
- <span v-else :class="loading?'el-icon-loading':''">{{detail.colAddress}}</span>
|
|
|
- </el-form-item>
|
|
|
</flexbox>
|
|
|
<flexbox
|
|
|
class="ygp-form-items"
|
|
|
align="flex-start"
|
|
|
justify="flex-start">
|
|
|
- <el-form-item label="营业执照" prop="rentContract" style="width: 50%;">
|
|
|
+ <el-form-item label="详细地址" prop="adress" style="width: 100%;">
|
|
|
+ <el-input v-model="form.adress" placeholder="请输入详细地址" />
|
|
|
+ </el-form-item>
|
|
|
+ </flexbox>
|
|
|
+ <flexbox
|
|
|
+ class="ygp-form-items"
|
|
|
+ align="flex-start"
|
|
|
+ justify="flex-start">
|
|
|
+ <el-form-item label="营业执照" prop="bizLicensePic" style="width: 50%;">
|
|
|
<image-upload
|
|
|
- :limit="7"
|
|
|
- :value="rentContract"
|
|
|
+ :limit="1"
|
|
|
+ :value="form.bizLicensePic"
|
|
|
:file-size="50"
|
|
|
:is-public="false"
|
|
|
:show-file-list="true"
|
|
|
- :auto-upload="false"
|
|
|
- @input="rentContractSelect"
|
|
|
+ @input="bizLicensePicSelect"
|
|
|
/>
|
|
|
+
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="门头照片" prop="rentContract" style="width: 50%;">
|
|
|
+
|
|
|
+ <el-form-item label="门头照片" prop="doorPic" style="width: 50%;">
|
|
|
<image-upload
|
|
|
- :limit="7"
|
|
|
- :value="rentContract"
|
|
|
+ :limit="1"
|
|
|
+ :value="form.doorPic"
|
|
|
:file-size="50"
|
|
|
- :is-public="false"
|
|
|
+ :is-public="true"
|
|
|
:show-file-list="true"
|
|
|
- :auto-upload="false"
|
|
|
- @input="rentContractSelect"
|
|
|
+ @input="doorPicSelect"
|
|
|
/>
|
|
|
+
|
|
|
</el-form-item>
|
|
|
+
|
|
|
</flexbox>
|
|
|
<flexbox class="ygp-form-items" align="flex-start" justify="flex-start">
|
|
|
- <el-form-item label="认证状态" prop="colAddress" style="width: 50%;">
|
|
|
- <el-input v-model="form.colAddress" placeholder="请输入采集器编号" v-if="!editId" />
|
|
|
- <span v-else :class="loading?'el-icon-loading':''">{{detail.colAddress}}</span>
|
|
|
+ <el-form-item label="认证状态" prop="certifyStatus" style="width: 50%;">
|
|
|
+ <el-checkbox v-model="form.certifyStatus">已认证</el-checkbox>
|
|
|
</el-form-item>
|
|
|
</flexbox>
|
|
|
- <!-- <flexbox class="ygp-form-items" align="flex-start" justify="flex-start">
|
|
|
- <el-form-item label="备注" prop="label" style="width: 100%;">
|
|
|
- <el-input
|
|
|
- type="textarea"
|
|
|
- :rows="3"
|
|
|
- :autosize="{ minRows: 3}"
|
|
|
- :maxlength="64"
|
|
|
- show-word-limit
|
|
|
- resize="none"
|
|
|
- v-model="form.label"
|
|
|
- placeholder="请输入备注"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
- </flexbox> -->
|
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
<el-button @click="close">取 消</el-button>
|
|
@@ -164,18 +171,11 @@
|
|
|
</el-dialog>
|
|
|
</template>
|
|
|
<script>
|
|
|
+import { addSaleSite, updateSaleSite, getSaleSiteDetail} from "@/api/admin/salesite";
|
|
|
+import { listAllChannel} from "@/api/admin/channel";
|
|
|
+import { listAreaByPid} from "@/api/admin/area";
|
|
|
import { mapGetters } from "vuex";
|
|
|
-import CustomFieldsMixin from "@/mixins/CustomFields";
|
|
|
-// import {
|
|
|
-// getCollector,
|
|
|
-// addCollector,
|
|
|
-// updateCollector,
|
|
|
-// itemTypes
|
|
|
-// } from "@/api/business/collector";
|
|
|
-// import { itemCustomer } from "@/api/business/customer";
|
|
|
-// import { itemStore } from "@/api/business/store";
|
|
|
export default {
|
|
|
- mixins: [CustomFieldsMixin],
|
|
|
props: {
|
|
|
dialogVisible: {
|
|
|
type: Boolean,
|
|
@@ -186,27 +186,66 @@ export default {
|
|
|
|
|
|
data() {
|
|
|
return {
|
|
|
+ IMG_URL: process.env.VUE_APP_IMG_URL,
|
|
|
loading: false,
|
|
|
+ // 上级渠道列表
|
|
|
+ channelList:[],
|
|
|
+ channelCopyList:[],
|
|
|
+ provinceList:[],
|
|
|
+ cityList:[],
|
|
|
+ areaList:[],
|
|
|
statusOptions: [],
|
|
|
+ typeOptions:[],
|
|
|
// 表单参数
|
|
|
- form: {},
|
|
|
+ form: {
|
|
|
+ name:"",
|
|
|
+ mobile:"",
|
|
|
+ contact:"",
|
|
|
+ commRate:"",
|
|
|
+ provinceId:"",
|
|
|
+ cityId:"",
|
|
|
+ areaId:"",
|
|
|
+ province:"",
|
|
|
+ city:"",
|
|
|
+ area:""
|
|
|
+ },
|
|
|
detail: {},
|
|
|
- feeItems: [],
|
|
|
- checkedItems: [],
|
|
|
- custOptions: [],
|
|
|
- storeOptions: [],
|
|
|
- typeOptions: [],
|
|
|
// 表单校验
|
|
|
rules: {
|
|
|
- custId: [{ required: true, message: "请选择客户", trigger: "change" }],
|
|
|
- storeId: [{ required: true, message: "请选择门店", trigger: "change" }],
|
|
|
- colAddress: [
|
|
|
- { required: true, message: "请输入采集器编号", trigger: "blur" }
|
|
|
+ name: [
|
|
|
+ { required: true, message: "请输入渠道名称", trigger: "blur" }
|
|
|
+ ],
|
|
|
+ mobile: [
|
|
|
+ { required: true, message: "请输入手机号码", trigger: "blur" },
|
|
|
+ {pattern: /^((\+?86)|(\(\+86\)))?1\d{10}$/, message: "请输入正确的手机号码", trigger: "blur" }
|
|
|
],
|
|
|
- typeId: [
|
|
|
- { required: true, message: "请选择设备类型", trigger: "change" }
|
|
|
+ parentId: [{ required: true, message: "请选择上级渠道", trigger: "change" }],
|
|
|
+ contact: [
|
|
|
+ { required: true, message: "请输入联系人", trigger: "blur" }
|
|
|
],
|
|
|
- label: [{ required: false, message: "请输入备注", trigger: "blur" }]
|
|
|
+ commRate: [
|
|
|
+ { required: true, message: "请输入佣金比例", trigger: "blur" },
|
|
|
+ { pattern: /^(([1-9]{1}\d{0,99}))(\.\d{1,2})?$/, message: "佣金比例只能为大于0的数字", trigger:['blur', 'change'] },
|
|
|
+ ],
|
|
|
+ siteType: [
|
|
|
+ { required: true, message: "请选择门店类型", trigger: "change" }
|
|
|
+ ],
|
|
|
+ siteName: [
|
|
|
+ { required: true, message: "请输入门店名称", trigger: "blur" }
|
|
|
+ ],
|
|
|
+ provinceId: [{ required: true, message: "请选择省", trigger: "change" }],
|
|
|
+ cityId: [{ required: true, message: "请选择市", trigger: "change" }],
|
|
|
+ areaId: [{ required: true, message: "请选择区", trigger: "change" }],
|
|
|
+ address: [
|
|
|
+ { required: true, message: "请输入详细地址", trigger: "blur" }
|
|
|
+ ],
|
|
|
+ bizLicensePic: [
|
|
|
+ { required: true, message: "请选择营业执照", trigger: "blur" }
|
|
|
+ ],
|
|
|
+ doorPic: [
|
|
|
+ { required: true, message: "请选择门头照片", trigger: "blur" }
|
|
|
+ ],
|
|
|
+
|
|
|
},
|
|
|
//招商推广宣传图
|
|
|
picture: []
|
|
@@ -226,8 +265,12 @@ export default {
|
|
|
//console.log("watch dialogVisible created == ");
|
|
|
// 是编辑
|
|
|
if (this.editId) {
|
|
|
- // this.getDetail();
|
|
|
+ this.getDetail();
|
|
|
+ }else{
|
|
|
+ this.getProvinceList()
|
|
|
}
|
|
|
+ this.getChannelList()
|
|
|
+
|
|
|
},
|
|
|
|
|
|
mounted() {
|
|
@@ -242,70 +285,145 @@ export default {
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
- // /** 查询可分配的门店 */
|
|
|
- getCustItems() {
|
|
|
- this.custOptions = [];
|
|
|
- itemCustomer({})
|
|
|
- .then(res => {
|
|
|
- const resData = res.data || [];
|
|
|
- this.custOptions = resData;
|
|
|
+
|
|
|
+ // 获取上级渠道下拉列表
|
|
|
+ getChannelList(){
|
|
|
+ listAllChannel().then(response => {
|
|
|
+ // console.log("getChannelList == "+ JSON.stringify(response.data))
|
|
|
+ this.channelList = this.channelList.concat(response.data || []);
|
|
|
+ this.channelCopyList = this.channelList;
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
+
|
|
|
+ // 添加营业执照
|
|
|
+ bizLicensePicSelect(data) {
|
|
|
+ this.form.bizLicensePic = data
|
|
|
+ console.log("bizLicensePicSelect 添加营业执照 data = "+JSON.stringify(data))
|
|
|
+ },
|
|
|
+
|
|
|
+ // 添加门头照片
|
|
|
+ doorPicSelect(data) {
|
|
|
+ this.form.doorPic = data
|
|
|
+ console.log("doorPicSelect 添加门头照片 data = "+JSON.stringify(data))
|
|
|
+ },
|
|
|
+
|
|
|
+ // 省
|
|
|
+ getProvinceList(){
|
|
|
+ this.cityList = []
|
|
|
+ this.areaList = []
|
|
|
+ this.form.cityId = ""
|
|
|
+ this.form.city = ""
|
|
|
+ this.form.areaId = ""
|
|
|
+ this.form.area = ""
|
|
|
+ listAreaByPid(0).then(response => {
|
|
|
+ // console.log("getProvinceList"+JSON.stringify(response))
|
|
|
+ console.log("getProvinceList this.form=="+JSON.stringify(this.form))
|
|
|
+ this.provinceList = response || [];
|
|
|
+ console.log("this.editId && this.form.provinceId == "+(this.editId && this.form.provinceId))
|
|
|
+ if(this.editId && this.detail.provinceId){
|
|
|
+ this.form.provinceId = this.detail.provinceId
|
|
|
+ this.getCityList()
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
+ getProvinceName(){
|
|
|
+ let val = this.form.provinceId
|
|
|
+ if(val){
|
|
|
+ let nameObj = this.provinceList.find(item => {
|
|
|
+ return item.areaId == val;
|
|
|
})
|
|
|
- .catch(() => {
|
|
|
- this.loading = false;
|
|
|
- });
|
|
|
+ return nameObj && nameObj.areaName
|
|
|
+ }
|
|
|
+ return ""
|
|
|
+ },
|
|
|
+
|
|
|
+
|
|
|
+ getCityList(){
|
|
|
+ this.cityList = []
|
|
|
+ this.areaList = []
|
|
|
+ this.form.cityId = ""
|
|
|
+ this.form.city = ""
|
|
|
+ this.form.areaId = ""
|
|
|
+ this.form.area = ""
|
|
|
+ var provinceId = this.form.provinceId
|
|
|
+ this.form.province = this.getProvinceName()
|
|
|
+ listAreaByPid(provinceId).then(response => {
|
|
|
+ this.cityList = response || [];
|
|
|
+ if(this.editId && this.detail.cityId){
|
|
|
+ this.form.cityId = this.detail.cityId
|
|
|
+ this.getAreaList()
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
},
|
|
|
|
|
|
- // /** 查询可分配的门店 */
|
|
|
- getCustStoreItem() {
|
|
|
- this.storeOptions = [];
|
|
|
- this.$set(this.form, "storeId", "");
|
|
|
- itemStore({
|
|
|
- custId: this.form.custId
|
|
|
- })
|
|
|
- .then(res => {
|
|
|
- const resData = res.data || [];
|
|
|
- this.storeOptions = resData;
|
|
|
+ getCityName(){
|
|
|
+ let val = this.form.cityId
|
|
|
+ if(val){
|
|
|
+ let nameObj = this.cityList.find(item => {
|
|
|
+ return item.areaId == val;
|
|
|
})
|
|
|
- .catch(() => {
|
|
|
- this.loading = false;
|
|
|
- });
|
|
|
+ return nameObj && nameObj.areaName
|
|
|
+ }
|
|
|
+ return ""
|
|
|
+ },
|
|
|
+
|
|
|
+ getAreaList(){
|
|
|
+ var cityId = this.form.cityId
|
|
|
+ this.form.city = this.getCityName();
|
|
|
+ listAreaByPid(cityId).then(response => {
|
|
|
+ // console.log("getAreaList"+JSON.stringify(response))
|
|
|
+ this.areaList = response || [];
|
|
|
+ if(this.editId && this.detail.areaId){
|
|
|
+ this.form.areaId = this.detail.areaId
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
|
|
|
- // /** 查询可分配的门店 */
|
|
|
- getTypeItems() {
|
|
|
- this.typeOptions = [];
|
|
|
- itemTypes({})
|
|
|
- .then(res => {
|
|
|
- const resData = res.data || [];
|
|
|
- this.typeOptions = resData;
|
|
|
+ getAreaName(){
|
|
|
+ let val = this.form.areaId
|
|
|
+ if(val){
|
|
|
+ let nameObj = this.areaList.find(item => {
|
|
|
+ return item.areaId == val;
|
|
|
})
|
|
|
- .catch(() => {
|
|
|
- this.loading = false;
|
|
|
- });
|
|
|
+ this.form.area = nameObj && nameObj.areaName
|
|
|
+ }else{
|
|
|
+ this.form.area = "";
|
|
|
+ }
|
|
|
},
|
|
|
|
|
|
+ dataFilter(val) {
|
|
|
+ this.value = val;
|
|
|
+ if (val) { //val存在
|
|
|
+ this.channelList = this.channelCopyList.filter((item) => {
|
|
|
+ // console.log("dataFilter item"+JSON.stringify(item))
|
|
|
+ if (!!~item.mobile.indexOf(val) || !!~item.mobile.toUpperCase().indexOf(val.toUpperCase())) {
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else { //val为空时,还原数组
|
|
|
+ this.channelList = this.channelCopyList;
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
* 获取项目详情
|
|
|
*/
|
|
|
getDetail() {
|
|
|
this.loading = true;
|
|
|
- getCollector({
|
|
|
- colDeviceId: this.editId
|
|
|
- }).then(res => {
|
|
|
+ getSaleSiteDetail(this.editId).then(res => {
|
|
|
const data = res.data || {}
|
|
|
// console.log("getDetail :" + JSON.stringify(data))
|
|
|
this.detail = data
|
|
|
- this.$set(this.form,'custId', data.custId)
|
|
|
- this.$set(this.form,'storeId', data.storeId)
|
|
|
- this.$set(this.form,'colAddress', data.colAddress)
|
|
|
- const deviceCategory = JSON.parse(data.typeId || {})
|
|
|
- this.detail.typeId = deviceCategory
|
|
|
- this.$set(this.form,'typeId', deviceCategory.value)
|
|
|
- this.$set(this.form,'label', data.label)
|
|
|
+ this.form.name = data.name
|
|
|
+ this.form.mobile = data.mobile
|
|
|
+ this.form.contact = data.contact
|
|
|
+ this.form.commRate = data.commRate
|
|
|
this.loading = false
|
|
|
- // if(this.editId){
|
|
|
- // this.getCustStoreItem()
|
|
|
- // }
|
|
|
+ this.getProvinceList()
|
|
|
})
|
|
|
.catch(() => {
|
|
|
this.loading = false;
|
|
@@ -333,11 +451,11 @@ export default {
|
|
|
* 保存
|
|
|
*/
|
|
|
submitForm(params) {
|
|
|
- // console.log("submitForm =============")
|
|
|
+ // console.log("submitForm =============")
|
|
|
if (this.editId) {
|
|
|
- params.colDeviceId = this.editId;
|
|
|
+ params.channelId = this.editId;
|
|
|
}
|
|
|
- const request = this.editId ? updateCollector : addCollector
|
|
|
+ const request = this.editId ? updateSaleSite : addSaleSite
|
|
|
// console.log("submitForm params = "+ JSON.stringify(params))
|
|
|
request(params).then(response => {
|
|
|
this.loading = false
|