Commit 8e64cbef by wangql

修改第二轮测试BUG

1 parent 735a4da7
......@@ -119,6 +119,14 @@ export const Util = {
},
/**
* 只能输入英文字母和数字,不能输入中文
*/
validationInput: function(str) {
let reg = /[^\w\.\/]/ig;
return reg.test(str);
},
/**
* 获取当前时间
*/
getCurrentDate: function() {
......
......@@ -274,6 +274,7 @@
type="textarea"
v-model="subItem.content"
:rows="4"
:maxlength="subItem.maxlength"
placeholder="请输入详情内容"
></el-input>
<i
......
......@@ -25,6 +25,7 @@
:label="item.merchantName"
/>
</el-select>
&nbsp;&nbsp;&nbsp;<span class="warningFont" v-if="nostoreError">暂无服务的4S店</span>
</el-form-item>
<el-form-item id="adviser" label="销售顾问" required>
......@@ -97,6 +98,8 @@
<el-input
v-model="form.cusOccupation"
class="itd"
maxlength="20"
show-word-limit
clearable
/>
</el-form-item>
......@@ -218,6 +221,8 @@
type="textarea"
rows="3"
style="width:600px"
maxlength="64"
show-word-limit
/>
</el-form-item>
</el-form>
......@@ -248,6 +253,20 @@ export default {
}
callback()
}
function checkContacts(rule, value, callback) {
if (value) {
if(value.length != 17){
callback(new Error('车架号必须为17位数字或字符'))
return false
}else{
if (Util.validationInput(value)) {
callback(new Error('车架号必须为17位数字或字符'))
return false
}
}
}
callback()
}
return {
key: new Date(),
form: {},
......@@ -285,6 +304,7 @@ export default {
TB_height: 90,
goodList: [],
selectList: [],
nostoreError: false,
showChooseCusError: false,
showChoosePrError: false,
formRules: {
......@@ -317,6 +337,10 @@ export default {
required: true,
message: '请输入车架号',
trigger: 'blur'
},
{
validator: checkContacts,
trigger: 'blur'
}]
// cusType: [{
// required: true,
......@@ -375,6 +399,11 @@ export default {
const params = {}
getServiceStore(params).then(res => {
this.storeIdList = res || []
if(this.storeIdList.length == 0){
this.nostoreError = true
}else{
this.nostoreError = false
}
})
},
......@@ -382,6 +411,8 @@ export default {
* 根据门店商户号获取员工列表
*/
getAdviser(merchantId) {
this.$set(this.form, 'employee', '')
this.selectList = []
const list = this.storeIdList
const o = list.find(k => k.merchantId == merchantId)
const channelType = o.channelType
......@@ -389,7 +420,6 @@ export default {
const params = { 'merchantId': merchantId, 'channelType': channelType }
getStaff(params).then(res => {
this.adviserList = res || []
this.selectList = []
})
/** 根据门店商户号获取基础商品列表 */
......@@ -561,6 +591,7 @@ export default {
const customer = {}
// const goods = []
/** 判断是否选择销售顾问 */
console.log(this.form.employee)
if (this.form.employee) {
this.showChooseCusError = false
} else {
......
......@@ -56,7 +56,8 @@ export default {
formBlock: [{
name: 'goodsName',
label: '产品名称',
type: 'input'
type: 'input',
maxlength:32
}, {
name: 'goodsType',
label: '分类',
......@@ -70,7 +71,8 @@ export default {
}, {
name: 'sapCode',
label: 'SAP编码',
type: 'input'
type: 'input',
maxlength:32
}, {
name: 'brandMerchantCode',
label: '品牌商',
......@@ -96,7 +98,8 @@ export default {
}, {
name: 'goodsDescList',
label: '产品描述',
type: 'descList'
type: 'descList',
maxlength:256
}]
}],
baseData: {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!