Commit 8e64cbef by wangql

修改第二轮测试BUG

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