Explorar el Código

fix:报备问题修改

snow hace 1 año
padre
commit
885bc55b27

+ 64 - 54
src/views/goodStore/goodsCost/detail.vue

@@ -50,13 +50,16 @@
                     </template>
                   </template>
 
-
                   <template slot="packing_spec">
-                    <el-tag size="mini">{{ ( options6.find(({id}) => id === sitem.supply_area) || {}).name || '--' }}</el-tag>
+                    <el-tag
+                      size="mini"
+                    >{{ ( options6.find(({id}) => id === sitem.supply_area) || {}).name || '--' }}</el-tag>
                   </template>
 
                   <template slot="is_auth">
-                    <el-tag size="mini">{{ ( options3.find(({id}) => id === sitem.is_auth) || {}).name || '--' }}</el-tag>
+                    <el-tag
+                      size="mini"
+                    >{{ ( options3.find(({id}) => id === sitem.is_auth) || {}).name || '--' }}</el-tag>
                   </template>
 
                   <template slot="good_info_img">
@@ -71,9 +74,9 @@
 
                   <template slot="cat_info">
                     {{
-                      sitem.cat_info
-                        ? sitem.cat_info.map(({ name }) => name).join("_")
-                        : "--"
+                    sitem.cat_info
+                    ? sitem.cat_info.map(({ name }) => name).join("_")
+                    : "--"
                     }}
                   </template>
 
@@ -84,7 +87,7 @@
                       style="width: 23px; height: 23px; margin: 0 5px 0 0"
                       class="fl"
                       :src="sitem.good_thumb_img"
-                      alt=""
+                      alt
                     />
                     <span>{{ sitem.good_name }}</span>
                     <span v-for="(si, i) in sitem.speclist" :key="si.spec_id + i">
@@ -95,7 +98,8 @@
                     <el-popover placement="top" width="300" trigger="hover">
                       <ul>
                         <li v-if="newTime !== '' && isDisplayPrivateField('1')">
-                          <span>商品成本编号:</span><span>{{ sitem.spuCode }}</span>
+                          <span>商品成本编号:</span>
+                          <span>{{ sitem.spuCode }}</span>
                         </li>
                       </ul>
                       <i slot="reference" class="el-icon-warning-outline fr" />
@@ -103,34 +107,36 @@
                   </template>
 
                   <template slot="noble">
-                    <span v-if="sitem.noble_metal"
-                      >{{ sitem.noble_weight ? sitem.noble_weight : "0" }}g-{{
-                        sitem.noble_name
+                    <span v-if="sitem.noble_metal">
+                      {{ sitem.noble_weight ? sitem.noble_weight : "0" }}g-{{
+                      sitem.noble_name
                       }}-{{ sitem.gold_price ? sitem.gold_price : "0" }}元/g-{{
-                        sitem.is_gold_price + "" === "0" ? "不" : ""
+                      sitem.is_gold_price + "" === "0" ? "不" : ""
                       }}启用实时金价-{{ sitem.is_diff + "" === "1" ? "有" : "无" }}工差-{{
-                        sitem.config
-                      }}-{{ sitem.other_config }}</span
-                    >
+                      sitem.config
+                      }}-{{ sitem.other_config }}
+                    </span>
                   </template>
 
-                  <template slot="weight"> {{ sitem.weight }}g </template>
-                  <template slot="tax"> {{ sitem.tax }}% </template>
-                  <template slot="is_stock">
-                    {{ String(sitem.is_stock) === "0" ? "非库存品" : "库存品" }}
-                  </template>
-                  <template slot="is_exclusive">
-                    {{ String(sitem.is_exclusive) === "0" ? "非泰康" : "泰康" }}
-                  </template>
+                  <template slot="weight">{{ sitem.weight }}g</template>
+                  <template slot="tax">{{ sitem.tax }}%</template>
+                  <template slot="is_stock">{{ String(sitem.is_stock) === "0" ? "非库存品" : "库存品" }}</template>
+                  <template
+                    slot="is_exclusive"
+                  >{{ String(sitem.is_exclusive) === "0" ? "非泰康" : "泰康" }}</template>
                   <template slot="noble_weight">{{ sitem.noble_weight }}g</template>
-                  <template slot="is_gold_price">{{
+                  <template slot="is_gold_price">
+                    {{
                     String(sitem.is_gold_price) === "1" ? "是" : "否"
-                  }}</template>
-                  <template slot="is_diff">{{
+                    }}
+                  </template>
+                  <template slot="is_diff">
+                    {{
                     String(sitem.is_diff) === "1" ? "有公差" : "无工差"
-                  }}</template>
+                    }}
+                  </template>
 
-                  <template slot="packing_weight"> {{ sitem.packing_weight }}g </template>
+                  <template slot="packing_weight">{{ sitem.packing_weight }}g</template>
 
                   <template slot="delivery_day">{{ sitem.delivery_day }}天</template>
                   <template slot="lead_time">{{ sitem.lead_time }}天</template>
@@ -140,17 +146,12 @@
                 </show-data-table>
               </el-collapse-item>
 
-              <el-collapse-item
-                title="固定与阶梯成本"
-                name="2"
-                v-if="isDisplayPrivateField('1')"
-              >
+              <el-collapse-item title="固定与阶梯成本" name="2" v-if="isDisplayPrivateField('1')">
                 <show-data-table :columns="ladderColumns" :sitem="sitem">
                   <template slot="demo_fee">{{ sitem.demo_fee }}元</template>
                   <template slot="open_fee">{{ sitem.open_fee }}元</template>
                   <template slot="sample_fee">{{ sitem.sample_fee }}元</template>
                   <template slot="market_price">{{ sitem.market_price }}元</template>
-
                   <template slot="data_table">
                     <el-table size="mini" :data="sitem.nakelist">
                       <el-table-column prop="min_num" label="起订量(>=)" />
@@ -188,14 +189,11 @@
             </template>
           </el-collapse>
         </el-tab-pane>
+
         <el-tab-pane label="最近修改记录" name="2" v-if="queryType !== 'add'">
-          <type-change-item
-            v-if="newTime !== ''"
-            :newTime="newTime"
-            :type="'3'"
-            :code="queryId"
-          />
+          <type-change-item v-if="newTime !== ''" :newTime="newTime" :type="'3'" :code="queryId" />
         </el-tab-pane>
+
         <el-tab-pane label="审批记录" name="3" v-if="queryType !== 'add'">
           <process-time-line
             v-if="newTime !== ''"
@@ -239,22 +237,30 @@ export default {
   components: {
     ShowDataTable,
     baseForm,
-    costForm,
+    costForm
   },
   computed: {
-    ...mapGetters(["tablebtnSize", "searchSize", "size", "private_field", "originLevel"]),
+    ...mapGetters([
+      "tablebtnSize",
+      "searchSize",
+      "size",
+      "private_field",
+      "originLevel"
+    ]),
     powers() {
       const { btnList } = this.$store.getters;
-      const tran = btnList.find((item) => item.menu_route == "goodsCostDetail") || {};
+      const tran =
+        btnList.find(item => item.menu_route == "goodsCostDetail") || {};
       const { action } = tran ?? {};
       return action ?? [];
     },
     ppowers() {
       const tran =
-        this.$store.getters.roleProcess.find((i) => i.process_type === "SPCB") || {};
+        this.$store.getters.roleProcess.find(i => i.process_type === "SPCB") ||
+        {};
       const { action } = tran ?? {};
       return action ?? [];
-    },
+    }
   },
 
   data() {
@@ -277,7 +283,7 @@ export default {
       status: "",
       sitem: null,
       delivery_place: "",
-      origin_place: "",
+      origin_place: ""
     };
   },
   mounted() {
@@ -325,7 +331,9 @@ export default {
     async getArea(prop = "delivery_place") {
       const chunks = this.sitem[prop].split(",");
       let { data: province } = await asyncRequest.province();
-      province = province.find(({ province_code }) => province_code === chunks[0]);
+      province = province.find(
+        ({ province_code }) => province_code === chunks[0]
+      );
       let { data: city } = await asyncRequest.city({ code: chunks[0] });
       city = city.find(({ city_code }) => city_code === chunks[1]);
       let { data: area } = await asyncRequest.area({ code: chunks[1] });
@@ -336,19 +344,19 @@ export default {
       await this.$confirm(`确定要${detail}?`, {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
-        type: "warning",
+        type: "warning"
       })
         .then(async () => {
           let _model = {
             spuCode: this.queryId,
             status: type,
-            remark: remark,
+            remark: remark
           };
           let res = await asyncRequest.status(_model);
           if (res && res.code === 0) {
             this.$notify.success({
               title: "提交成功!",
-              message: "",
+              message: ""
             });
             await this.initForm();
           } else if (res && res.code >= 100 && res.code <= 104) {
@@ -357,7 +365,9 @@ export default {
             this.$message.warning(res.message);
           }
         })
-        .catch(() => {console.log("取消");});
+        .catch(() => {
+          console.log("取消");
+        });
     },
     handleClick(row) {
       console.log(row);
@@ -368,7 +378,7 @@ export default {
     async initData() {
       this.loading = true;
       const { code, message, data } = await asyncRequest.detail({
-        spuCode: this.queryId,
+        spuCode: this.queryId
       });
       this.loading = false;
       if (code === 0) {
@@ -384,8 +394,8 @@ export default {
     },
     getNewTime() {
       this.newTime = new Date().valueOf();
-    },
-  },
+    }
+  }
 };
 </script>
 <style lang="scss" scoped>

+ 1 - 1
src/views/sellOut/filing/config/columns.js

@@ -711,7 +711,7 @@ const validate_good_name = (rule, value, callback) => {
   }
 };
 const rules = {
-  attachment:[
+  fill_url:[
     {
       required: true,
       message: "请选择附件",

+ 8 - 8
src/views/sellOut/filing/config/rules.js

@@ -61,14 +61,14 @@ export const addressRules = {
     },
   ],
 
-  addr_code: [
-    {
-      type: "array",
-      required: false,
-      message: "收货省市区不能为空",
-      trigger: "change",
-    },
-  ],
+  // addr_code: [
+  //   {
+  //     type: "array",
+  //     required: false,
+  //     message: "收货省市区不能为空",
+  //     trigger: "change",
+  //   },
+  // ],
   
   addr: [
     {

+ 164 - 191
src/views/sellOut/filing/cpns/baseForm.vue

@@ -233,28 +233,71 @@
                 />
               </el-form-item>
             </el-col>
-          </el-row>
-          <el-row>
-            <el-col :span="7">
-              <el-form-item label="数量" prop="num" label-width="60px">
-                <digital-input
-                  :values="ruleForm.num"
-                  :placeholder="'数量'"
-                  :min="0"
+
+            <el-col :span="12">
+              <el-form-item label="产地" prop="origin_place">
+                <search-area
+                  :value="ruleForm.origin_place"
+                  :names="origin_place_cn"
+                  :is-detail="true"
                   :disabled="type === 'view'"
-                  :max="100000000000"
-                  :position="'right'"
-                  :precision="0"
-                  :size="'mini'"
-                  :controls="false"
-                  :append="''"
-                  @reschange="number_change($event, 'num')"
+                  size="mini"
+                  :placeholder="'产地'"
+                  :level="3"
+                  @searchChange="selectAreaoriginChange($event)"
                 />
               </el-form-item>
             </el-col>
-            <el-col :span="17">
-              <el-form-item label="订单总金额" label-width="100px">
-                <el-input :disabled="true" v-model="ruleForm.total" :placeholder="'订单总金额'" />
+            <el-col :span="12">
+              <el-form-item label="发货地" prop="delivery_place">
+                <search-area
+                  :value="ruleForm.delivery_place"
+                  :names="delivery_place_cn"
+                  :is-detail="true"
+                  :disabled="type === 'view'"
+                  size="mini"
+                  :placeholder="'发货地'"
+                  :level="3"
+                  @searchChange="selectAreadeliveryChange($event)"
+                />
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="供货区域" prop="supply_area">
+                <el-select
+                  v-model="ruleForm.supply_area"
+                  filterable
+                  :disabled="type === 'view'"
+                  clearable
+                  style="width: 100%"
+                  placeholder="供货区域"
+                >
+                  <el-option
+                    v-for="group in options6"
+                    :key="group.id"
+                    :label="group.name"
+                    :value="group.id"
+                  />
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="付款方式" prop="pay_way" class="clear">
+                <el-select
+                  v-model="ruleForm.pay_way"
+                  filterable
+                  :disabled="type === 'view'"
+                  clearable
+                  style="width: 100%"
+                  placeholder="付款方式"
+                >
+                  <el-option
+                    v-for="group in options10"
+                    :key="group.id"
+                    :label="group.name"
+                    :value="group.id"
+                  />
+                </el-select>
               </el-form-item>
             </el-col>
           </el-row>
@@ -399,70 +442,23 @@
                   />
                 </el-form-item>
               </el-col>
-              <el-col :span="12">
-                <el-form-item label="产地" prop="origin_place">
-                  <search-area
-                    :value="ruleForm.origin_place"
-                    :names="origin_place_cn"
-                    :is-detail="true"
-                    :disabled="type === 'view'"
-                    size="mini"
-                    :placeholder="'产地'"
-                    :level="3"
-                    @searchChange="selectAreaoriginChange($event)"
-                  />
-                </el-form-item>
-              </el-col>
-              <el-col :span="12">
-                <el-form-item label="发货地" prop="delivery_place">
-                  <search-area
-                    :value="ruleForm.delivery_place"
-                    :names="delivery_place_cn"
-                    :is-detail="true"
-                    :disabled="type === 'view'"
-                    size="mini"
-                    :placeholder="'发货地'"
-                    :level="3"
-                    @searchChange="selectAreadeliveryChange($event)"
-                  />
-                </el-form-item>
-              </el-col>
-              <el-col :span="12">
-                <el-form-item label="供货区域" prop="supply_area">
-                  <el-select
-                    v-model="ruleForm.supply_area"
-                    filterable
+
+              <el-col :span="24">
+                <el-form-item label="采购备注" prop="remark">
+                  <el-input
+                    placeholder="采购备注"
+                    maxlength="500"
                     :disabled="type === 'view'"
-                    clearable
-                    style="width: 100%"
-                    placeholder="供货区域"
-                  >
-                    <el-option
-                      v-for="group in options6"
-                      :key="group.id"
-                      :label="group.name"
-                      :value="group.id"
-                    />
-                  </el-select>
+                    v-model="ruleForm.remark"
+                  ></el-input>
                 </el-form-item>
-              </el-col>
-              <el-col :span="12">
-                <el-form-item label="付款方式" prop="pay_way" class="clear">
-                  <el-select
-                    v-model="ruleForm.pay_way"
-                    filterable
+                <el-form-item label="工艺说明" prop="cost_desc">
+                  <el-input
+                    placeholder="工艺说明"
+                    maxlength="500"
                     :disabled="type === 'view'"
-                    clearable
-                    style="width: 100%"
-                    placeholder="付款方式"
-                  >
-                    <el-option
-                      v-for="group in options10"
-                      :key="group.id"
-                      :label="group.name"
-                      :value="group.id"
-                    />
-                  </el-select>
+                    v-model="ruleForm.cost_desc"
+                  ></el-input>
                 </el-form-item>
               </el-col>
             </el-row>
@@ -510,131 +506,108 @@
           </el-col>
         </el-row>
       </el-col>
+    </el-row>
 
-      <el-col :span="24" v-if="is_noble">
-        <el-row>
-          <el-col :span="12">
-            <el-form-item label="金属重量" prop="gold_weight">
-              <digital-input
-                :values="ruleForm.gold_weight"
-                :placeholder="'金属重量'"
-                :min="0"
-                :disabled="type === 'view'"
-                :max="100000000000"
-                :position="'right'"
-                :precision="3"
-                :size="'mini'"
-                :controls="false"
-                :append="'g'"
-                @reschange="number_change($event, 'gold_weight')"
-              />
-            </el-form-item>
-          </el-col>
-          <el-col :span="12">
-            <el-form-item label="金属种类" prop="noble_metal">
-              <search-metal-kind
-                :value="ruleForm.noble_metal"
-                :size="'mini'"
-                :disabled="type === 'view'"
-                :isDetail="true"
-                :placeholder="'金属种类'"
-                @searchChange="noble_metalsearchChange"
-              />
-            </el-form-item>
-          </el-col>
-        </el-row>
-        <el-col :span="24">
-          <el-row>
-            <el-col :span="12">
-              <el-form-item label="配置要求" prop="config">
-                <el-select
-                  v-model="ruleForm.config"
-                  multiple
-                  :disabled="type === 'view'"
-                  style="width: 100%"
-                  placeholder="配置要求"
-                >
-                  <el-option
-                    v-for="(item, index) in options9"
-                    :key="item + index"
-                    :label="item"
-                    :value="item"
-                  />
-                </el-select>
-              </el-form-item>
-            </el-col>
-            <el-col :span="12">
-              <el-form-item label="其他配置要求" prop="other_config" label-width="120px">
-                <el-input
-                  placeholder="其他要求"
-                  maxlength="100"
-                  :disabled="type === 'view'"
-                  v-model="ruleForm.other_config"
-                ></el-input>
-              </el-form-item>
-            </el-col>
-          </el-row>
-        </el-col>
+    <el-row v-if="is_noble">
+      <el-col :span="6">
+        <el-form-item label="金属重量" prop="gold_weight">
+          <digital-input
+            :values="ruleForm.gold_weight"
+            :placeholder="'金属重量'"
+            :min="0"
+            :disabled="type === 'view'"
+            :max="100000000000"
+            :position="'right'"
+            :precision="3"
+            :size="'mini'"
+            :controls="false"
+            :append="'g'"
+            @reschange="number_change($event, 'gold_weight')"
+          />
+        </el-form-item>
+      </el-col>
+      <el-col :span="6">
+        <el-form-item label="金属种类" prop="noble_metal">
+          <search-metal-kind
+            :value="ruleForm.noble_metal"
+            :size="'mini'"
+            :disabled="type === 'view'"
+            :isDetail="true"
+            :placeholder="'金属种类'"
+            @searchChange="noble_metalsearchChange"
+          />
+        </el-form-item>
       </el-col>
 
-      <el-col :span="24">
-        <el-form-item label="采购备注" prop="remark">
-          <el-input
-            placeholder="采购备注"
-            maxlength="500"
+      <el-col :span="12">
+        <el-form-item label="配置要求" prop="config">
+          <el-select
+            v-model="ruleForm.config"
+            multiple
             :disabled="type === 'view'"
-            v-model="ruleForm.remark"
-          ></el-input>
+            style="width: 100%"
+            placeholder="配置要求"
+          >
+            <el-option
+              v-for="(item, index) in options9"
+              :key="item + index"
+              :label="item"
+              :value="item"
+            />
+          </el-select>
         </el-form-item>
-        <el-form-item label="工艺说明" prop="cost_desc">
+      </el-col>
+
+      <el-col :span="24">
+        <el-form-item label="其他配置要求" prop="other_config" label-width="120px">
           <el-input
-            placeholder="工艺说明"
-            maxlength="500"
+            placeholder="其他要求"
+            maxlength="100"
             :disabled="type === 'view'"
-            v-model="ruleForm.cost_desc"
+            v-model="ruleForm.other_config"
           ></el-input>
         </el-form-item>
       </el-col>
+    </el-row>
 
-      <el-col :span="24">
-        <el-form-item
-          label="商品图片(<1mb)"
-          prop="good_img"
-          v-if="ruleForm.good_img"
-          class="activity-upload"
+    <el-col :span="24">
+      <el-form-item
+        label="商品图片(<1mb)"
+        prop="good_img"
+        v-if="ruleForm.good_img"
+        class="activity-upload"
+      >
+        <div
+          class="btnupload"
+          style="position: relative; margin-left: 10px"
+          v-for="(item, index) in ruleForm.good_img"
+          :key="index"
         >
-          <div
-            class="btnupload"
-            style="position: relative; margin-left: 10px"
-            v-for="(item, index) in ruleForm.good_img"
-            :key="index"
+          <img :src="ruleForm.good_img[index]" class="avatar" />
+          <i
+            v-if="type == 'add' || type === 'editBase' || type === 'edit'"
+            class="el-icon-close"
+            @click="closeImg(index, 'good_img')"
+          ></i>
+        </div>
+        <div v-if="type == 'view' ? false : true">
+          <i
+            class="el-icon-plus avatar-uploader-icon"
+            style="position: relative; width: 50px; height: 50px"
           >
-            <img :src="ruleForm.good_img[index]" class="avatar" />
-            <i
-              v-if="type == 'add' || type === 'editBase' || type === 'edit'"
-              class="el-icon-close"
-              @click="closeImg(index, 'good_img')"
-            ></i>
-          </div>
-          <div v-if="type == 'view' ? false : true">
-            <i
-              class="el-icon-plus avatar-uploader-icon"
-              style="position: relative; width: 50px; height: 50px"
-            >
-              <file-upload
-                class="Upload"
-                :accept="'.jpg,.png,.jpeg'"
-                :multiple="true"
-                :disabled="type === 'view'"
-                :uploadcondition="beforeAvatarUpload"
-                @UploadErrorEvent="UploadErrorEventgood_img"
-                @UploadSuccessEvent="UploadSuccessEventgood_img"
-              ></file-upload>
-            </i>
-          </div>
-        </el-form-item>
-      </el-col>
-    </el-row>
+            <file-upload
+              class="Upload"
+              :accept="'.jpg,.png,.jpeg'"
+              :multiple="true"
+              :disabled="type === 'view'"
+              :uploadcondition="beforeAvatarUpload"
+              @UploadErrorEvent="UploadErrorEventgood_img"
+              @UploadSuccessEvent="UploadSuccessEventgood_img"
+            ></file-upload>
+          </i>
+        </div>
+      </el-form-item>
+    </el-col>
 
     <el-form-item v-if="type !== 'view'">
       <div style="width: 100%; display: flex; justify-content: flex-end">

+ 12 - 4
src/views/sellOut/filing/cpns/complianceForm.vue

@@ -1,5 +1,12 @@
 <template>
-  <el-form ref="formRef" label-width="110px" :rules="rules" :model="ruleForm" v-loading="loading">
+  <el-form
+    ref="formRef"
+    label-width="110px"
+    size="mini"
+    :rules="rules"
+    :model="ruleForm"
+    v-loading="loading"
+  >
     <el-row>
       <el-col :span="12">
         <el-form-item label="是否合规" prop="is_check">
@@ -14,7 +21,7 @@
         </el-form-item>
       </el-col>
       <el-col :span="12">
-        <el-form-item label="所属平台" prop="platform_id">
+        <el-form-item label="所属平台" prop="platform_id" v-if="Number(ruleForm.is_check) === 2">
           <search-terrace
             :value="ruleForm.platform_id"
             :names="ruleForm.platform_name"
@@ -28,7 +35,7 @@
         </el-form-item>
       </el-col>
       <el-col :span="12">
-        <el-form-item label="客户公司" prop="companyCode">
+        <el-form-item label="客户公司" prop="companyCode" v-if="Number(ruleForm.is_check) === 2">
           <search-customer
             :value="ruleForm.companyCode"
             :names="ruleForm.companyName"
@@ -39,7 +46,7 @@
           />
         </el-form-item>
       </el-col>
-      <el-col :span="12">
+      <el-col :span="12" v-if="Number(ruleForm.is_check) === 2">
         <el-form-item label="平台商品编号" prop="plat_code">
           <el-input size="mini" v-model="ruleForm.plat_code" placeholder="平台商品编号" />
         </el-form-item>
@@ -69,6 +76,7 @@ export default {
     return {
       loading: false,
       ruleForm: {
+        is_check: "2",
         companyName: "",
         companyCode: "",
         platform_name: "",

+ 125 - 77
src/views/sellOut/filing/cpns/wait-transferred.vue

@@ -23,7 +23,12 @@
         <el-table-column label="收货联系电话" prop="mobile">
           <template slot-scope="scope">
             <el-form-item v-if="scope.$index === editIndex" prop="mobile">
-              <el-input v-model="editCacheData.mobile" size="mini" placeholder="收货联系电话" maxlength="11" />
+              <el-input
+                v-model="editCacheData.mobile"
+                size="mini"
+                placeholder="收货联系电话"
+                maxlength="11"
+              />
             </el-form-item>
             <span v-else>{{ scope.row.mobile }}</span>
           </template>
@@ -63,7 +68,12 @@
             </el-tooltip>
 
             <el-tooltip placement="top" content="手动添加地址">
-              <el-button size="mini" type="text" icon="el-icon-circle-plus-outline" @click="handlePushAddress" />
+              <el-button
+                size="mini"
+                type="text"
+                icon="el-icon-circle-plus-outline"
+                @click="handlePushAddress"
+              />
             </el-tooltip>
           </template>
 
@@ -75,8 +85,19 @@
               icon="el-icon-circle-check"
               @click="handleSave()"
             />
-            <el-button v-else size="mini" type="text" icon="el-icon-edit" @click="handleSetEdit(scope.$index)" />
-            <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.$index)" />
+            <el-button
+              v-else
+              size="mini"
+              type="text"
+              icon="el-icon-edit"
+              @click="handleSetEdit(scope.$index)"
+            />
+            <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-delete"
+              @click="handleDelete(scope.$index)"
+            />
           </template>
         </el-table-column>
       </el-table>
@@ -93,25 +114,25 @@
 </template>
 
 <script>
-import InAddressModal from '@/components/in-address-modal'
-import { addressRules } from './../config/rules'
-import { utils, writeFile } from 'xlsx'
-import asyncRequest from '@/apis/service/sellOut/filing'
+import InAddressModal from "@/components/in-address-modal";
+import { addressRules } from "./../config/rules";
+import { utils, writeFile } from "xlsx";
+import asyncRequest from "@/apis/service/sellOut/filing";
 
 const defaultAddressData = {
-  receipt_quantity: '',
-  addr_code_name: '',
-  contactor: '',
-  addr_code: '',
-  mobile: '',
-  addr: ''
-}
+  receipt_quantity: "",
+  addr_code_name: "",
+  contactor: "",
+  addr_code: "",
+  mobile: "",
+  addr: ""
+};
 
 export default {
   components: {
     InAddressModal
   },
-  props: ['id', 'num'],
+  props: ["id", "num"],
   data() {
     return {
       list: [],
@@ -120,127 +141,154 @@ export default {
       showModal: false,
       rules: addressRules,
       editCacheData: { ...defaultAddressData }
-    }
+    };
   },
   methods: {
     handleShowModal() {
-      this.showModal = true
+      this.showModal = true;
     },
 
     handleSetEdit(index) {
       if (this.editIndex >= 0) {
-        this.$message.warning('当前已有地址在编辑,请保存后再试!')
-        return
+        this.$message.warning("当前已有地址在编辑,请保存后再试!");
+        return;
       }
-      this.editIndex = index
+      this.editIndex = index;
 
-      const { contactor, receipt_quantity, mobile, addr_code, addr, addr_code_name } = this.list[index]
+      const {
+        contactor,
+        receipt_quantity,
+        mobile,
+        addr_code,
+        addr,
+        addr_code_name
+      } = this.list[index];
 
       this.editCacheData = {
-        contactor, receipt_quantity, mobile, addr_code, addr, addr_code_name
-      }
+        contactor,
+        receipt_quantity,
+        mobile,
+        addr_code,
+        addr,
+        addr_code_name
+      };
     },
 
     downloadTemplate() {
-      const data = Array(20).fill(0).map(() => ({
-        '收货总数': '1',
-        '收货联系人': '张三',
-        '收货联系电话': '17878787878',
-        '收货省名称': '北京市',
-        '收货市名称': '北京市',
-        '收货区名称': '东城区',
-        '详细地址': 'xxx街道xxx号'
-      }))
-
-      const workBook = utils.book_new()
-      const workSheet = utils.json_to_sheet(data)
-      utils.book_append_sheet(workBook, workSheet, 'sheet')
+      const data = Array(20)
+        .fill(0)
+        .map(() => ({
+          收货总数: "1",
+          收货联系人: "张三",
+          收货联系电话: "17878787878",
+          收货省名称: "北京市",
+          收货市名称: "北京市",
+          收货区名称: "东城区",
+          详细地址: "xxx街道xxx号"
+        }));
+
+      const workBook = utils.book_new();
+      const workSheet = utils.json_to_sheet(data);
+      utils.book_append_sheet(workBook, workSheet, "sheet");
 
       // 导出模板
-      writeFile(workBook, '收货模板.xlsx', {
-        bookType: 'xlsx'
-      })
+      writeFile(workBook, "收货模板.xlsx", {
+        bookType: "xlsx"
+      });
     },
     handleDelete(index) {
-      this.list.splice(index, 1)
-      if (this.editIndex >= 0) this.editIndex = -1
+      this.list.splice(index, 1);
+      if (this.editIndex >= 0) this.editIndex = -1;
     },
 
     handleSave() {
       this.$refs.formRef.validate(async isValid => {
-        if (!isValid) return
+        if (!isValid) return;
 
-        const { addr_code } = this.editCacheData
-        const { data, code } = await asyncRequest.addrall({ code: addr_code[addr_code.length - 1] })
+        const { addr_code } = this.editCacheData;
+        const { data, code } = await asyncRequest.addrall({
+          code: addr_code[addr_code.length - 1]
+        });
 
         if (Number(code) === 0) {
-          this.editCacheData.addr_code_name = data.province.name + '/' + data.city.name + '/' + data.area.name
+          this.editCacheData.addr_code_name =
+            data.province.name + "/" + data.city.name + "/" + data.area.name;
         }
 
-        this.$set(this.list, this.editIndex, this.editCacheData)
-        this.editCacheData = { ...defaultAddressData }
-        this.editIndex = -1
-      })
+        this.$set(this.list, this.editIndex, this.editCacheData);
+        this.editCacheData = { ...defaultAddressData };
+        this.editIndex = -1;
+      });
     },
 
     handleRefresh(data) {
-      const _data = data.list.map(({ addr, addr_code, contactor, mobile, receipt_quantity, addr_code_name }) => ({
-        addr,
-        addr_code,
-        contactor, mobile,
-        receipt_quantity,
-        addr_code_name
-      }))
-
-      this.list = [...this.list, ..._data]
-      this.showModal = false
+      const _data = data.list.map(
+        ({
+          addr,
+          addr_code,
+          contactor,
+          mobile,
+          receipt_quantity,
+          addr_code_name
+        }) => ({
+          addr,
+          addr_code,
+          contactor,
+          mobile,
+          receipt_quantity,
+          addr_code_name
+        })
+      );
+
+      this.list = [...this.list, ..._data];
+      this.showModal = false;
     },
 
     handlePushAddress() {
       if (this.editIndex >= 0) {
-        this.$message.warning('当前已有地址在编辑,请保存后再试!')
-        return
+        this.$message.warning("当前已有地址在编辑,请保存后再试!");
+        return;
       }
 
-      this.list.push({ ...defaultAddressData })
-      this.editIndex = this.list.length - 1
+      this.list.push({ ...defaultAddressData });
+      this.editIndex = this.list.length - 1;
     },
 
     handleInAddrChange(e) {
-      this.editCacheData['addr_code'] = e
+      this.editCacheData["addr_code"] = e;
     },
 
     async handleSubmit() {
       if (this.editIndex !== -1) {
-        this.$message.warning('当前已有地址在编辑,请保存后再试!')
-        return
+        this.$message.warning("当前已有地址在编辑,请保存后再试!");
+        return;
       }
 
       if (this.list.length === 0) {
-        this.$message.warning('至少填写一条记录!')
-        return
+        this.$message.warning("至少填写一条记录!");
+        return;
       }
 
       const currentNum = this.list.reduce((current, prev) => {
-        return Number(current) + Number(prev.receipt_quantity)
-      }, 0)
+        return Number(current) + Number(prev.receipt_quantity);
+      }, 0);
 
       if (Number(this.num) > currentNum) {
-        this.$message.warning('收货数量小于销售数量!')
-        return
+        this.$message.warning("收货数量小于销售数量!");
+        return;
       }
 
       const { data, code, message } = await asyncRequest.transfer({
         id: this.id,
         addr_list: this.list
-      })
+      });
 
       if (Number(code) === 0) {
-        this.$emit('refresh')
+        this.$emit("refresh");
       } else {
-        this.$message.error(message)
+        this.$message.error(message);
       }
     }
   }
-}
+};
 </script>

+ 40 - 0
src/views/supplierSellOut/supplierFiling/config/columns.js

@@ -1049,6 +1049,45 @@ const other_ruleForm = {
   other_ruleForm
 }
 
+const ruleForm1 = {
+  customerName:"",
+  fill_url:"",
+  companyName: "泰康",
+  supplierNo: [],
+  customerCode: [],
+  is_determine_price: "0",
+  num: "300",
+  cgd_charge: "100",
+  price: "0",
+  expect_service_proportion: "10",
+  expect_service: "0",
+  good_name: "1",
+  originPlace: [],
+  origin_place: [],
+  delivery_place: [],
+  deliveryPlace: [],
+  cat_id: [],
+  brand_id: [],
+  unit_id: [],
+  weight: "9990.000",
+  tax: "1",
+  supply_area: "1",
+  pay_way: "1",
+  send_way: "0",
+  preservation_day: "1", //有效期
+  delivery_day: "0", //物流时间
+  make_day: "0", //生产工期
+  gold_weight: "0.000",
+  noble_metal: "1",
+  config: [],
+  other_config: "1",
+  remark: "1",
+  cost_desc: "1",
+  good_img: ["0"],
+  total: 0,
+  type: "0",
+};
+
 export {
   options1,
   options2,
@@ -1064,6 +1103,7 @@ export {
   listCol,
   rules,
   statusList,
+  ruleForm1,
   other_ruleForm
 }
 

+ 8 - 8
src/views/supplierSellOut/supplierFiling/config/rules.js

@@ -61,14 +61,14 @@ export const addressRules = {
     }
   ],
 
-  addr_code: [
-    {
-      type: 'array',
-      required: false,
-      message: '收货省市区不能为空',
-      trigger: 'change'
-    }
-  ],
+  // addr_code: [
+  //   {
+  //     type: 'array',
+  //     required: false,
+  //     message: '收货省市区不能为空',
+  //     trigger: 'change'
+  //   }
+  // ],
 
   addr: [
     {

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 513 - 363
src/views/supplierSellOut/supplierFiling/cpns/baseForm.vue


+ 3 - 1
src/views/supplierSellOut/supplierFiling/cpns/wait-transferred.vue

@@ -338,7 +338,9 @@ export default {
       }, 0);
 
       if (currentNum > Number(this.num)) {
-        this.$message.warning("收货数量小于销售数量!");
+        this.$message.warning(
+          `未转单数量为${this.num},收货数量总和不能超过未转单数量!`
+        );
         return;
       }
 

Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio