Browse Source

Merge branch 'dev0.3' of http://36.137.93.232:3000/hf/byte-sailing-new into dev0.3

asd26269546 1 year ago
parent
commit
661b1d7c83

+ 7 - 5
src/components/PDF/contractPDF.vue

@@ -243,12 +243,14 @@ const getDict = () => {
 };
 getDict();
 watch(
-  props.rowData,
+  props,
   () => {
-    if (props.rowData.id) {
-      getPdfData({ id: props.rowData.id });
-    } else if (props.rowData.code) {
-      getPdfData({ code: props.rowData.code });
+    if (props.rowData) {
+      if (props.rowData.id) {
+        getPdfData({ id: props.rowData.id });
+      } else if (props.rowData.code) {
+        getPdfData({ code: props.rowData.code });
+      }
     }
   },
   {

+ 3 - 3
src/components/contractCom/contractDetails.vue

@@ -20,7 +20,7 @@
           :style="{ color: currentItem.id === i.id ? '#409eff' : '' }"
           @click="handleItemClick(i)"
         >
-          <div v-if="activeName === 'first'">v {{ i.version }}</div>
+          <div v-if="activeName === 'first'">{{ i.code }}</div>
           <div v-if="activeName === 'second'">
             {{ i.code }}
           </div>
@@ -216,7 +216,7 @@ getDetailsData();
 .content-box {
   display: flex;
   .left {
-    width: 100px;
+    width: 160px;
     // background: #ccc;
     .left-item {
       height: 36px;
@@ -226,7 +226,7 @@ getDetailsData();
     }
   }
   .right {
-    width: calc(100% - 100px);
+    width: calc(100% - 160px);
     padding-left: 10px;
   }
 }

+ 1 - 2
src/components/process/SendFunds.vue

@@ -605,8 +605,7 @@ const getDictData = () => {
     accountData.value = res.rows;
   });
   // 关联合同
-
-  proxy.post("/contract/page", { pageNum: 1, pageSize: 9999, status: 30 }).then((res) => {
+  proxy.post("/contract/page1", { pageNum: 1, pageSize: 9999, status: 30 }).then((res) => {
     contractList.value = res.rows;
   });
   // 部门树

+ 4 - 4
src/components/process/SendPurchase.vue

@@ -720,10 +720,10 @@ const handleChangeAmount = () => {
 };
 
 const handleChangeMoney = (val, index, key) => {
-  let num = 100;
-  if (key === "count") {
-    num = 10000;
-  }
+  let num = 10000;
+  // if (key === "count") {
+  //   num = 10000;
+  // }
   formData.data.purchaseDetailList[index][key] = formatNumber(val, num);
   handleChangeAmount();
 };

+ 0 - 1
src/views/dataBoard/board/customerAnalysis/index.vue

@@ -166,7 +166,6 @@
 
 <script setup>
 import * as echarts from "echarts";
-
 import TitleInfo from "@/components/TitleInfo/index.vue";
 const titleList = ["客户来源统计", "类型统计", "趋势分析"];
 const { proxy } = getCurrentInstance();

+ 340 - 0
src/views/dataBoard/board/employeeAnalysis/index.vue

@@ -0,0 +1,340 @@
+<template>
+  <div class="tenant">
+    <div class="query">
+      <el-form :inline="true" :model="queryForm">
+        <el-form-item label="日期范围">
+          <el-date-picker
+            v-model="queryForm.timeArr"
+            type="daterange"
+            unlink-panels
+            range-separator="-"
+            start-placeholder="开始日期"
+            end-placeholder="结束日期"
+            value-format="YYYY-MM-DD"
+            @change="onQuery"
+          />
+        </el-form-item>
+        <el-form-item>
+          <el-button @click="onQuery">近30天</el-button>
+          <el-button @click="onQuery">本月</el-button>
+          <el-button @click="onQuery">上月</el-button>
+          <el-button @click="onQuery">近一年</el-button>
+          <el-button @click="onQuery">去年</el-button>
+          <el-button @click="onQuery">今年</el-button>
+        </el-form-item>
+        <div></div>
+        <el-form-item label="查看用户">
+          <el-button type="primary" plain @click="onQuery">近30天</el-button>
+        </el-form-item>
+      </el-form>
+    </div>
+    <div style="display: flex">
+      <div class="bck">
+        <TitleInfo :content="titleList[0]"></TitleInfo>
+        <div class="one-row" style="margin-top: 15px">
+          <div class="one-row-item first" style="margin-right: 15px">
+            <div class="label">存量客户</div>
+            <div class="value">20</div>
+          </div>
+          <div class="one-row-item other" style="margin-right: 15px">
+            <div class="label">新增</div>
+            <div class="value">20</div>
+          </div>
+          <div class="one-row-item other" style="margin-right: 15px">
+            <div class="label">报价</div>
+            <div class="value">20</div>
+          </div>
+          <div class="one-row-item other">
+            <div class="label">成交</div>
+            <div class="value">20</div>
+          </div>
+        </div>
+      </div>
+      <div class="bck" style="margin-left: 20px">
+        <TitleInfo :content="titleList[1]"></TitleInfo>
+        <div class="one-row" style="margin-top: 15px">
+          <div class="one-row-item first" style="margin-right: 15px">
+            <div class="label">存量产品</div>
+            <div class="value">20</div>
+          </div>
+          <div class="one-row-item other">
+            <div class="label">新增</div>
+            <div class="value">20</div>
+          </div>
+        </div>
+      </div>
+      <div class="bck" style="margin-left: 20px">
+        <TitleInfo :content="titleList[2]"></TitleInfo>
+        <div class="one-row" style="margin-top: 15px">
+          <div class="one-row-item first" style="margin-right: 15px">
+            <div class="label">发件</div>
+            <div class="value">20</div>
+          </div>
+          <div class="one-row-item other">
+            <div class="label">收件</div>
+            <div class="value">20</div>
+          </div>
+        </div>
+      </div>
+    </div>
+    <div style="margin-top: 15px">
+      <div class="bck">
+        <TitleInfo :content="titleList[3]"></TitleInfo>
+        <div class="two-row" style="margin-top: 15px">
+          <div class="two-row-item first" style="margin-right: 15px">
+            <div class="label">报价</div>
+            <div class="value">
+              <div style="margin-right: 15px">
+                <div class="child-value">aa</div>
+                <div class="text">订单数</div>
+              </div>
+              <div>
+                <div class="child-value">666666</div>
+                <div class="text">金额</div>
+              </div>
+            </div>
+          </div>
+          <div class="two-row-item other" style="margin-right: 15px">
+            <div class="label">成交</div>
+            <div class="value">
+              <div style="margin-right: 15px">
+                <div class="child-value">aa</div>
+                <div class="text">订单数</div>
+              </div>
+              <div>
+                <div class="child-value">666666</div>
+                <div class="text">金额</div>
+              </div>
+            </div>
+          </div>
+          <div class="two-row-item other" style="margin-right: 15px">
+            <div class="label">到账</div>
+            <div class="value">
+              <div style="margin-right: 15px">
+                <div class="child-value">aa</div>
+                <div class="text">笔</div>
+              </div>
+              <div>
+                <div class="child-value">666666</div>
+                <div class="text">金额</div>
+              </div>
+            </div>
+          </div>
+          <div class="two-row-item other">
+            <div class="label">创建单证</div>
+            <div class="value">
+              <div style="margin-right: 15px">
+                <div class="child-value">aa</div>
+                <div class="text">套</div>
+              </div>
+            </div>
+          </div>
+        </div>
+      </div>
+    </div>
+    <div style="margin-top: 15px">
+      <div class="bck">
+        <TitleInfo :content="titleList[4]"></TitleInfo>
+        <div class="two-row" style="margin-top: 15px">
+          <div class="two-row-item first" style="margin-right: 15px">
+            <div class="label">报价</div>
+            <div class="value">
+              <div style="margin-right: 15px">
+                <div class="child-value">aa</div>
+                <div class="text">订单数</div>
+              </div>
+              <div>
+                <div class="child-value">666666</div>
+                <div class="text">金额</div>
+              </div>
+            </div>
+          </div>
+          <div class="two-row-item other" style="margin-right: 15px">
+            <div class="label">成交</div>
+            <div class="value">
+              <div style="margin-right: 15px">
+                <div class="child-value">aa</div>
+                <div class="text">订单数</div>
+              </div>
+              <div>
+                <div class="child-value">666666</div>
+                <div class="text">金额</div>
+              </div>
+            </div>
+          </div>
+          <div class="two-row-item other" style="margin-right: 15px">
+            <div class="label">到账</div>
+            <div class="value">
+              <div style="margin-right: 15px">
+                <div class="child-value">aa</div>
+                <div class="text">笔</div>
+              </div>
+              <div>
+                <div class="child-value">666666</div>
+                <div class="text">金额</div>
+              </div>
+            </div>
+          </div>
+          <div class="two-row-item other">
+            <div class="label">创建单证</div>
+            <div class="value">
+              <div style="margin-right: 15px">
+                <div class="child-value">aa</div>
+                <div class="text">套</div>
+              </div>
+            </div>
+          </div>
+        </div>
+      </div>
+    </div>
+
+    <div style="display: flex; margin-top: 15px">
+      <div class="bck">
+        <TitleInfo :content="titleList[0]"></TitleInfo>
+        <div class="one-row" style="margin-top: 15px">
+          <div class="one-row-item first" style="margin-right: 15px">
+            <div class="label">存量客户</div>
+            <div class="value">20</div>
+          </div>
+          <div class="one-row-item other" style="margin-right: 15px">
+            <div class="label">新增</div>
+            <div class="value">20</div>
+          </div>
+          <div class="one-row-item other" style="margin-right: 15px">
+            <div class="label">报价</div>
+            <div class="value">20</div>
+          </div>
+          <div class="one-row-item other">
+            <div class="label">成交</div>
+            <div class="value">20</div>
+          </div>
+        </div>
+      </div>
+      <div class="bck" style="margin-left: 20px">
+        <TitleInfo :content="titleList[1]"></TitleInfo>
+        <div class="one-row" style="margin-top: 15px">
+          <div class="one-row-item first" style="margin-right: 15px">
+            <div class="label">存量产品</div>
+            <div class="value">20</div>
+          </div>
+          <div class="one-row-item other">
+            <div class="label">新增</div>
+            <div class="value">20</div>
+          </div>
+        </div>
+      </div>
+      <div class="bck" style="margin-left: 20px">
+        <TitleInfo :content="titleList[2]"></TitleInfo>
+        <div class="one-row" style="margin-top: 15px">
+          <div class="one-row-item first" style="margin-right: 15px">
+            <div class="label">发件</div>
+            <div class="value">20</div>
+          </div>
+          <div class="one-row-item other">
+            <div class="label">收件</div>
+            <div class="value">20</div>
+          </div>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script setup>
+import TitleInfo from "@/components/TitleInfo/index.vue";
+const titleList = [
+  "客户情况",
+  "产品情况",
+  "往来邮件",
+  "销售行为(存量客户)",
+  "销售行为(新增客户)",
+];
+const { proxy } = getCurrentInstance();
+const loading = ref(false);
+const queryForm = reactive({
+  countryId: "",
+  beginTime: "",
+  endTime: "",
+  timeArr: "",
+});
+</script>
+
+<style lang="scss" scoped>
+.tenant {
+  padding: 20px;
+}
+.bck {
+  background-color: #fff;
+  padding: 15px;
+}
+.one-row {
+  display: flex;
+  .one-row-item {
+    min-width: 100px;
+    padding: 15px;
+    border-radius: 10px;
+    .label {
+      margin-bottom: 10px;
+      font-size: 16px;
+    }
+    .value {
+      font-size: 14px;
+    }
+    .label,
+    .value {
+      font-weight: 700;
+    }
+  }
+
+  .first {
+    background: #f5f3ff;
+    .value {
+      color: #9e64ed;
+    }
+  }
+  .other {
+    background: #eff6ff;
+    .value {
+      color: #0084ff;
+    }
+  }
+}
+.two-row {
+  display: flex;
+  .two-row-item {
+    min-width: 160px;
+    padding: 15px;
+    border-radius: 10px;
+    .label {
+      margin-bottom: 10px;
+      font-size: 16px;
+      font-weight: 700;
+    }
+    .value {
+      display: flex;
+      font-size: 14px;
+      .child-value {
+        font-size: 14px;
+        font-weight: 700;
+      }
+      .text {
+        color: #908f91;
+        font-size: 12px;
+        margin-top: 10px;
+      }
+    }
+  }
+  .first {
+    background: #f5f3ff;
+    .child-value {
+      color: #9e64ed;
+    }
+  }
+  .other {
+    background: #eff6ff;
+    .child-value {
+      color: #0084ff;
+    }
+  }
+}
+</style>

+ 1 - 1
src/views/finance/fundManage/accountPayment/index.vue

@@ -39,7 +39,7 @@
       </byForm>
       <template #footer>
         <el-button @click="dialogVisible = false" size="large">取 消</el-button>
-        <el-button type="primary" @click="submitForm()" size="large" :loading="submitLoading"> 确 定 </el-button>
+        <el-button type="primary" @click="submitForm()" v-if="!formOption.disabled" size="large" :loading="submitLoading"> 确 定 </el-button>
       </template>
     </el-dialog>
 

+ 7 - 3
src/views/purchaseManage/supplier/supplier/index.vue

@@ -437,7 +437,7 @@ const openModal = () => {
   modalType.value = "add";
   fileList.value = [];
   formData.data = {
-    type: "sales",
+    type: "",
     countryId: "44",
   };
   getCityData(formData.data.countryId, "20");
@@ -498,8 +498,12 @@ const getDtl = (row) => {
             };
           });
         }
-        getCityData(res.countryId, "20");
-        getCityData(res.provinceId, "30");
+        if (res.countryId) {
+          getCityData(res.countryId, "20");
+        }
+        if (res.provinceId) {
+          getCityData(res.provinceId, "30");
+        }
         res.type = res.type + "";
         formData.data = res;
         dialogVisible.value = true;

+ 1 - 1
src/views/salesMange/saleContract/contract/index.vue

@@ -89,7 +89,7 @@
       </template>
     </el-dialog>
 
-    <el-dialog title="合同详情" v-if="openDetailsDialog" v-model="openDetailsDialog" width="1000">
+    <el-dialog title="合同详情" v-if="openDetailsDialog" v-model="openDetailsDialog" width="1100">
       <ContractDetails :contractId="currentContractId"></ContractDetails>
     </el-dialog>
   </div>

+ 3 - 1
src/views/salesMange/saleContract/contractSelect/index.vue

@@ -9,7 +9,8 @@
         :selectConfig="selectConfig"
         highlight-current-row
         :action-list="[]"
-        @get-list="getList">
+        @get-list="getList"
+      >
         <template #amount="{ item }">
           <div>
             <span style="padding-right: 4px">{{ item.currency }}</span>
@@ -82,6 +83,7 @@ const sourceList = ref({
     pageSize: 10,
     keyword: "",
     sellCorporationId: "",
+    status: "30",
   },
 });
 const loading = ref(false);

+ 743 - 0
src/views/salesMange/salesMange/afterSales/index.vue

@@ -0,0 +1,743 @@
+<template>
+  <div class="tenant">
+    <!-- <Banner /> -->
+    <div class="content">
+      <byTable
+        :source="sourceList.data"
+        :pagination="sourceList.pagination"
+        :config="config"
+        :loading="loading"
+        highlight-current-row
+        :selectConfig="selectConfig"
+        :table-events="{
+          //element talbe事件都能传
+        }"
+        :action-list="[
+          {
+            text: '添加售后',
+            disabled: false,
+            action: () => clickAdd(),
+          },
+        ]"
+        @get-list="getList"
+      >
+        <template #code="{ item }">
+          <div
+            style="cursor: pointer; color: #409eff"
+            @click="handleClickCode(item)"
+          >
+            {{ item.code }}
+          </div>
+        </template>
+      </byTable>
+    </div>
+
+    <el-dialog title="添加售后" v-model="dialogVisible" width="50%">
+      <byForm
+        :formConfig="formConfig"
+        :formOption="formOption"
+        v-model="formData.data"
+        :rules="rules"
+        ref="formDom"
+        v-loading="submitLoading"
+      >
+        <template #details>
+          <div style="width: 100%">
+            <el-button type="primary" plain @click="openProduct = true">
+              添加商品
+            </el-button>
+            <el-table
+              :data="formData.data.subscribeDetailList"
+              style="margin-top: 10px"
+            >
+              <el-table-column prop="code" label="产品编码" />
+              <el-table-column prop="name" label="产品名称" min-width="150" />
+              <el-table-column prop="spec" label="规格型号" />
+              <el-table-column
+                prop="unit"
+                label="单位"
+                :formatter="(row) => dictValueLabel(row.unit, productUnit)"
+              />
+              <el-table-column prop="count" label="售后数量" min-width="150">
+                <template #default="{ row, $index }">
+                  <el-form-item
+                    :prop="'subscribeDetailList.' + $index + '.count'"
+                    :rules="rules.count"
+                    :inline-message="true"
+                  >
+                    <el-input-number
+                      onmousewheel="return false;"
+                      v-model="row.count"
+                      :precision="4"
+                      :controls="false"
+                      :min="1"
+                    />
+                  </el-form-item>
+                </template>
+              </el-table-column>
+              <el-table-column prop="remark" label="备注" min-width="150">
+                <template #default="{ row, $index }">
+                  <el-form-item
+                    :prop="'subscribeDetailList.' + $index + '.remark'"
+                    :rules="rules.remark"
+                    :inline-message="true"
+                  >
+                    <el-input v-model="row.remark" placeholder="请输入" />
+                  </el-form-item>
+                </template>
+              </el-table-column>
+              <el-table-column prop="zip" label="操作" width="100">
+                <template #default="{ $index }">
+                  <el-button type="primary" link @click="handleRemove($index)"
+                    >删除</el-button
+                  >
+                </template>
+              </el-table-column>
+            </el-table>
+          </div>
+        </template>
+      </byForm>
+      <template #footer>
+        <el-button @click="dialogVisible = false" size="large">取 消</el-button>
+        <el-button
+          type="primary"
+          @click="submitForm()"
+          size="large"
+          :loading="submitLoading"
+        >
+          确 定
+        </el-button>
+      </template>
+    </el-dialog>
+
+    <el-dialog
+      title="售后跟进"
+      v-model="openFollow"
+      width="500"
+      destroy-on-close
+    >
+      <byForm
+        :formConfig="formConfigAFollow"
+        :formOption="formOption"
+        v-model="formData.followData"
+        :rules="followRules"
+        ref="followDom"
+        v-loading="submitLoading"
+      >
+        <template #fileSlot>
+          <div style="width: 100%">
+            <el-upload
+              v-model:fileList="fileList"
+              action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
+              :data="uploadData"
+              multiple
+              :before-upload="uploadFile"
+              :on-preview="onPreviewFile"
+            >
+              <el-button type="primary">文件上传</el-button>
+            </el-upload>
+          </div>
+        </template>
+      </byForm>
+      <template #footer>
+        <el-button @click="openFollow = false" size="large">取 消</el-button>
+        <el-button
+          type="primary"
+          @click="submitFollow()"
+          size="large"
+          :loading="submitLoading"
+          >确 定</el-button
+        >
+      </template>
+    </el-dialog>
+
+    <el-dialog
+      title="跟进记录"
+      v-model="openRecord"
+      width="500"
+      destroy-on-close
+    >
+      <div>
+        <div style="padding-top: 16px">
+          <div>
+            <el-timeline>
+              <el-timeline-item
+                v-for="(record, index) in recordList"
+                :key="index"
+                :timestamp="record.date"
+                hide-timestamp
+              >
+                <div>
+                  <div
+                    style="
+                      padding: 0 0 8px 0;
+                      display: flex;
+                      justify-content: space-between;
+                    "
+                  >
+                    <span>{{
+                      dictValueLabel(record.createUser, userList)
+                    }}</span>
+                    <span>{{ record.date }}</span>
+                  </div>
+                  <div v-if="record.type == '30'">
+                    <div
+                      style="word-wrap: break-word; margin: 8px 0"
+                      v-html="getStyle(record.content)"
+                      v-if="record.content"
+                    ></div>
+                    <div v-else>跟进记录:</div>
+                  </div>
+                  <div v-else>
+                    <div style="word-wrap: break-word; margin: 8px 0">
+                      {{ getContent(record) }}
+                    </div>
+                  </div>
+                  <div
+                    style="margin: 8px 0; display: flex"
+                    v-if="record.fileList && record.fileList.length > 0"
+                  >
+                    <div style="width: 36px">附件:</div>
+                    <div style="width: calc(100% - 36px)">
+                      <div
+                        v-for="(file, index) in record.fileList"
+                        :key="index"
+                      >
+                        <a
+                          style="color: #409eff; cursor: pointer"
+                          @click="openFile(file.fileUrl)"
+                          >{{ file.fileName }}</a
+                        >
+                      </div>
+                    </div>
+                  </div>
+                </div>
+              </el-timeline-item>
+            </el-timeline>
+          </div>
+        </div>
+      </div>
+      <template #footer>
+        <el-button @click="openRecord = false" size="large">关 闭</el-button>
+      </template>
+    </el-dialog>
+
+    <el-dialog
+      v-if="openProduct"
+      v-model="openProduct"
+      title="选择商品"
+      width="70%"
+      append-to-body
+    >
+      <SelectGoods
+        :selectList="acquireSelectList()"
+        @cancel="openProduct = false"
+        @pushGoods="pushGoods"
+      ></SelectGoods>
+    </el-dialog>
+  </div>
+</template>
+  
+<script setup>
+import { ElMessage, ElMessageBox } from "element-plus";
+import byTable from "@/components/byTable/index";
+import byForm from "@/components/byForm/index";
+import SelectGoods from "@/components/product/SelectGoods";
+import { computed } from "vue";
+const { proxy } = getCurrentInstance();
+const fileList = ref([]);
+const uploadData = ref({});
+const loading = ref(false);
+const submitLoading = ref(false);
+const sourceList = ref({
+  data: [],
+  pagination: {
+    total: 3,
+    pageNum: 1,
+    pageSize: 10,
+  },
+});
+const dialogVisible = ref(false);
+const openProduct = ref(false);
+const openFollow = ref(false);
+const openRecord = ref(false);
+const modalType = ref("add");
+const rules = ref({
+  name: [{ required: true, message: "请输入供应商名称", trigger: "blur" }],
+  qualifiedCount: [
+    { required: true, message: "请输入质检合格数量", trigger: "blur" },
+  ],
+  noQualifiedCount: [
+    { required: true, message: "请输入质检不合格数量", trigger: "blur" },
+  ],
+});
+const customerData = ref([]);
+const productUnit = ref([]);
+const productType = ref([]);
+const recordList = ref([]);
+const selectConfig = computed(() => [
+  {
+    label: "客户名称",
+    prop: "status",
+    data: customerData.value,
+  },
+  {
+    label: "售后类型",
+    prop: "status",
+    data: customerData.value,
+  },
+  {
+    label: "售后状态",
+    prop: "status",
+    data: customerData.value,
+  },
+]);
+const config = computed(() => {
+  return [
+    {
+      attrs: {
+        label: "客户名称",
+        prop: "code",
+        slot: "code",
+      },
+    },
+    {
+      attrs: {
+        label: "销售合同编号",
+        prop: "supplyName",
+        slot: "code",
+
+        width: 150,
+      },
+    },
+    {
+      attrs: {
+        label: "售后类型",
+        prop: "productDefinition",
+        width: 100,
+      },
+      render(type) {
+        return type == 1 ? "产品" : "物料";
+      },
+    },
+
+    {
+      attrs: {
+        label: "产品编码",
+        prop: "productCode",
+        width: 150,
+      },
+    },
+    {
+      attrs: {
+        label: "产品名称",
+        prop: "productName",
+      },
+    },
+    {
+      attrs: {
+        label: "规格型号",
+        prop: "productSpec",
+      },
+    },
+    {
+      attrs: {
+        label: "单位",
+        prop: "productUnit",
+        width: 80,
+      },
+      render(unit) {
+        return proxy.dictValueLabel(unit, productUnit.value);
+      },
+    },
+    {
+      attrs: {
+        label: "数量",
+        prop: "count",
+        width: 100,
+      },
+    },
+    {
+      attrs: {
+        label: "售后状态",
+        prop: "qualifiedCount",
+        slot: "code",
+        width: 100,
+      },
+    },
+    {
+      attrs: {
+        label: "售后说明",
+        prop: "noQualifiedCount",
+      },
+    },
+    {
+      attrs: {
+        label: "操作",
+        width: "150",
+        align: "center",
+        fixed: "right",
+      },
+      renderHTML(row) {
+        return [
+          {
+            attrs: {
+              label: "跟进",
+              type: "primary",
+              text: true,
+              disabled: false,
+            },
+            el: "button",
+            click() {
+              modalType.value = "add";
+              formData.followData = {};
+              openFollow.value = true;
+            },
+          },
+          {
+            attrs: {
+              label: "关闭",
+              type: "primary",
+              text: true,
+              disabled: false,
+            },
+            el: "button",
+            click() {},
+          },
+          {
+            attrs: {
+              label: "退货",
+              type: "primary",
+              text: true,
+              disabled: false,
+            },
+            el: "button",
+            click() {},
+          },
+          {
+            attrs: {
+              label: "换货",
+              type: "primary",
+              text: true,
+              disabled: false,
+            },
+            el: "button",
+            click() {},
+          },
+          {
+            attrs: {
+              label: "退款",
+              type: "primary",
+              text: true,
+              disabled: false,
+            },
+            el: "button",
+            click() {},
+          },
+          {
+            attrs: {
+              label: "发起采购",
+              type: "primary",
+              text: true,
+              disabled: false,
+            },
+            el: "button",
+            click() {},
+          },
+        ];
+      },
+    },
+  ];
+});
+
+const formData = reactive({
+  data: {},
+  followData: {},
+});
+const formOption = reactive({
+  inline: true,
+  labelWidth: 100,
+  itemWidth: 100,
+  rules: [],
+});
+const formConfig = computed(() => {
+  return [
+    {
+      type: "select",
+      prop: "customerId",
+      label: "客户名称",
+      required: true,
+      itemWidth: 100,
+      data: customerData.value,
+      style: {
+        width: "50%",
+      },
+      disabled: false,
+    },
+    {
+      type: "select",
+      prop: "customerId",
+      label: "销售合同",
+      required: true,
+      itemWidth: 100,
+      multiple: true,
+      data: customerData.value,
+      style: {
+        width: "50%",
+      },
+      disabled: false,
+    },
+    {
+      type: "select",
+      prop: "customerId",
+      label: "售后类型",
+      required: true,
+      itemWidth: 100,
+      multiple: true,
+      data: customerData.value,
+      style: {
+        width: "30%",
+      },
+      disabled: false,
+    },
+    {
+      type: "input",
+      itemType: "textarea",
+      prop: "customerId",
+      label: "售后说明",
+      required: true,
+      itemWidth: 100,
+      style: {
+        width: "50%",
+      },
+    },
+    {
+      type: "title",
+      title: "产品明细",
+    },
+    {
+      type: "slot",
+      slotName: "details",
+    },
+  ];
+});
+const formConfigAFollow = computed(() => {
+  return [
+    {
+      type: "date",
+      itemType: "datetime",
+      label: "跟进时间",
+      prop: "date",
+      itemWidth: 100,
+    },
+    {
+      type: "select",
+
+      label: "跟进人",
+      prop: "aa",
+      itemWidth: 100,
+      data: [],
+    },
+    {
+      type: "input",
+      itemType: "textarea",
+      label: "跟进记录",
+      prop: "content",
+      itemWidth: 100,
+    },
+    {
+      type: "slot",
+      label: "上传附件",
+      prop: "fileList",
+      slotName: "fileSlot",
+    },
+  ];
+});
+const formDom = ref(null);
+const getList = async (req) => {
+  sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
+  loading.value = true;
+  proxy
+    .post("/arrivalDetail/page", sourceList.value.pagination)
+    .then((message) => {
+      message.rows.forEach((x) => {
+        if (x.status < 20) {
+          x.isCheck = true;
+        } else {
+          x.isCheck = false;
+        }
+      });
+      sourceList.value.data = message.rows;
+      sourceList.value.pagination.total = message.total;
+      setTimeout(() => {
+        loading.value = false;
+      }, 200);
+    });
+};
+
+const submitForm = () => {
+  formDom.value.validate((valid) => {
+    const list = formData.data.qualityDetailList;
+    for (let i = 0; i < list.length; i++) {
+      const e = list[i];
+      delete e.id;
+      if (!(e.qualifiedCount + e.noQualifiedCount > 0)) {
+        return ElMessage({
+          message: "质检数量不能为0!",
+          type: "info",
+        });
+      }
+      if (
+        e.qualifiedCount + e.noQualifiedCount + Number(e.sumQualityCount) >
+        Number(e.count)
+      ) {
+        return ElMessage({
+          message: "质检数量不能大于到货数量!",
+          type: "info",
+        });
+      }
+    }
+    submitLoading.value = true;
+    proxy.post("/quality/" + modalType.value, formData.data).then(
+      (res) => {
+        ElMessage({
+          message: "质检成功",
+          type: "success",
+        });
+        dialogVisible.value = false;
+        submitLoading.value = false;
+        getList();
+      },
+      (err) => {
+        submitLoading.value = false;
+      }
+    );
+  });
+};
+
+const getDtl = (row) => {
+  modalType.value = "edit";
+  dialogVisible.value = true;
+
+  // proxy.post("/productionProcesses/detail", { id: row.id }).then((res) => {
+  //   fileList.value = [
+  //     {
+  //       id: "",
+  //       fileName: res.fileName,
+  //       path: "",
+  //     },
+  //   ];
+  //   formData.data = res;
+  //   dialogVisible.value = true;
+  // });
+};
+const getDict = () => {
+  proxy.post("/customer/page", { pageNum: 1, pageSize: 9999 }).then((res) => {
+    customerData.value = res.rows.map((x) => ({
+      ...x,
+      label: x.name,
+      value: x.id,
+    }));
+  });
+
+  proxy.getDictOne(["unit", "product_type"]).then((res) => {
+    productUnit.value = res["unit"].map((x) => ({
+      label: x.dictValue,
+      value: x.dictKey,
+    }));
+    productType.value = res["product_type"].map((x) => ({
+      label: x.dictValue,
+      value: x.dictKey,
+    }));
+  });
+};
+getDict();
+getList();
+const clickAdd = (type) => {
+  modalType.value = "add";
+  formData.data = {};
+  dialogVisible.value = true;
+};
+
+const acquireSelectList = () => {
+  let data = [];
+  if (
+    formData.data.subscribeDetailList &&
+    formData.data.subscribeDetailList.length > 0
+  ) {
+    data = formData.data.subscribeDetailList.map((item) => {
+      return {
+        id: item.bussinessId,
+        name: item.productName,
+      };
+    });
+  }
+  return data;
+};
+
+const pushGoods = (goods) => {
+  if (goods && goods.length > 0) {
+    let afterFiltering = [];
+    if (
+      formData.data.subscribeDetailList &&
+      formData.data.subscribeDetailList.length > 0
+    ) {
+      afterFiltering = goods.filter((item) => {
+        let data = formData.data.subscribeDetailList.filter(
+          (itemProduct) => itemProduct.bussinessId === item.id
+        );
+        if (data && data.length > 0) {
+          return false;
+        }
+        return true;
+      });
+    } else {
+      afterFiltering = goods;
+    }
+    const arr = afterFiltering.map((x) => ({
+      goodType: x.goodType,
+      code: x.code,
+      name: x.name,
+      spec: x.spec,
+      unit: x.unit,
+      bussinessId: x.id,
+      count: "",
+      remark: "",
+    }));
+    formData.data.subscribeDetailList =
+      formData.data.subscribeDetailList.concat(arr);
+    openProduct.value = false;
+    return ElMessage({
+      message: "添加成功!",
+      type: "success",
+    });
+  } else {
+    ElMessage("请选择至少一件物品");
+  }
+};
+const handleRemove = (index) => {
+  formData.data.subscribeDetailList.splice(index, 1);
+  return ElMessage({
+    message: "删除成功!",
+    type: "success",
+  });
+};
+
+const uploadFile = async (file) => {
+  const res = await proxy.post("/fileInfo/getSing", { fileName: file.name });
+  uploadData.value = res.uploadBody;
+  file.id = res.id;
+  file.fileName = res.fileName;
+  file.fileUrl = res.fileUrl;
+  return true;
+};
+const onPreviewFile = (file) => {
+  window.open(file.raw.fileUrl, "_blank");
+};
+</script>
+  
+<style lang="scss" scoped>
+.tenant {
+  padding: 20px;
+}
+</style>

+ 1 - 1
src/views/salesMange/shipmentMange/document/index.vue

@@ -412,7 +412,7 @@
               </td>
               <td style="text-align: center">{{ item.quantity }}</td>
               <td :rowspan="printDetails.documentsProducts.length" style="text-align: center" v-if="index === 0 && [1].includes(openStatus)">
-                {{ printDetails.sumBomVolume }}
+                {{ printDetails.sumNetWeight }}
               </td>
               <td :rowspan="printDetails.documentsProducts.length" style="text-align: center; border-right: 0" v-if="index === 0 && [1].includes(openStatus)">
                 {{ printDetails.sumRoughWeight }}

+ 7 - 5
src/views/salesMange/shipmentMange/packing/index.vue

@@ -926,16 +926,18 @@ const handleChangePackQuantity = (val, index) => {
   const obj = {};
   for (let i = 0; i < formData.data.contractProductData.length; i++) {
     const e = formData.data.contractProductData[i];
-    obj[e.contractId + "_" + e.productId + ""] =
-      Number(e.cpQuantity) - Number(e.sumPackQuantity);
+    obj[e.contractId + "_" + e.productId + ""] = (
+      Number(e.cpQuantity) - Number(e.sumPackQuantity)
+    ).toFixed(2);
   }
   // 计算数量 即装箱数量 * 箱数 新增字段放在最外层
   for (let i = 0; i < formData.data.packDetailList.length; i++) {
     const ele = formData.data.packDetailList[i];
     for (let j = 0; j < ele.packDetailProductList.length; j++) {
       const jele = ele.packDetailProductList[j];
-      ele[jele.contractId + "_" + jele.productId + ""] =
-        Number(ele.packQuantity) * jele.quantity;
+      ele[jele.contractId + "_" + jele.productId + ""] = (
+        Number(ele.packQuantity) * jele.quantity
+      ).toFixed(2);
     }
   }
   // 计算新的待装箱数量
@@ -943,7 +945,7 @@ const handleChangePackQuantity = (val, index) => {
     const e = formData.data.packDetailList[i];
     for (const key in obj) {
       if (e.hasOwnProperty(key)) {
-        obj[key] = obj[key] - e[key];
+        obj[key] = (obj[key] - e[key]).toFixed(2);
         if (obj[key] < 0) {
           e.packQuantity = null;
           handleChangePackQuantity(null, index);