Qukatie 1 неделя назад
Родитель
Сommit
e6ef45202d

+ 5 - 0
src/views/tirePartsMall/basicData/commodityInformation/detailsPage.vue

@@ -25,6 +25,7 @@
           <template slot="goodsTypeId" slot-scope="{ disabled }">
             <div style="display:flex;">
               <avue-cascader
+                ref="cascader"
                 :disabled="disabled || editDisabled"
                 :emit-path="false"
                 check-strictly
@@ -33,6 +34,7 @@
                 placeholder="请选择产品分类"
                 :dic="goodsTypeList"
                 :props="props"
+                @change="typeChange"
               ></avue-cascader>
               <i class="el-icon-circle-plus-outline" style="font-size:18px;line-height: 32px;margin-left:4px" @click="goodsTypeVisible = true"></i>
             </div>
@@ -738,6 +740,9 @@ export default {
         this.option.disabled = false;
       }
     },
+    typeChange(a, b) {
+      console.log(a, b);
+    },
     getAllWorkDicts() {
       // getGoodstype().then(res => {
       //   this.goodsTypeList = res.data.data;

+ 26 - 10
src/views/tirePartsMall/basicData/customerInformation/detailsPage.vue

@@ -84,14 +84,16 @@
           <template slot-scope="{ type, size, row, disabled, index }" slot="menu">
             <el-button
               :size="size"
-              :disabled="disabled||editDisabled"
+              :disabled="disabled || editDisabled"
               :type="type"
               :icon="row.$cellEdit ? 'el-icon-plus' : 'el-icon-edit'"
               @click="$refs.crudTwo.rowEdit(row, index)"
               >{{ row.$cellEdit ? "确认" : "修改" }}
             </el-button>
-            <el-button icon="el-icon-delete" :size="size" :disabled="disabled||editDisabled" :type="type" @click="rowDelTwo(row, index)">删除 </el-button>
-            <el-button icon="el-icon-check" :size="size" :type="type" @click="creatingUsers(row)" >创建用户</el-button>
+            <el-button icon="el-icon-delete" :size="size" :disabled="disabled || editDisabled" :type="type" @click="rowDelTwo(row, index)"
+              >删除
+            </el-button>
+            <el-button icon="el-icon-check" :size="size" :type="type" @click="creatingUsers(row)">创建用户</el-button>
           </template>
         </avue-crud>
       </trade-card>
@@ -122,16 +124,24 @@
             <!--</el-button>-->
             <el-button
               :size="size"
-              :disabled="disabled||editDisabled"
+              :disabled="disabled || editDisabled"
               :type="type"
               :icon="row.$cellEdit ? 'el-icon-plus' : 'el-icon-edit'"
               @click="$refs.crud.rowCell(row, index)"
               >{{ row.$cellEdit ? "确认" : "修改" }}
             </el-button>
-            <el-button icon="el-icon-delete" :size="size" :disabled="disabled||editDisabled" :type="type" @click="rowDel(row, index)">删除 </el-button>
+            <el-button icon="el-icon-delete" :size="size" :disabled="disabled || editDisabled" :type="type" @click="rowDel(row, index)"
+              >删除
+            </el-button>
           </template>
           <template slot="defaultAddres" slot-scope="{ row, index, disabled }">
-            <el-switch active-value="1" inactive-value="0" :disabled="disabled||editDisabled" v-model="row.defaultAddres" @change="addressUnique(row, index)">
+            <el-switch
+              active-value="1"
+              inactive-value="0"
+              :disabled="disabled || editDisabled"
+              v-model="row.defaultAddres"
+              @change="addressUnique(row, index)"
+            >
             </el-switch>
           </template>
         </avue-crud>
@@ -144,7 +154,7 @@
         :data="corpsFiles"
         display
         :enumerationValue="35.1"
-        :disabled="detailData.status == 1||editDisabled"
+        :disabled="detailData.status == 1 || editDisabled"
       ></c-upload>
       <el-dialog
         title="设置客户分类"
@@ -463,7 +473,7 @@ export default {
       data1: [],
       data2: [],
       option: {
-        disabled:false,
+        disabled: false,
         menuBtn: false,
         labelWidth: 130,
         column: [
@@ -1117,18 +1127,24 @@ export default {
         if (valid) {
           if (this.contactsData.length == 0) return this.$message.error("请添加客户联系人");
           if (this.data.length == 0) return this.$message.error("请添加地址信息");
-          this.loadingBtn = true;
+          if (this.form.tel) {
+            if (!/^[1][3,4,5,6,7,8,9][0-9]{9}$/.test(this.form.tel)) {
+              this.$message.error("请正确输入电话");
+              return;
+            }
+          }
           if (!this.form.id) {
             this.form.checkStatus = "通过";
 
             // typeof(this.form.brandId) == 'Array' ? this.form.prandId.join(',') : this.form.brandId = ''
           }
-          console.log(this.form.$brandId);
+
           if (this.form.$brandId) {
             this.form.brandName = this.form.$brandId.split("|").join(",");
           } else {
             this.form.brandName = null;
           }
+          this.loadingBtn = true;
           submit({
             ...this.form,
             code: this.form.cname,

+ 3 - 6
src/views/tirePartsMall/configuration/commodity.json

@@ -128,8 +128,7 @@
       "prop": "originalFactory",
       "type":"select",
       "search":true,
-      "hide": false,
-      "showColumn": true,
+      "hide": true,
       "width": 120,
       "dicData":[{
         "label":"否",
@@ -144,8 +143,7 @@
       "prop": "explosionProof",
       "type":"select",
       "search":true,
-      "hide": false,
-      "showColumn": true,
+      "hide": true,
       "width": 120,
       "dicData":[{
         "label":"否",
@@ -160,8 +158,7 @@
       "prop": "selfRecovery",
       "type":"select",
       "search":true,
-      "hide": false,
-      "showColumn": true,
+      "hide": true,
       "width": 120,
       "dicData":[{
         "label":"否",

+ 77 - 72
src/views/tirePartsMall/salesManagement/purchaseOrder/detailsPage.vue

@@ -140,10 +140,20 @@
                   @click="rowAdd(row)"
                   >添加商品</el-button
                 >
-                <el-button type="success" size="small" :disabled="isAddBtn||(form.id && form.status != '录入')" icon="el-icon-bottom" @click="excelDialogfun('名称')"
+                <el-button
+                  type="success"
+                  size="small"
+                  :disabled="isAddBtn || (form.id && form.status != '录入')"
+                  icon="el-icon-bottom"
+                  @click="excelDialogfun('名称')"
                   >按名称导入
                 </el-button>
-                <el-button type="success" size="small" :disabled="isAddBtn||(form.id && form.status != '录入')" icon="el-icon-bottom" @click="excelDialogfun('code')"
+                <el-button
+                  type="success"
+                  size="small"
+                  :disabled="isAddBtn || (form.id && form.status != '录入')"
+                  icon="el-icon-bottom"
+                  @click="excelDialogfun('code')"
                   >按Code导入
                 </el-button>
                 <el-button type="primary" icon="el-icon-printer" size="small" @click="handlePrint">打印</el-button>
@@ -746,8 +756,6 @@ export default {
             label: "电话",
             disabled: false,
             prop: "phone",
-            type: "number",
-            controls: false
           },
           {
             label: "地址",
@@ -1300,15 +1308,15 @@ export default {
       if (res.data.data == 1) {
         this.findObject(this.optionContacts.column, "pattern").label = "规格型号1";
         this.findObject(this.optionTwo.column, "brandItem").label = "规格型号1";
-        this.findObject(this.optionTwo.column, "originalFactory").search = false;
-        this.findObject(this.optionTwo.column, "explosionProof").search = false;
-        this.findObject(this.optionTwo.column, "selfRecovery").search = false;
-        this.findObject(this.optionTwo.column, "explosionProof").hide = true;
-        this.findObject(this.optionTwo.column, "originalFactory").hide = true;
-        this.findObject(this.optionTwo.column, "selfRecovery").hide = true;
-        this.findObject(this.optionTwo.column, "explosionProof").showColumn = false;
-        this.findObject(this.optionTwo.column, "originalFactory").showColumn = false;
-        this.findObject(this.optionTwo.column, "selfRecovery").showColumn = false;
+        // this.findObject(this.optionTwo.column, "originalFactory").search = false;
+        // this.findObject(this.optionTwo.column, "explosionProof").search = false;
+        // this.findObject(this.optionTwo.column, "selfRecovery").search = false;
+        // this.findObject(this.optionTwo.column, "explosionProof").hide = true;
+        // this.findObject(this.optionTwo.column, "originalFactory").hide = true;
+        // this.findObject(this.optionTwo.column, "selfRecovery").hide = true;
+        // this.findObject(this.optionTwo.column, "explosionProof").showColumn = false;
+        // this.findObject(this.optionTwo.column, "originalFactory").showColumn = false;
+        // this.findObject(this.optionTwo.column, "selfRecovery").showColumn = false;
       }
     });
     this.findObject(this.optionContacts.column, "goodsId").change = ({ value, column }) => {
@@ -1923,70 +1931,67 @@ export default {
             this.$set(this.optionForm, "disabled", true);
             this.$set(this.optionContactsBack, "disabled", true);
             this.$refs["form"].validate((valid, done) => {
+              done();
               if (valid) {
-                this.$refs["form"].validate((valid, done) => {
-                  done();
-                  if (valid) {
-                    const loading = this.$loading({
-                      lock: true,
-                      text: "加载中",
-                      spinner: "el-icon-loading",
-                      background: "rgba(255,255,255,0.7)"
-                    });
-                    inboundTask({
-                      bsType: "CG",
-                      ...this.form
-                    })
-                      .then(res => {
-                        this.refresh(res.data.data.id);
-                        // this.isDisabledTask = false
-                        this.editButton = true;
-                        this.isDisabledTask = true;
-                        // 将按钮文本更改为"撤销任务"
-                        this.buttonText = "撤销任务";
-                        // 将按钮颜色更改为对应的颜色
-                        this.buttonColor = "warning"; // 比如改为warning
-                        this.refresh(res.data.data.id, true);
-                        this.isContacts = true;
-                        this.isAdd = true;
-                        this.isDisabled = true;
-                        // this.findObject(this.optionForm,'disabled') = true
-                        // this.findObject(this.optionContactsBack,'disabled') = true
-                        this.$message.success("生成入库任务成功");
-                        this.isApplySettlement = false;
-                        loading.close();
-
-                        // generateShipTask(this.form).then(res => {
-                        //     console.log(res.data);
-                        //     // 将按钮文本更改为"撤销任务"
-                        //     this.buttonText = '撤销任务';
-                        //     // 将按钮颜色更改为对应的颜色
-                        //     this.buttonColor = 'warning'; // 比如改为warning
-                        //     this.refresh(res.data.data.id, true)
-                        //     this.isContacts = true
-                        //     this.isAdd = true
-                        //     this.isDisabled = true
-                        //     // this.findObject(this.optionForm,'disabled') = true
-                        //     // this.findObject(this.optionContactsBack,'disabled') = true
-                        //     this.$message.success("生成入库任务成功");
-                        //     this.isApplySettlement = false
-                        //     loading.close();
-                        //
-                        // }).finally(() => {
-                        //     loading.close();
-                        // });
-                      })
-                      .finally(() => {
-                        loading.close();
-                      });
-                  } else {
-                    return false;
+                for (let i in this.form.orderItemsList) {
+                  if (this.form.orderItemsList[i].goodsNum <= 0) {
+                    return this.$message.warning(`采购明细序号${Number(i) + 1}的数量不能为零`);
                   }
+                }
+                const loading = this.$loading({
+                  lock: true,
+                  text: "加载中",
+                  spinner: "el-icon-loading",
+                  background: "rgba(255,255,255,0.7)"
                 });
+                inboundTask({
+                  bsType: "CG",
+                  ...this.form
+                })
+                  .then(res => {
+                    this.refresh(res.data.data.id);
+                    // this.isDisabledTask = false
+                    this.editButton = true;
+                    this.isDisabledTask = true;
+                    // 将按钮文本更改为"撤销任务"
+                    this.buttonText = "撤销任务";
+                    // 将按钮颜色更改为对应的颜色
+                    this.buttonColor = "warning"; // 比如改为warning
+                    this.refresh(res.data.data.id, true);
+                    this.isContacts = true;
+                    this.isAdd = true;
+                    this.isDisabled = true;
+                    // this.findObject(this.optionForm,'disabled') = true
+                    // this.findObject(this.optionContactsBack,'disabled') = true
+                    this.$message.success("生成入库任务成功");
+                    this.isApplySettlement = false;
+                    loading.close();
 
-                done();
+                    // generateShipTask(this.form).then(res => {
+                    //     console.log(res.data);
+                    //     // 将按钮文本更改为"撤销任务"
+                    //     this.buttonText = '撤销任务';
+                    //     // 将按钮颜色更改为对应的颜色
+                    //     this.buttonColor = 'warning'; // 比如改为warning
+                    //     this.refresh(res.data.data.id, true)
+                    //     this.isContacts = true
+                    //     this.isAdd = true
+                    //     this.isDisabled = true
+                    //     // this.findObject(this.optionForm,'disabled') = true
+                    //     // this.findObject(this.optionContactsBack,'disabled') = true
+                    //     this.$message.success("生成入库任务成功");
+                    //     this.isApplySettlement = false
+                    //     loading.close();
+                    //
+                    // }).finally(() => {
+                    //     loading.close();
+                    // });
+                  })
+                  .finally(() => {
+                    loading.close();
+                  });
               } else {
-                this.$message.error("请选择仓库");
+                return false;
               }
             });
           }

+ 11 - 8
src/views/tirePartsMall/salesManagement/saleOrder/detailsPage.vue

@@ -893,8 +893,6 @@ export default {
             label: "电话",
             disabled: false,
             prop: "phone",
-            type: "number",
-            controls: false
           },
           {
             label: "收货地址",
@@ -1006,12 +1004,12 @@ export default {
             overHidden: true,
             disabled: true
           },
-            {
-                label: "红包抵扣",
-                prop: "redPacketAmount",
-                overHidden: true,
-                disabled: true
-            },
+          {
+            label: "红包抵扣",
+            prop: "redPacketAmount",
+            overHidden: true,
+            disabled: true
+          },
           {
             label: "已收金额",
             prop: "paymentAmountTl",
@@ -2481,6 +2479,11 @@ export default {
             this.$refs["form"].validate((valid, done) => {
               done();
               if (valid) {
+                for (let i in this.form.orderItemsList) {
+                  if (this.form.orderItemsList[i].goodsNum <= 0) {
+                    return this.$message.warning(`销售明细序号${Number(i) + 1}的数量不能为零`);
+                  }
+                }
                 const loading = this.$loading({
                   lock: true,
                   text: "加载中",