Browse Source

feature(客户): 客户类型下拉选值错误,编辑时允许地区为空

ZZH-wl 2 years ago
parent
commit
8a0c7997dd

+ 1 - 1
src/views/customer/components/Edit.vue

@@ -252,7 +252,7 @@
         if (valid == false) return
         if (!params.province.id) return this.$message.warning('请选择所在省')
         if (!params.city.id) return this.$message.warning('请选择所在市')
-        if (!params.region.id) return this.$message.warning('请选择所在区')
+        // if (!params.region.id) return this.$message.warning('请选择所在区')
         let arr = []
         arr.push(params.province.distName)
         if (params.city.id) arr.push(params.city.distName)

+ 2 - 2
src/views/customer/list.vue

@@ -21,8 +21,8 @@
         <el-input v-model="queryForm.custName" placeholder="客户名称" />
       </el-col>
       <el-col :span="4">
-        <el-select v-model="queryForm.custIndustry" placeholder="客户类型" style="width: 100%">
-          <el-option v-for="item in industryOptions" :key="item.value" :label="item.value" :value="item.value" />
+        <el-select v-model="queryForm.custIndustry" clearable placeholder="客户类型" style="width: 100%">
+          <el-option v-for="item in industryOptions" :key="item.key" :label="item.value" :value="item.key" />
         </el-select>
       </el-col>
       <!-- <el-col :span="4">

+ 2 - 2
src/views/customer/openSea.vue

@@ -18,8 +18,8 @@
             <el-input v-model="queryForm.custName" placeholder="客户名称" />
           </el-form-item>
           <el-form-item>
-            <el-select v-model="queryForm.custIndustry" placeholder="客户类型" style="width: 100%">
-              <el-option v-for="item in industryOptions" :key="item.value" :label="item.value" :value="item.value" />
+            <el-select v-model="queryForm.custIndustry" clearable placeholder="客户类型" style="width: 100%">
+              <el-option v-for="item in industryOptions" :key="item.key" :label="item.value" :value="item.key" />
             </el-select>
           </el-form-item>
           <!-- <el-form-item>

+ 7 - 2
src/views/proj/business/components/ProductTable.vue

@@ -25,7 +25,12 @@
               @change="handleChange(row)" />
           </span>
           <span v-else-if="item.prop == 'prodNum'">
-            <el-input v-model.number.trim="row.prodNum" :min="1" size="mini" @change="handleChange(row)" />
+            <el-input
+              v-model.trim="row.prodNum"
+              :min="1"
+              onkeyup="value=value.replace(/[^\d]/g,'')"
+              size="mini"
+              @change="handleChange(row)" />
           </span>
           <span v-else-if="item.label == '合计'">
             {{ calculatedDiscount(row.prodPrice, row.prodNum) }}
@@ -114,7 +119,7 @@
     methods: {
       // input修改
       handleChange(row) {
-        console.log('row', row)
+        row.prodNum = parseInt(row.prodNum) || 1
         this.$emit('changeProductData', row)
       },
       // 删除