|
|
@@ -27,35 +27,7 @@
|
|
|
</view>
|
|
|
<u-input border="none" v-model="addForm.distName" placeholder="请输入名称"></u-input>
|
|
|
</u-form-item>
|
|
|
- <u-form-item prop="abbrName" customStyle="padding:40rpx 0 34rpx" borderBottom>
|
|
|
- <view class="form-label flex_l">助记名</view>
|
|
|
- <u-input border="none" v-model="addForm.abbrName" placeholder="请输入助记名"></u-input>
|
|
|
- </u-form-item>
|
|
|
- <u-form-item prop="distDesc" customStyle="padding:40rpx 0 34rpx" borderBottom>
|
|
|
- <view class="form-label flex_l">说明</view>
|
|
|
- <u-input border="none" maxlength="11" v-model="addForm.distDesc" placeholder="请输入说明"></u-input>
|
|
|
- </u-form-item>
|
|
|
- <u-form-item prop="distBoss" customStyle="padding:40rpx 0 34rpx" borderBottom>
|
|
|
- <view class="form-label flex_l">
|
|
|
- <view class="label-tag"></view>
|
|
|
- 负责人
|
|
|
- </view>
|
|
|
- <u-input border="none" v-model="addForm.distBoss" placeholder="请输入负责人"></u-input>
|
|
|
- </u-form-item>
|
|
|
- <u-form-item prop="distBossPhone" customStyle="padding:40rpx 0 34rpx" borderBottom>
|
|
|
- <view class="form-label flex_l">
|
|
|
- <view class="label-tag"></view>
|
|
|
- 电话
|
|
|
- </view>
|
|
|
- <u-input maxlength="11" border="none" v-model="addForm.distBossPhone" placeholder="请输入电话"></u-input>
|
|
|
- </u-form-item>
|
|
|
- <u-form-item prop="businessScope" customStyle="padding:40rpx 0 34rpx" borderBottom>
|
|
|
- <view class="form-label flex_l">
|
|
|
- <view class="label-tag"></view>
|
|
|
- 业务范围
|
|
|
- </view>
|
|
|
- <u-input border="none" v-model="addForm.businessScope" placeholder="请输入业务范围"></u-input>
|
|
|
- </u-form-item>
|
|
|
+
|
|
|
<u-form-item prop="provinceDesc" borderBottom customStyle="padding:40rpx 0 30rpx" @click="showProvince = true">
|
|
|
<view class="form-label flex_l">
|
|
|
<view class="label-tag"></view>
|
|
|
@@ -71,30 +43,13 @@
|
|
|
clearable
|
|
|
customStyle="padding: 0 30rpx 0 12rpx"></u-input>
|
|
|
</u-form-item>
|
|
|
- <u-form-item prop="belongSale" borderBottom customStyle="padding:40rpx 0 30rpx" @click="openUser()">
|
|
|
+
|
|
|
+ <u-form-item prop="registerDistrict" customStyle="padding:40rpx 0 34rpx" borderBottom>
|
|
|
<view class="form-label flex_l">
|
|
|
<view class="label-tag"></view>
|
|
|
- 销售工程师
|
|
|
+ 注册地
|
|
|
</view>
|
|
|
- <u-input
|
|
|
- :readonly="true"
|
|
|
- placeholder="请选择销售工程师"
|
|
|
- v-model="addForm.belongSale"
|
|
|
- border="none"
|
|
|
- suffixIcon="arrow-down"
|
|
|
- suffixIconStyle="color:#CDCDCD"
|
|
|
- clearable
|
|
|
- customStyle="padding: 0 30rpx 0 12rpx"></u-input>
|
|
|
- </u-form-item>
|
|
|
- <u-form-item prop="remark" customStyle="padding:40rpx 0 34rpx" borderBottom>
|
|
|
- <view class="form-label flex_l">备注</view>
|
|
|
- <u-textarea
|
|
|
- v-model="addForm.remark"
|
|
|
- placeholder="请输入备注"
|
|
|
- maxlength="800"
|
|
|
- height="190rpx"
|
|
|
- count
|
|
|
- customStyle="border-radius:16rpx"></u-textarea>
|
|
|
+ <u-input border="none" v-model="addForm.registerDistrict" placeholder="请输入备注"></u-input>
|
|
|
</u-form-item>
|
|
|
</u-form>
|
|
|
<view class="center">
|
|
|
@@ -109,7 +64,6 @@
|
|
|
@cancel="showProvince = false"
|
|
|
@confirm="pickProvince"></u-picker>
|
|
|
<!-- 选择销售 -->
|
|
|
- <select-user ref="user" :query-params="{ roles: ['SalesEngineer','ProductLineManager'] }" @close="closeUser($event)"></select-user>
|
|
|
<u-notify ref="uNotify"></u-notify>
|
|
|
<u-toast ref="uToast"></u-toast>
|
|
|
</view>
|
|
|
@@ -129,38 +83,19 @@
|
|
|
provinceColumns: [],
|
|
|
addForm: {
|
|
|
distName: '',
|
|
|
- abbrName: '',
|
|
|
- distDesc: '',
|
|
|
- distBoss: '',
|
|
|
- distBossPhone: '',
|
|
|
- businessScope: '',
|
|
|
provinceId: null,
|
|
|
provinceDesc: '',
|
|
|
- belongSale: '',
|
|
|
- belongSaleId: 0,
|
|
|
- remark: '',
|
|
|
+ registerDistrict: '',
|
|
|
+ distType: '10',
|
|
|
},
|
|
|
rules: {
|
|
|
distName: [{ required: true, trigger: 'blur', message: '请输入名称' }],
|
|
|
- distBoss: [{ required: true, trigger: 'blur', message: '请输入负责人' }],
|
|
|
- distBossPhone: [
|
|
|
- {
|
|
|
- pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
|
|
|
- message: '请输入正确的手机号码',
|
|
|
- trigger: 'blur',
|
|
|
- required: true,
|
|
|
- },
|
|
|
- ],
|
|
|
- businessScope: [{ required: true, trigger: 'blur', message: '请填写业务范围' }],
|
|
|
+ registerDistrict: [{ required: true, trigger: 'blur', message: '请输入注册地' }],
|
|
|
provinceDesc: [{ required: true, trigger: 'blur', message: '请选择省份' }],
|
|
|
- belongSale: [{ required: true, trigger: 'blur', message: '请填写归属销售' }],
|
|
|
},
|
|
|
}
|
|
|
},
|
|
|
- onLoad(option) {
|
|
|
- this.addForm.custId = Number(option.id)
|
|
|
- this.addForm.custName = option.name
|
|
|
- },
|
|
|
+
|
|
|
created() {
|
|
|
const navData = uni.getMenuButtonBoundingClientRect()
|
|
|
this.height = navData.height + 'px'
|
|
|
@@ -177,16 +112,6 @@
|
|
|
})
|
|
|
.catch((err) => console.log(err))
|
|
|
},
|
|
|
- openUser() {
|
|
|
- this.$refs.user.open()
|
|
|
- },
|
|
|
- // 关闭选择销售
|
|
|
- closeUser(user) {
|
|
|
- if (user) {
|
|
|
- this.addForm.belongSaleId = user.id
|
|
|
- this.addForm.belongSale = user.label
|
|
|
- }
|
|
|
- },
|
|
|
// 省份选择
|
|
|
pickProvince(e) {
|
|
|
this.addForm.provinceId = e.value[0].id
|