Quellcode durchsuchen

部分功能更新

cz vor 11 Monaten
Ursprung
Commit
0294bb2a1a

+ 37 - 0
src/components/headerBar/downloadApp.vue

@@ -0,0 +1,37 @@
+<template>
+  <div class="pageIndexClass">
+    <div v-if="isWeiXin">
+      <div class="box">
+        请点击右上角用浏览器打开
+      </div>
+    </div>
+  </div>
+</template>
+
+<script setup>
+const isWeiXin = ref(false);
+onMounted(() => {
+  let ua = navigator.userAgent.toLowerCase();
+  if (ua.match(/MicroMessenger/i) == "micromessenger") {
+    isWeiXin.value = true;
+  } else {
+    let url =
+      "http://" + import.meta.env.VITE_APP_IP + ":20011/download/sanfanApp.apk";
+    window.open(url, "_blank");
+    return;
+  }
+});
+</script>
+
+<style lang="scss" scoped>
+.box {
+  margin: 200px auto 0;
+  width: 80%;
+  // height: 300px;
+  // line-height: 300px;
+  padding: 30px 20px;
+  font-size: 30px;
+  background: #909399;
+  color: #fff;
+}
+</style>

+ 5 - 1
src/components/headerBar/header-bar.vue

@@ -461,7 +461,11 @@ const handleTabChange = (val) => {
     nextTick(() => {
       proxy.$refs["appCode"].innerHTML = ""; //清除二维码方法一
       new QRCode(proxy.$refs["appCode"], {
-        text: "http://139.9.102.170:20011/download/sanfanApp.apk",
+        // text:
+        //   "http://" +
+        //   import.meta.env.VITE_APP_IP +
+        //   ":20011/download/sanfanApp.apk",
+        text: import.meta.env.VITE_APP_IP + ":20010/sanfan/downloadApp",
         width: 200,
         height: 200,
         colorDark: "#000000",

+ 16 - 7
src/components/process/SF/CostControl.vue

@@ -394,9 +394,14 @@
                   <!-- :disabled="getAccountSubjectsId" -->
                   <el-form-item :prop="'costControlDetailList.' + $index + '.accountSubjectsId'" :rules="rules.accountSubjectsId"
                                 :inline-message="true" class="margin-b-0">
-                    <el-tree-select v-model="row.accountSubjectsId" :data="accountSubjectsData" check-strictly :render-after-expand="false"
+                    <!-- <el-tree-select v-model="row.accountSubjectsId" :data="accountSubjectsData" check-strictly :render-after-expand="false"
                                     node-key="id" :props="defaultProps" style="width:100%" filterable
-                                    @change="(val)=>changeAccountSubjectsId(val,$index)" />
+                                    @change="(val)=>changeAccountSubjectsId(val,$index)" /> -->
+
+                    <el-select v-model="row.accountSubjectsId" :placeholder="'请选择'" style="width: 100%" filterable
+                               @change="(val)=>changeAccountSubjectsId(val,$index)">
+                      <el-option v-for="item in accountSubjectsList" :key="item.value" :label="item.label" :value="item.value" />
+                    </el-select>
                   </el-form-item>
                 </div>
               </template>
@@ -409,14 +414,14 @@
                 </div>
               </template>
             </el-table-column> -->
-            <el-table-column label="记账科目名称" width="200" prop="accountSubjectsNames" v-if="isShowAtt('accountSubjectsId','detailObj')">
+            <!-- <el-table-column label="记账科目名称" width="200" prop="accountSubjectsNames" v-if="isShowAtt('accountSubjectsId','detailObj')">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
                   <el-input v-model="row.accountSubjectsNames" placeholder=" ">
                   </el-input>
                 </div>
               </template>
-            </el-table-column>
+            </el-table-column> -->
 
             <el-table-column label="核算项目名称" width="200" prop="subjectsCalculateItemNameList" v-if="isShowAtt('accountSubjectsId','detailObj')">
               <template #default="{ row, $index }">
@@ -1648,10 +1653,14 @@ const changeSelectData = (val, index, type) => {
 
 const getDict = () => {
   proxy
-    .post("/accountSubjects/list", { pageNum: 1, pageSize: 999 })
+    .post("/accountSubjects/page", { pageNum: 1, pageSize: 999 })
     .then((res) => {
-      accountSubjectsList.value = res;
-      accountSubjectsData.value = proxy.handleTree(res, "id");
+      accountSubjectsList.value = res.rows.map((x) => ({
+        ...x,
+        label: x.subjectsName,
+        value: x.id,
+      }));
+      // accountSubjectsData.value = proxy.handleTree(res, "id");
       proxy
         .post("/paymentType/page", { pageNum: 1, pageSize: 999 })
         .then((res) => {

+ 1 - 1
src/components/process/SF/Purchase.vue

@@ -253,7 +253,7 @@
                   <el-form-item :prop="'purchaseProductList.' + $index + '.priceIncludingTax'" :rules="rules.priceIncludingTax" :inline-message="true"
                                 class="margin-b-0 wid100">
                     <el-input-number onmousewheel="return false;" v-model="row.priceIncludingTax" placeholder="请输入" style="width: 100%" :precision="2"
-                                     :controls="false" :min="0" @change="calculationAmount()" />
+                                     :controls="false" :min="0" @change="calculationAmount()" disabled />
                   </el-form-item>
                 </div>
               </template>

+ 458 - 192
src/components/process/SF/PurchaseChange.vue

@@ -5,7 +5,7 @@
         <div>
           <el-button type="primary" v-if="
               [30].includes(route.query.processType) || !route.query.processType
-            " @click="clickCopy(1)">复制合同</el-button>
+            " @click="clickCopy(1)">复制订单</el-button>
         </div>
       </template>
       <template #seller>
@@ -15,49 +15,53 @@
               <el-option v-for="item in corporationList" :key="item.value" :label="item.label" :value="item.value" />
             </el-select>
           </el-form-item>
-          <el-form-item label="地址" class="wid100">
-            <el-row style="width:100%">
-              <el-col :span="8">
-                <el-form-item label="" prop="buyCountryName" label-width="0px" class="margin-b-0 wid100">
-                  <el-input v-model="formData.data.buyCountryName" placeholder="请输入国家" />
-                </el-form-item>
-              </el-col>
-              <el-col :span="8">
-                <el-form-item label="" prop="buyProvinceName" label-width="0px" class="margin-b-0 wid100">
-                  <el-input v-model="formData.data.buyProvinceName" placeholder="请输入省/州" />
-                </el-form-item>
-              </el-col>
-              <el-col :span="8">
-                <el-form-item label="" prop="buyCityName" label-width="0px" class="margin-b-0 wid100">
-                  <el-input v-model="formData.data.buyCityName" placeholder="请输入城市" />
-                </el-form-item>
-              </el-col>
-            </el-row>
-          </el-form-item>
+          <div v-show="isShowOther">
+            <el-form-item label="地址" class="wid100">
+              <el-row style="width:100%">
+                <el-col :span="8">
+                  <el-form-item label="" prop="buyCountryName" label-width="0px" class="margin-b-0 wid100">
+                    <el-input v-model="formData.data.buyCountryName" placeholder="请输入国家" />
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item label="" prop="buyProvinceName" label-width="0px" class="margin-b-0 wid100">
+                    <el-input v-model="formData.data.buyProvinceName" placeholder="请输入省/州" />
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item label="" prop="buyCityName" label-width="0px" class="margin-b-0 wid100">
+                    <el-input v-model="formData.data.buyCityName" placeholder="请输入城市" />
+                  </el-form-item>
+                </el-col>
+              </el-row>
+            </el-form-item>
 
-          <el-form-item label="详细地址" prop="buyAddress" class="wid100">
-            <el-input v-model="formData.data.buyAddress" type="textarea">
-            </el-input>
-          </el-form-item>
+            <el-form-item label="详细地址" prop="buyAddress" class="wid100">
+              <el-input v-model="formData.data.buyAddress" type="textarea">
+              </el-input>
+            </el-form-item>
+
+            <el-form-item label="联系人" class="wid100">
+              <el-row style="width:100%">
+                <el-col :span="8">
+                  <el-form-item label="" prop="buyContactName" label-width="0px" class="margin-b-0 wid100">
+                    <el-input v-model="formData.data.buyContactName" placeholder="请输入联系人" />
+                  </el-form-item>
+                </el-col>
+                <el-col :span="16">
+                  <el-form-item label="" prop="buyContactNumber" label-width="0px" class="margin-b-0 wid100">
+                    <el-input v-model="formData.data.buyContactNumber" placeholder="请输入联系人电话" />
+                  </el-form-item>
+                </el-col>
+              </el-row>
+            </el-form-item>
+          </div>
 
-          <el-form-item label="联系人" class="wid100">
-            <el-row style="width:100%">
-              <el-col :span="8">
-                <el-form-item label="" prop="buyContactName" label-width="0px" class="margin-b-0 wid100">
-                  <el-input v-model="formData.data.buyContactName" placeholder="请输入联系人" />
-                </el-form-item>
-              </el-col>
-              <el-col :span="16">
-                <el-form-item label="" prop="buyContactNumber" label-width="0px" class="margin-b-0 wid100">
-                  <el-input v-model="formData.data.buyContactNumber" placeholder="请输入联系人电话" />
-                </el-form-item>
-              </el-col>
-            </el-row>
-          </el-form-item>
         </div>
       </template>
       <template #buyer>
-        <div style="width: 100%">
+        <div style="width: 100%;position:relative">
+
           <el-form-item label="卖方信息" prop="sellCorporationId" class="wid100">
             <el-select v-model="formData.data.sellCorporationId" filterable remote reserve-keyword placeholder="请输入关键字" remote-show-suffix
                        :remote-method="remoteMethod" :loading="loadingSearch" @input="remoteMethod" style="width: 100%" @change="changeSupplier" v-if="
@@ -69,63 +73,75 @@
             <el-select v-model="formData.data.sellCorporationName" disabled v-else style="width: 100%">
             </el-select>
           </el-form-item>
-          <el-form-item label="地址" class="wid100" required>
-            <el-row style="width: 100%">
-              <el-col :span="6">
-                <el-form-item label="" prop="countryId" class="margin-b-0">
-                  <el-select v-model="formData.data.countryId" placeholder="国家" filterable @change="(val) => getCityData(val, '20', true)">
-                    <el-option v-for="item in countryData" :label="item.name" :value="item.id">
-                    </el-option>
-                  </el-select>
-                </el-form-item>
-              </el-col>
-              <el-col :span="6">
-                <el-form-item label="" prop="provinceName" class="margin-b-0">
-                  <selectCity placeholder="省/洲" @change="(val) => getCityData(val, '30', true)" addressId="provinceId" addressName="provinceName"
-                              v-model="formData.data" :data="provinceData">
-                  </selectCity>
-                </el-form-item>
-              </el-col>
-              <el-col :span="6">
-                <el-form-item label="" prop="cityName" class="margin-b-0">
-                  <selectCity placeholder="城市" addressId="cityId" addressName="cityName" v-model="formData.data" :data="cityData">
-                  </selectCity>
-                </el-form-item>
-              </el-col>
-              <el-col :span="6">
-                <el-form-item label="" prop="sellPostalCode" class="margin-b-0">
-                  <el-input v-model="formData.data.sellPostalCode" placeholder="请输入邮编" />
-                </el-form-item>
-              </el-col>
-            </el-row>
-          </el-form-item>
 
-          <el-form-item label="详细地址" prop="sellAddress" class="wid100">
-            <el-input v-model="formData.data.sellAddress" type="textarea">
-            </el-input>
-          </el-form-item>
-          <el-form-item label="联系人" class="wid100" required>
-            <el-row style="width: 100%">
-              <el-col :span="8">
-                <el-form-item label="" prop="sellContactName" label-width="0px" class="margin-b-0 wid100">
-                  <el-input v-model="formData.data.sellContactName" clearable placeholder="请输入联系人">
-                  </el-input>
-                </el-form-item>
-              </el-col>
-              <el-col :span="16">
-                <el-form-item label="" prop="sellContactNumber" label-width="0px" class="margin-b-0 wid100">
-                  <el-input v-model="formData.data.sellContactNumber" placeholder="请输入联系人电话" />
-                </el-form-item>
-              </el-col>
-            </el-row>
-          </el-form-item>
+          <div style="position:absolute;top:0px;right:-20px;cursor:pointer" @click="isShowOther =!isShowOther">
+            <el-icon v-if="!isShowOther">
+              <ArrowDownBold />
+            </el-icon>
+            <el-icon v-else>
+              <ArrowUpBold />
+            </el-icon>
+          </div>
+
+          <div v-show="isShowOther">
+            <el-form-item label="地址" class="wid100" required>
+              <el-row style="width: 100%">
+                <el-col :span="6">
+                  <el-form-item label="" prop="countryId" class="margin-b-0">
+                    <el-select v-model="formData.data.countryId" placeholder="国家" filterable @change="(val) => getCityData(val, '20', true)">
+                      <el-option v-for="item in countryData" :label="item.name" :value="item.id">
+                      </el-option>
+                    </el-select>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="6">
+                  <el-form-item label="" prop="provinceName" class="margin-b-0">
+                    <selectCity placeholder="省/洲" @change="(val) => getCityData(val, '30', true)" addressId="provinceId" addressName="provinceName"
+                                v-model="formData.data" :data="provinceData">
+                    </selectCity>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="6">
+                  <el-form-item label="" prop="cityName" class="margin-b-0">
+                    <selectCity placeholder="城市" addressId="cityId" addressName="cityName" v-model="formData.data" :data="cityData">
+                    </selectCity>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="6">
+                  <el-form-item label="" prop="sellPostalCode" class="margin-b-0">
+                    <el-input v-model="formData.data.sellPostalCode" placeholder="请输入邮编" />
+                  </el-form-item>
+                </el-col>
+              </el-row>
+            </el-form-item>
+
+            <el-form-item label="详细地址" prop="sellAddress" class="wid100">
+              <el-input v-model="formData.data.sellAddress" type="textarea">
+              </el-input>
+            </el-form-item>
+            <el-form-item label="联系人" class="wid100" required>
+              <el-row style="width: 100%">
+                <el-col :span="8">
+                  <el-form-item label="" prop="sellContactName" label-width="0px" class="margin-b-0 wid100">
+                    <el-input v-model="formData.data.sellContactName" clearable placeholder="请输入联系人">
+                    </el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="16">
+                  <el-form-item label="" prop="sellContactNumber" label-width="0px" class="margin-b-0 wid100">
+                    <el-input v-model="formData.data.sellContactNumber" placeholder="请输入联系人电话" />
+                  </el-form-item>
+                </el-col>
+              </el-row>
+            </el-form-item>
+          </div>
         </div>
       </template>
 
       <template #commodity>
         <div style="width: 100%">
           <el-table :data="formData.data.purchaseProductList" style="width: 100%; ">
-            <el-table-column label="商品图片" width="80">
+            <el-table-column label="图片" width="80">
               <template #default="{ row }">
                 <div v-if="row.fileUrl">
                   <img :src="row.fileUrl" class="pic" @click="onPicture(row.fileUrl)" />
@@ -133,8 +149,8 @@
                 <div v-else></div>
               </template>
             </el-table-column>
-            <el-table-column prop="productName" label="商品名称" min-width="130" />
-            <el-table-column prop="productCode" label="商品编码" width="130" />
+            <el-table-column prop="productCode" label="编码" width="150" />
+            <el-table-column prop="productName" label="名称" min-width="130" />
             <el-table-column label="规格尺寸 (cm)" width="140">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
@@ -142,9 +158,14 @@
                 </div>
               </template>
             </el-table-column>
+            <el-table-column prop="productColor" label="颜色" width="130" />
+            <el-table-column prop="productNetWeight" label="净重" width="100" />
+            <el-table-column prop="productFrontalTexture" label="纹路" width="130"
+                             :formatter="(row) => dictKeyValue(row.productFrontalTexture, frontLinesData)" />
+            <el-table-column prop="productUnit" label="单位" width="100" />
             <el-table-column label="数量" prop="subscribeCount" width="100" v-if="route.query.ids" />
             <el-table-column label="已采购数量" prop="purchaseCount" width="100" v-if="route.query.ids" />
-            <el-table-column label="采购数量" width="130">
+            <el-table-column label="采购数量" width="110">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
                   <el-form-item :prop="'purchaseProductList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true"
@@ -155,7 +176,7 @@
                 </div>
               </template>
             </el-table-column>
-            <el-table-column label="单价" width="160">
+            <!-- <el-table-column label="单价" width="160">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
                   <el-form-item :prop="'purchaseProductList.' + $index + '.price'" :rules="rules.price" :inline-message="true"
@@ -203,19 +224,42 @@
                           </div>
                         </template>
                         <template #reference>
-                          <!-- <div style="margin-left:10px;cursor:pointer;position:relative;top:4px">
+                          <div style="margin-left:10px;cursor:pointer;position:relative;top:4px">
                             <el-icon :size="20" color="#85c1a6">
                               <WarningFilled />
                             </el-icon>
-                          </div> -->
+                          </div>
                         </template>
                       </el-popover>
                     </div>
                   </el-form-item>
                 </div>
               </template>
+            </el-table-column> -->
+            <el-table-column label="单价(不含税)" width="130">
+              <template #default="{ row, $index }">
+                <div style="width: 100%">
+                  <el-form-item :prop="'purchaseProductList.' + $index + '.price'" :rules="rules.price" :inline-message="true"
+                                class="margin-b-0 wid100">
+                    <el-input-number onmousewheel="return false;" v-model="row.price" placeholder="请输入" style="width: 100%" :precision="2"
+                                     :controls="false" :min="0" @change="calculationAmount()" />
+                  </el-form-item>
+                </div>
+              </template>
             </el-table-column>
-            <el-table-column prop="amount" label="小计" width="120" />
+            <el-table-column label="单价(含税)" width="120">
+              <template #default="{ row, $index }">
+                <div style="width: 100%">
+                  <el-form-item :prop="'purchaseProductList.' + $index + '.priceIncludingTax'" :rules="rules.priceIncludingTax" :inline-message="true"
+                                class="margin-b-0 wid100">
+                    <el-input-number onmousewheel="return false;" v-model="row.priceIncludingTax" placeholder="请输入" style="width: 100%" :precision="2"
+                                     :controls="false" :min="0" @change="calculationAmount()" disabled />
+                  </el-form-item>
+                </div>
+              </template>
+            </el-table-column>
+            <el-table-column label="小计(不含税)" width="130" prop="amount" />
+            <el-table-column label="小计(含税)" width="120" prop="amountIncludingTax" />
             <el-table-column label="备注" width="200">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
@@ -313,6 +357,9 @@ const fundsPaymentMethod = computed(
 const shippingMethod = computed(
   () => proxy.useUserStore().allDict["shipping_method"]
 );
+const frontLinesData = computed(
+  () => proxy.useUserStore().allDict["front_lines"]
+);
 // const companyId = computed(() => proxy.useUserStore().user.companyId);
 const deliveryType = ref([
   {
@@ -328,6 +375,10 @@ const deliveryType = ref([
     value: "3",
   },
 ]);
+const treeData = ref([]);
+const userList = ref([]);
+const deptData = ref([]);
+const warehouseList = ref([]);
 const supplierList = ref([]);
 const corporationList = ref([]);
 const templateList = ref([]);
@@ -335,12 +386,13 @@ const customerUserList = ref([]);
 const countryData = ref([]);
 const provinceData = ref([]);
 const cityData = ref([]);
-
 const openProductCompany = ref(false);
 const copyType = ref(1);
 const copyContract = ref(false);
+const isShowOther = ref(false);
 const formData = reactive({
   data: {
+    fileList: [],
     purchaseProductList: [],
     remark: "",
   },
@@ -363,7 +415,7 @@ const judgeStatus = () => {
 };
 const formOption = reactive({
   inline: true,
-  labelWidth: 100,
+  labelWidth: 110,
   itemWidth: 100,
   disabled: false,
 });
@@ -379,13 +431,13 @@ const formConfig = computed(() => {
       type: "title",
       title: "基本信息",
     },
-
     {
       type: "input",
       prop: "code",
-      label: "合同号",
+      label: "订单号",
+      disabled: true,
       isShow: formData.data.code ? true : false,
-      itemWidth: 50,
+      itemWidth: 25,
     },
     {
       type: "treeSelect",
@@ -394,8 +446,55 @@ const formConfig = computed(() => {
       data: proxy.useUserStore().allDict["tree_company_data"],
       propsTreeLabel: "deptName",
       propsTreeValue: "deptId",
-      itemWidth: 50,
-      disabled: true,
+      itemWidth: 25,
+      // disabled: true,
+      fn: (val) => {
+        formData.data.deptId = "";
+        formData.data.purchaseUserId = "";
+        getDeptData(val);
+      },
+    },
+    {
+      type: "treeSelect",
+      prop: "deptId",
+      label: "业务部门",
+      data: deptData.value,
+      propsTreeLabel: "deptName",
+      propsTreeValue: "deptId",
+      itemWidth: 25,
+    },
+    {
+      type: "select",
+      prop: "purchaseUserId",
+      label: "采购员",
+      required: true,
+      filterable: true,
+      data: userList.value,
+      itemWidth: 25,
+    },
+    {
+      type: "date",
+      prop: "purchaseTime",
+      itemType: "date",
+      label: "采购日期",
+      itemWidth: 25,
+      disabled: false,
+    },
+    {
+      type: "treeSelect",
+      prop: "prodCompanyId",
+      label: "生产单位",
+      data: treeData.value,
+      propsTreeLabel: "deptName",
+      propsTreeValue: "deptId",
+      itemWidth: 25,
+    },
+    {
+      type: "select",
+      prop: "warehouseId",
+      label: "入库仓库",
+      data: warehouseList.value,
+      itemWidth: 25,
     },
     {
       type: "title",
@@ -414,25 +513,25 @@ const formConfig = computed(() => {
       label: "",
       itemWidth: 50,
     },
-    {
-      type: "title",
-      title: "付款信息",
-      haveLine: true,
-    },
-    {
-      type: "select",
-      prop: "paymentMethod",
-      label: "付款方式",
-      data: fundsPaymentMethod.value,
-      itemWidth: 25,
-    },
-    {
-      type: "select",
-      prop: "invoiceType",
-      label: "发票类型",
-      data: invoiceType.value,
-      itemWidth: 25,
-    },
+    // {
+    //   type: "title",
+    //   title: "付款信息",
+    //   haveLine: true,
+    // },
+    // {
+    //   type: "select",
+    //   prop: "paymentMethod",
+    //   label: "付款方式",
+    //   data: fundsPaymentMethod.value,
+    //   itemWidth: 25,
+    // },
+    // {
+    //   type: "select",
+    //   prop: "invoiceType",
+    //   label: "发票类型",
+    //   data: invoiceType.value,
+    //   itemWidth: 25,
+    // },
     {
       type: "title",
       title: "交付信息",
@@ -446,34 +545,70 @@ const formConfig = computed(() => {
     //   data: deliveryType.value,
     //   itemWidth: 50,
     // },
-    {
-      type: "select",
-      prop: "deliveryType",
-      label: "交货类型",
-      border: true,
-      data: deliveryType.value,
-      itemWidth: 50,
-      fn: () => {
-        changeAddress();
-      },
-    },
-    {
-      type: "input",
-      prop: "address",
-      itemType: "text",
-      label: "详细地址",
-      itemWidth: 50,
-    },
+    // {
+    //   type: "select",
+    //   prop: "deliveryType",
+    //   label: "交货类型",
+    //   border: true,
+    //   data: deliveryType.value,
+    //   itemWidth: 33.33,
+    //   fn: () => {
+    //     changeAddress();
+    //   },
+    // },
+    // {
+    //   type: "input",
+    //   prop: "address",
+    //   itemType: "text",
+    //   label: "详细地址",
+    //   itemWidth: 33.33,
+    // },
     {
       type: "date",
       itemType: "date",
       prop: "deliveryTime",
       label: "交付日期",
-      itemWidth: 50,
+      itemWidth: 33.33,
       disabledFn: (date) => {
         return moment(date).isBefore(moment());
       },
     },
+    {
+      type: "select",
+      prop: "supplierIncludingTax",
+      label: "报价是否含税",
+      filterable: true,
+      placeholder: " ",
+      disabled: true,
+      data: [
+        {
+          label: "是",
+          value: "1",
+        },
+        {
+          label: "否",
+          value: "0",
+        },
+      ],
+      itemWidth: 33.33,
+    },
+    {
+      type: "input",
+      prop: "supplierTaxPoints",
+      label: "供应商税点",
+      itemType: "text",
+      itemWidth: 33.33,
+      disabled: true,
+      placeholder: " ",
+    },
+    {
+      type: "upload",
+      listType: "text",
+      accept: "",
+      prop: "fileList",
+      label: "附件",
+      itemWidth: 100,
+    },
     // {
     //   type: "number",
     //   prop: "warranty",
@@ -518,25 +653,32 @@ const formConfig = computed(() => {
     },
     {
       type: "title",
-      title: "合同总金额",
+      title: "总金额",
       haveLine: true,
     },
     {
       type: "input",
       prop: "amount",
-      label: "合同总金额",
+      label: "总金额(不含税)",
+      itemWidth: 25,
+      disabled: true,
+    },
+    {
+      type: "input",
+      prop: "amountIncludingTax",
+      label: "总金额(含税)",
       itemWidth: 25,
       disabled: true,
     },
     {
       type: "title",
-      title: "合同模板",
+      title: "合同条款",
       haveLine: true,
     },
     {
       type: "select",
       prop: "contractTemplateId",
-      label: "合同模板",
+      label: "合同条款",
       data: templateList.value,
       itemWidth: 50,
       fn: (val) => {
@@ -598,9 +740,34 @@ const rules = ref({
   amount: [{ required: true, message: "请输入金额", trigger: "blur" }],
   remark: [{ required: true, message: "请输入条款内容", trigger: "blur" }],
   companyId: [{ required: true, message: "请选择业务公司", trigger: "change" }],
+  deptId: [{ required: true, message: "请选择业务部门", trigger: "change" }],
+  purchaseUserId: [
+    { required: true, message: "请选择采购员", trigger: "change" },
+  ],
+  purchaseTime: [
+    { required: true, message: "请选择采购日期", trigger: "change" },
+  ],
+  prodCompanyId: [
+    { required: true, message: "请选择生产单位", trigger: "change" },
+  ],
+  warehouseId: [
+    { required: true, message: "请选择入库仓库", trigger: "change" },
+  ],
 });
 const getDict = () => {
   proxy
+    .get("/tenantDept/list", {
+      pageNum: 1,
+      pageSize: 9999,
+      keyword: "",
+      tenantId: proxy.useUserStore().user.tenantId,
+      type: 0,
+    })
+    .then((res) => {
+      treeData.value = proxy.handleTree(res.data, "deptId");
+    });
+
+  proxy
     .post("/supplierInfo/page", {
       pageNum: 1,
       pageSize: 50,
@@ -638,6 +805,54 @@ const getDict = () => {
     });
 };
 
+const getDeptData = (val) => {
+  proxy
+    .get("/tenantUser/list", {
+      pageNum: 1,
+      pageSize: 10000,
+      tenantId: proxy.useUserStore().user.tenantId,
+      companyId: val,
+    })
+    .then((res) => {
+      userList.value = res.rows.map((item) => {
+        return {
+          label: item.nickName,
+          value: item.userId,
+        };
+      });
+    });
+
+  proxy
+    .get("/tenantDept/list", {
+      pageNum: 1,
+      pageSize: 9999,
+      keyword: "",
+      ancestors: val,
+      tenantId: proxy.useUserStore().user.tenantId,
+      // type: 2,
+    })
+    .then((res) => {
+      deptData.value = proxy.handleTree(res.data, "deptId");
+    });
+
+  proxy
+    .post("/warehouse/page", {
+      pageNum: 1,
+      pageSize: 999,
+      companyId: val,
+    })
+    .then((res) => {
+      if (res.rows && res.rows.length > 0) {
+        warehouseList.value = res.rows.map((item) => {
+          return {
+            label: item.name,
+            value: item.id,
+          };
+        });
+      }
+    });
+};
+
 const changeAddress = () => {
   if (formData.data.deliveryType === "1") {
     let buyCountryName = "";
@@ -742,6 +957,7 @@ const buyCorporationIdChange = (val) => {
     });
   }
 };
+
 const changeSupplierPrice = (val) => {
   let productIds = formData.data.purchaseProductList.map((x) => x.productId);
   if (val && productIds && productIds.length > 0) {
@@ -755,17 +971,13 @@ const changeSupplierPrice = (val) => {
           for (let i = 0; i < formData.data.purchaseProductList.length; i++) {
             const e = formData.data.purchaseProductList[i];
             for (const key in res) {
-              if (e.productId === key) {
-                e.price = Number(res[key]);
+              if (e.productId === key && res[key]) {
+                e.price = Number(res[key].price);
+                e.priceIncludingTax = Number(res[key].includingTaxPrice);
                 break;
               }
             }
           }
-        } else {
-          for (let i = 0; i < formData.data.purchaseProductList.length; i++) {
-            const e = formData.data.purchaseProductList[i];
-            e.price = 0;
-          }
         }
         calculationAmount();
       });
@@ -775,7 +987,10 @@ const changeSupplier = (val) => {
   // 产品价格趋势
   changeProductPrice();
   // 供应价格
-  changeSupplierPrice(val);
+  if (route.query.dataType == 1) {
+    changeSupplierPrice(val);
+  }
+
   formData.data.countryId = "";
   formData.data.provinceId = "";
   formData.data.cityId = "";
@@ -783,15 +998,14 @@ const changeSupplier = (val) => {
   formData.data.sellContactName = "";
   formData.data.sellContactNumber = "";
   if (val) {
-    let data = supplierList.value.filter((item) => item.id === val);
-    if (data && data.length > 0) {
-      formData.data.countryId = data[0].countryId;
-      formData.data.provinceId = data[0].provinceId;
-      formData.data.cityId = data[0].cityId;
-      formData.data.sellAddress = data[0].areaDetail;
-      formData.data.sellPostalCode = data[0].postalCode;
-      formData.data.sellContactName = data[0].contactPerson;
-      formData.data.sellContactNumber = data[0].contactNumber;
+    proxy.post("/supplierInfo/detail", { id: val }).then((res) => {
+      formData.data.countryId = res.countryId;
+      formData.data.provinceId = res.provinceId;
+      formData.data.cityId = res.cityId;
+      formData.data.sellAddress = res.areaDetail;
+      formData.data.sellPostalCode = res.postalCode;
+      formData.data.sellContactName = res.contactPerson;
+      formData.data.sellContactNumber = res.contactNumber;
       if (formData.data.countryId) {
         getCityData(formData.data.countryId, "20");
       }
@@ -799,11 +1013,14 @@ const changeSupplier = (val) => {
         getCityData(formData.data.provinceId, "30");
       }
       setTimeout(() => changeAddress(), 1500);
-    }
+      formData.data.supplierIncludingTax = res.privIncludingTax;
+      formData.data.supplierTaxPoints = res.privTaxPoints;
+    });
   }
 };
 
 const changeProductPrice = () => {
+  return;
   let productIds = formData.data.purchaseProductList.map((x) => x.productId);
   if (productIds && productIds.length > 0) {
     proxy
@@ -858,29 +1075,30 @@ const handleRemove = (index) => {
   formData.data.purchaseProductList.splice(index, 1);
   totalAmount();
 };
-const calculationAmount = (att = "") => {
-  nextTick(() => {
-    if (
-      formData.data.purchaseProductList &&
-      formData.data.purchaseProductList.length > 0
-    ) {
-      for (let i = 0; i < formData.data.purchaseProductList.length; i++) {
-        let money = 0;
-        money = parseFloat(
-          Number(formData.data.purchaseProductList[i].quantity) *
-            Number(formData.data.purchaseProductList[i].price)
-        ).toFixed(2);
-        formData.data.purchaseProductList[i].amount = money;
-      }
+
+const calculationAmount = () => {
+  if (
+    formData.data.purchaseProductList &&
+    formData.data.purchaseProductList.length > 0
+  ) {
+    for (let i = 0; i < formData.data.purchaseProductList.length; i++) {
+      formData.data.purchaseProductList[i].amount = parseFloat(
+        Number(formData.data.purchaseProductList[i].quantity) *
+          Number(formData.data.purchaseProductList[i].price)
+      ).toFixed(2);
+      formData.data.purchaseProductList[i].amountIncludingTax = parseFloat(
+        Number(formData.data.purchaseProductList[i].quantity) *
+          Number(formData.data.purchaseProductList[i].priceIncludingTax)
+      ).toFixed(2);
     }
-    nextTick(() => {
-      totalAmount();
-    });
-  });
+  }
+  totalAmount();
 };
 
 const totalAmount = () => {
   let money = 0;
+  let moneyTwo = 0;
+
   if (
     formData.data.purchaseProductList &&
     formData.data.purchaseProductList.length > 0
@@ -891,6 +1109,12 @@ const totalAmount = () => {
           Number(money) + Number(formData.data.purchaseProductList[i].amount)
         ).toFixed(2);
       }
+      if (formData.data.purchaseProductList[i].amountIncludingTax) {
+        moneyTwo = parseFloat(
+          Number(moneyTwo) +
+            Number(formData.data.purchaseProductList[i].amountIncludingTax)
+        ).toFixed(2);
+      }
     }
   }
   if (
@@ -906,7 +1130,9 @@ const totalAmount = () => {
     }
   }
   formData.data.amount = money;
+  formData.data.amountIncludingTax = moneyTwo;
 };
+
 const clickAdd = () => {
   if (
     formData.data.purchaseProjectList &&
@@ -976,6 +1202,7 @@ const handleSubmit = async () => {
     //   const errorDiv = document.getElementsByClassName("is-error");
     //   errorDiv[0].scrollIntoView();
     // }, 0);
+    isShowOther.value = true;
   }
   return flag;
 };
@@ -1030,12 +1257,33 @@ const getAllData = (businessId) => {
         );
         changeProductPrice();
       }
+      if (formData.data.companyId) {
+        getDeptData(formData.data.companyId);
+      }
       if (formData.data.countryId) {
         getCityData(formData.data.countryId, "20");
       }
       if (formData.data.provinceId) {
         getCityData(formData.data.provinceId, "30");
       }
+
+      proxy
+        .post("/fileInfo/getList", { businessIdList: [businessId] })
+        .then((fileObj) => {
+          if (fileObj[businessId] && fileObj[businessId].length > 0) {
+            formData.data.fileList = fileObj[businessId]
+              .filter((x) => x.businessType == "0")
+              .map((item) => {
+                return {
+                  ...item,
+                  name: item.fileName,
+                  url: item.fileUrl,
+                };
+              });
+          } else {
+            formData.data.fileList = [];
+          }
+        });
     });
   }
 };
@@ -1043,8 +1291,18 @@ const getAllData = (businessId) => {
 const getProductList = (ids) => {
   if (ids && ids.length > 0) {
     proxy.post("/subscribeDetail/detail", { ids }).then((res) => {
-      if (res && res.length > 0) {
-        formData.data.purchaseProductList = res.map((item) => {
+      formData.data.companyId =
+        res.companyId || proxy.useUserStore().user.companyId;
+      getDeptData(formData.data.companyId);
+      formData.data.deptId =
+        res.deptId || proxy.useUserStore().user.dept.deptId;
+      formData.data.purchaseUserId =
+        res.subcribeUserId || proxy.useUserStore().user.userId;
+      formData.data.warehouseId = res.putWarehouseId;
+
+      let detailList = res.subscribeDetailList;
+      if (detailList && detailList.length > 0) {
+        formData.data.purchaseProductList = detailList.map((item) => {
           let dataResourceId =
             item.dataType == 0 ? item.id : item.contractDetailId;
           return {
@@ -1055,11 +1313,17 @@ const getProductList = (ids) => {
             productLength: item.productLength,
             productWidth: item.productWidth,
             productHeight: item.productHeight,
+            productColor: item.productColor,
+            productNetWeight: item.productNetWeight,
+            productFrontalTexture: item.productFrontalTexture,
+            productUnit: item.productUnit,
             subscribeCount: item.count || 0,
             purchaseCount: item.purchaseCount || 0,
-            quantity: null,
-            price: "",
-            amount: "",
+            quantity: Number(item.count) - Number(item.purchaseCount) || null,
+            price: item.price || null,
+            priceIncludingTax: item.priceIncludingTax || null,
+            amount: item.amount || "",
+            amountIncludingTax: item.amountIncludingTax || "",
             remark: "",
             fileUrl: "",
             dataResource: item.dataType,
@@ -1070,11 +1334,11 @@ const getProductList = (ids) => {
         formData.data.dataResource =
           formData.data.purchaseProductList[0].dataResource;
         if (formData.data.purchaseProductList[0].dataType == 0) {
-          formData.data.dataResourceId = res[0].subscribeId;
+          formData.data.dataResourceId = detailList[0].subscribeId;
         } else {
-          formData.data.dataResourceId = res[0].contractId;
+          formData.data.dataResourceId = detailList[0].contractId;
         }
-        let productIdList = res.map((x) => x.productId);
+        let productIdList = detailList.map((x) => x.productId);
         proxy
           .post("/fileInfo/getList", {
             businessIdList: productIdList,
@@ -1091,9 +1355,13 @@ const getProductList = (ids) => {
               }
             }
           });
-
+        calculationAmount();
         changeProductPrice();
       }
+      if (res.supplierId) {
+        formData.data.sellCorporationId = res.supplierId;
+        changeSupplier(formData.data.sellCorporationId);
+      }
     });
   }
 };
@@ -1105,8 +1373,6 @@ onMounted(() => {
   }
   if (route.query.businessId && route.query.processType) {
     getAllData(route.query.businessId);
-  } else if (route.query.businessId) {
-    getAllData(route.query.businessId);
   }
 });
 

+ 9 - 9
src/components/process/SF/Subscribe.vue

@@ -7,7 +7,7 @@
             选择物料
           </el-button>
           <el-table :data="formData.data.subscribeDetailList" style="width: 100%; ">
-            <el-table-column prop="productCode" label="物料编码" width="150" />
+            <el-table-column prop="productCode" label="物料编码" width="190" />
             <el-table-column prop="productName" label="物料名称" width="150" />
             <el-table-column label="规格尺寸 (cm)" width="130">
               <template #default="{ row, $index }">
@@ -16,13 +16,13 @@
                 </div>
               </template>
             </el-table-column>
-            <el-table-column prop="productColor" label="颜色" width="130" />
+            <el-table-column prop="productColor" label="颜色" width="150" />
             <el-table-column prop="productNetWeight" label="净重" width="100" />
             <el-table-column prop="productFrontalTexture" label="纹路" width="130"
                              :formatter="(row) => dictKeyValue(row.productFrontalTexture, frontLinesData)" />
             <el-table-column prop="productUnit" label="单位" width="100" />
             <!-- <el-table-column prop="productUnit" label="单位" width="100" :formatter="(row) => dictKeyValue(row.productUnit, materialUnit)" /> -->
-            <el-table-column label="申购数量" width="110">
+            <el-table-column label="申购数量" width="110" fixed="right">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
                   <el-form-item :prop="'subscribeDetailList.' + $index + '.count'" :rules="rules.count" :inline-message="true"
@@ -33,7 +33,7 @@
                 </div>
               </template>
             </el-table-column>
-            <el-table-column label="单价(不含税)" width="130">
+            <el-table-column label="单价(不含税)" width="130" fixed="right">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
                   <el-form-item :prop="'subscribeDetailList.' + $index + '.price'" :rules="rules.price" :inline-message="true"
@@ -44,19 +44,19 @@
                 </div>
               </template>
             </el-table-column>
-            <el-table-column label="单价(含税)" width="120">
+            <el-table-column label="单价(含税)" width="120" fixed="right">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
                   <el-form-item :prop="'subscribeDetailList.' + $index + '.priceIncludingTax'" :rules="rules.priceIncludingTax" :inline-message="true"
                                 class="margin-b-0 wid100">
                     <el-input-number onmousewheel="return false;" v-model="row.priceIncludingTax" placeholder="请输入" style="width: 100%" :precision="2"
-                                     :controls="false" :min="0" @change="calculationAmount()" />
+                                     :controls="false" :min="0" @change="calculationAmount()" disabled />
                   </el-form-item>
                 </div>
               </template>
             </el-table-column>
-            <el-table-column label="小计(不含税)" width="130" prop="amount" />
-            <el-table-column label="小计(含税)" width="120" prop="amountIncludingTax" />
+            <el-table-column label="小计(不含税)" width="130" prop="amount" fixed="right" />
+            <el-table-column label="小计(含税)" width="120" prop="amountIncludingTax" fixed="right" />
             <el-table-column label="备注" min-width="200">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
@@ -67,7 +67,7 @@
                 </div>
               </template>
             </el-table-column>
-            <el-table-column label="操作" width="80" align="center" fixed="right" v-if="!judgeStatus()">
+            <el-table-column label="操作" width="80" align="center" v-if="!judgeStatus()" fixed="right">
               <template #default="{ $index }">
                 <el-button type="primary" link @click="handleRemove($index)">删除</el-button>
               </template>

+ 1 - 1
src/permission.js

@@ -23,7 +23,7 @@ NProgress.configure({
   showSpinner: false
 });
 
-const whiteList = ['/login', '/register'];
+const whiteList = ['/login', '/register', '/sanfan/downloadApp'];
 
 // 版本判断
 const checkVersion = async () => {

+ 7 - 0
src/router/index.js

@@ -57,6 +57,13 @@ export const constantRoutes = [{
     component: () => import("@/views/error/401"),
     hidden: true,
   },
+  // app下载页面,白名单的页面
+  {
+    path: "/sanfan/downloadApp",
+    component: () => import("@/components/headerBar/downloadApp"),
+    hidden: false,
+  },
+  // 其他
   {
     path: "",
     component: Layout,

+ 93 - 13
src/views/EHSD/saleContract/accountingSubjects/index.vue

@@ -1,27 +1,26 @@
 <template>
   <div class="pageIndexClass">
-    <byTable :hideTable="true" :hidePagination="true" :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="false"
-             highlight-current-row :action-list="[
+    <byTable :hideTable="false" :hidePagination="false" :source="sourceList.data" :pagination="sourceList.pagination" :config="config"
+             :loading="loading" highlight-current-row :action-list="[
         {
           text: '添加',
           action: () => openModal(),
         },
       ]" @get-list="getList">
     </byTable>
-    <div style="padding: 0 20px 20px 20px; background-color: white">
-      <!-- default-expand-all -->
-      <el-table v-loading="loading" :height="tableHeight" :data="sourceList.data" row-key="id"
-                :tree-props="{ children: 'children', hasChildren: 'hasChildren' }">
+    <div style="padding: 0 20px 20px 20px; background-color: white" v-if="false">
+      <!-- default-expand-all   :tree-props="{ children: 'children', hasChildren: 'hasChildren' }" -->
+      <el-table v-loading="loading" :height="tableHeight" :data="sourceList.data" row-key="id">
         <el-table-column prop="subjectsName" label="名称" />
         <el-table-column prop="calculateItemName" label="核算项目名称" />
         <el-table-column prop="remark" label="备注" />
         <el-table-column prop="sort" label="排序" width="100" />
         <el-table-column label="创建时间" align="left" prop="createTime" width="160">
         </el-table-column>
-        <el-table-column label="操作" align="center" width="200">
+        <el-table-column label="操作" align="center" width="120">
           <template #default="{ row }">
             <el-button link type="primary" @click="getDtl(row)">修改</el-button>
-            <el-button link type="primary" @click="openModal(row)">添加子项</el-button>
+            <!-- <el-button link type="primary" @click="openModal(row)">添加子项</el-button> -->
             <!-- <el-button link type="primary" @click="openRoomModal(row)">权限</el-button> -->
             <el-button link type="primary" @click="listDelete(row)">删除</el-button>
             <!-- v-if="checkIsTopData(row.parentId)" -->
@@ -113,14 +112,84 @@ const sourceList = ref({
   pagination: {
     total: 0,
     pageNum: 1,
-    pageSize: 9999,
+    pageSize: 10,
     keyword: "",
     tenantId: useUserStore().user.tenantId,
   },
 });
 const loading = ref(false);
 const config = computed(() => {
-  return [];
+  return [
+    {
+      attrs: {
+        label: "名称",
+        prop: "subjectsName",
+        // width: 110,
+      },
+    },
+    {
+      attrs: {
+        label: "核算项目名称",
+        prop: "calculateItemName",
+        // width: 140,
+      },
+    },
+    {
+      attrs: {
+        label: "备注",
+        prop: "remark",
+      },
+    },
+    {
+      attrs: {
+        label: "排序",
+        prop: "sort",
+        // width: 120,
+      },
+    },
+    {
+      attrs: {
+        label: "创建时间",
+        prop: "createTime",
+        // width: 160,
+      },
+    },
+
+    {
+      attrs: {
+        label: "操作",
+        width: "120",
+        align: "center",
+        fixed: "right",
+      },
+      renderHTML(row) {
+        return [
+          {
+            attrs: {
+              label: "修改",
+              type: "primary",
+              text: true,
+            },
+            el: "button",
+            click() {
+              getDtl(row);
+            },
+          },
+          {
+            attrs: {
+              label: "删除",
+              type: "danger",
+              text: true,
+            },
+            el: "button",
+            click() {
+              listDelete(row);
+            },
+          },
+        ];
+      },
+    },
+  ];
 });
 const getDict = () => {
   // proxy
@@ -153,10 +222,11 @@ const getList = (req) => {
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
   loading.value = true;
   proxy
-    .post("/accountSubjects/list", sourceList.value.pagination)
+    .post("/accountSubjects/page", sourceList.value.pagination)
     .then((res) => {
-      deptAllData.value = res;
-      sourceList.value.data = proxy.handleTree(res, "id");
+      sourceList.value.data = res.rows;
+      sourceList.value.pagination.total = res.total;
+      // sourceList.value.data = proxy.handleTree(res, "id");
       setTimeout(() => {
         loading.value = false;
       }, 200);
@@ -240,6 +310,16 @@ const formConfig = computed(() => {
       prop: "remark",
       label: "备注",
     },
+    {
+      type: "input",
+      prop: "jdSubjectCode",
+      label: "金蝶科目代码",
+    },
+    {
+      type: "input",
+      prop: "jdSubjectName",
+      label: "金蝶科目名称",
+    },
   ];
 });
 const rules = ref({

+ 10 - 0
src/views/finance/fundManage/account/index.vue

@@ -326,6 +326,16 @@ const formConfig = computed(() => {
       itemWidth: 50,
       itemType: "text",
     },
+    {
+      type: "input",
+      prop: "jdSubjectCode",
+      label: "银行科目代码",
+    },
+    {
+      type: "input",
+      prop: "jdSubjectName",
+      label: "银行科目名称",
+    },
     // {
     //   type: "title1",
     //   title: "外汇信息",

+ 1 - 0
src/views/index.vue

@@ -427,6 +427,7 @@ const getData = () => {
       pageNum: 1,
       pageSize: 5,
       isEstimate: "1",
+      quotationStatus: "0,1",
     })
     .then((res) => {
       allData.value[0] = res;

+ 68 - 6
src/views/purchaseManage/supplier/supplyPrice/index.vue

@@ -19,7 +19,7 @@
         </template>
       </byTable>
     </div>
-    <el-dialog :title="modalType == 'add' ? '添加供应价格' : '编辑供应价格'" v-model="dialogVisible" width="60%" v-loading="loading">
+    <el-dialog :title="modalType == 'add' ? '添加供应价格' : '编辑供应价格'" v-model="dialogVisible" width="70%" v-loading="loading">
       <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="byform">
         <template #details>
           <div style="width: 100%">
@@ -44,7 +44,8 @@
                 <template #default="{ row, $index }">
                   <el-form-item label-width="0px" label="" :prop="'supplierPriceList.' + $index + '.price'" :rules="rules.price"
                                 :inline-message="true" class="margin-b-0 wid100">
-                    <el-input-number v-model="row.price" :precision="2" :controls="false" :min="0.01" onmousewheel="return false;" />
+                    <el-input-number v-model="row.price" :precision="2" :controls="false" :min="0.01" onmousewheel="return false;"
+                                     @change="changePrice" />
                   </el-form-item>
                 </template>
               </el-table-column>
@@ -52,7 +53,8 @@
                 <template #default="{ row, $index }">
                   <el-form-item label-width="0px" label="" :prop="'supplierPriceList.' + $index + '.includingTaxPrice'"
                                 :rules="rules.includingTaxPrice" :inline-message="true" class="margin-b-0 wid100">
-                    <el-input-number v-model="row.includingTaxPrice" :precision="2" :controls="false" :min="0.01" onmousewheel="return false;" />
+                    <el-input-number v-model="row.includingTaxPrice" :precision="2" :controls="false" :min="0.01" disabled
+                                     onmousewheel="return false;" />
                   </el-form-item>
                 </template>
               </el-table-column>
@@ -75,7 +77,7 @@
     </el-dialog>
 
     <el-dialog v-if="openProduct" v-model="openProduct" title="物料选择" width="80%" append-to-body>
-      <SelectMaterial @selectMaterial="selectMaterial"></SelectMaterial>
+      <SelectMaterial :isNeRawMaterial="'1'" @selectMaterial="selectMaterial"></SelectMaterial>
     </el-dialog>
   </div>
 </template>
@@ -172,7 +174,7 @@ const config = computed(() => {
       attrs: {
         label: "物料编码",
         prop: "productCode",
-        width: 160,
+        width: 190,
       },
     },
     {
@@ -217,6 +219,13 @@ const config = computed(() => {
     },
     {
       attrs: {
+        label: "税点",
+        prop: "supplierTaxPoints",
+        width: 80,
+      },
+    },
+    {
+      attrs: {
         label: "单价(不含税)",
         prop: "price",
         width: 130,
@@ -295,7 +304,7 @@ const formData = reactive({
 });
 const formOption = reactive({
   inline: true,
-  labelWidth: 120,
+  labelWidth: 100,
   itemWidth: 100,
 });
 const byform = ref(null);
@@ -307,6 +316,21 @@ const formConfig = computed(() => [
     disabled: modalType.value == "edit",
     filterable: true,
     data: supplierData.value,
+    itemWidth: 50,
+    fn: (val) => {
+      let current = supplierData.value.find((x) => x.id == val);
+      if (current) {
+        formData.data.supplierTaxPoints = current.privTaxPoints;
+      }
+      changePrice();
+    },
+  },
+  {
+    type: "input",
+    prop: "supplierTaxPoints",
+    label: "税点",
+    disabled: true,
+    itemWidth: 50,
   },
   {
     type: "slot",
@@ -358,6 +382,18 @@ const formConfig = computed(() => [
     controls: false,
     itemWidth: 50,
     isShow: modalType.value == "edit",
+    fn: (val) => {
+      formData.data.includingTaxPrice = Number(
+        parseFloat(
+          val *
+            Number(
+              parseFloat(
+                1 + Number(formData.data.supplierTaxPoints) / 100
+              ).toFixed(2)
+            )
+        ).toFixed(2)
+      );
+    },
   },
   {
     type: "number",
@@ -367,6 +403,7 @@ const formConfig = computed(() => [
     min: 0.01,
     controls: false,
     itemWidth: 50,
+    disabled: true,
     isShow: modalType.value == "edit",
   },
   {
@@ -394,6 +431,7 @@ const openModal = () => {
   modalType.value = "add";
   formData.data = {
     supplierPriceList: [],
+    supplierTaxPoints: " ",
     renewWhileItExists: false,
   };
 };
@@ -498,6 +536,7 @@ const getDtl = (row) => {
     id: row.id,
     supplierInfoIdCopy: row.supplierInfoId,
     supplierInfoId: row.supplierName,
+    supplierTaxPoints: row.supplierTaxPoints,
     supplierPriceList: [
       {
         productInfoId: row.productInfoId,
@@ -624,6 +663,29 @@ const acquireSelectList = () => {
   }
   return data;
 };
+
+const changePrice = () => {
+  if (
+    formData.data.supplierPriceList &&
+    formData.data.supplierPriceList.length > 0
+  ) {
+    for (let i = 0; i < formData.data.supplierPriceList.length; i++) {
+      const row = formData.data.supplierPriceList[i];
+      if (row.price) {
+        row.includingTaxPrice = Number(
+          parseFloat(
+            row.price *
+              Number(
+                parseFloat(
+                  1 + Number(formData.data.supplierTaxPoints) / 100
+                ).toFixed(2)
+              )
+          ).toFixed(2)
+        );
+      }
+    }
+  }
+};
 </script>
 
 <style lang="scss" scoped>

+ 11 - 3
src/views/purchaseSales/outAndInWarehouse/waitingForDelivery/index.vue

@@ -70,7 +70,8 @@
                 <el-table-column prop="productUnit" label="单位" width="100" />
                 <el-table-column label="可用库存" prop="availableQuantity" width="100" fixed="right" />
                 <el-table-column label="需出库数量" prop="needQuantity" width="100" fixed="right" />
-                <el-table-column label="待出库数量" prop="waitQuantity" width="100" fixed="right" />
+                <el-table-column label="可出库最大数量(105%)" prop="maxQuantity" width="190" fixed="right" v-if="rowBusinessType==9" />
+                <el-table-column label="待出库数量" prop="waitQuantity" width="100" fixed="right" v-if="rowBusinessType!=9" />
                 <el-table-column label="已出库数量" prop="receiptQuantity" width="100" fixed="right" />
                 <el-table-column prop="quantity" label="出库数量" width="130" fixed="right">
                   <template #default="{ row, $index }">
@@ -539,8 +540,14 @@ const submitForm = () => {
     }
     for (let i = 0; i < formData.data.stockWaitDetailsList.length; i++) {
       const ele = formData.data.stockWaitDetailsList[i];
-      if (Number(ele.quantity) > Number(ele.waitQuantity)) {
-        return proxy.msgTip("出库数量不可大于待出库数量", 2);
+      if (rowBusinessType.value == 9) {
+        if (ele.quantity + ele.receiptQuantity > Number(ele.maxQuantity)) {
+          return proxy.msgTip("出库数量超出上限", 2);
+        }
+      } else {
+        if (Number(ele.quantity) > Number(ele.waitQuantity)) {
+          return proxy.msgTip("出库数量不可大于待出库数量", 2);
+        }
       }
     }
     loadingDialog.value = true;
@@ -573,6 +580,7 @@ const clickOperation = (row) => {
       ...x,
       availableQuantity: x.availableQuantity || 0,
       needQuantity: x.quantity,
+      maxQuantity: parseFloat(x.quantity * 1.05).toFixed(0),
       quantity: null,
     })),
     fileList: [],

+ 704 - 0
src/views/report/remittanceDetails/index.vue

@@ -0,0 +1,704 @@
+<template>
+  <div class="pageIndexClass">
+    <div class="content">
+      <byTable :source="sourceList.data" :pagination="sourceList.pagination" :selectConfig="selectConfig" :config="config" :loading="loading"
+               highlight-current-row :action-list="[{
+                text: '导出Excel',
+                action: () => exportExcel(),
+                disabled: false,
+              }
+        
+        ]" @get-list="getList">
+
+        <template #code="{item}">
+          <div style="width:100%">
+            <span class="el-click" @click="getDtl(item)">{{item.code}}</span>
+          </div>
+        </template>
+
+        <template #time="{item}">
+          <div style="width:100%">
+            <el-date-picker v-model="item.settleStartDate" type="date" style="width:150px" placeholder="开始日期" value-format="YYYY-MM-DD"
+                            :clearable="false" @change="()=>changeDate(item.settleStartDate,item.settleEndDate,item.id)" />
+            <el-date-picker v-model="item.settleEndDate" type="date" style="width:150px" placeholder="结束日期" value-format="YYYY-MM-DD"
+                            :clearable="false" @change="()=>changeDate(item.settleStartDate,item.settleEndDate,item.id)" />
+          </div>
+        </template>
+
+      </byTable>
+    </div>
+
+    <el-dialog :title="modalType == 'add' ? '添加' : '编辑'" v-if="dialogVisible" v-model="dialogVisible" width="60%">
+      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit" v-loading="loadingDialog">
+
+      </byForm>
+      <template #footer>
+        <el-button @click="dialogVisible = false" size="default">取 消</el-button>
+        <el-button type="primary" @click="submitForm()" size="default">确 定</el-button>
+      </template>
+    </el-dialog>
+  </div>
+</template>
+
+<script setup>
+import { computed, ref } from "vue";
+import byTable from "@/components/byTable/index";
+import byForm from "@/components/byForm/index";
+
+const { proxy } = getCurrentInstance();
+const sealType = computed(() => proxy.useUserStore().allDict["seal_type"]);
+const userList = ref([]);
+const deptData = ref([]);
+const typeData = ref([
+  {
+    label: "收入",
+    value: "10",
+  },
+  {
+    label: "支出",
+    value: "20",
+  },
+]);
+const accountAgeList = ref([
+  {
+    label: "0~30",
+    value: "0~30",
+  },
+  {
+    label: "30~60",
+    value: "30~60",
+  },
+  {
+    label: "60~90",
+    value: "60~90",
+  },
+  {
+    label: "90~120",
+    value: "90~120",
+  },
+  {
+    label: "120以上",
+    value: "120以上",
+  },
+]);
+const sourceList = ref({
+  data: [],
+  pagination: {
+    total: 0,
+    pageNum: 1,
+    pageSize: 10,
+    keyword: "",
+    isSettlement: "",
+    accountAgeDate: "",
+    accountAge: "",
+  },
+});
+const loading = ref(false);
+const statusData = ref([
+  {
+    label: "草稿",
+    value: 0,
+  },
+  {
+    label: "审批中",
+    value: 10,
+  },
+  {
+    label: "审批驳回",
+    value: 20,
+  },
+  {
+    label: "审批通过",
+    value: 30,
+  },
+  {
+    label: "作废",
+    value: 88,
+  },
+]);
+const belongTypeData = ref([
+  {
+    dictKey: "1",
+    dictValue: "归属工厂",
+  },
+  {
+    dictKey: "2",
+    dictValue: "归属业务",
+  },
+]);
+
+const contractType = ref([
+  {
+    dictKey: "3",
+    dictValue: "打样订单",
+  },
+  {
+    dictKey: "2",
+    dictValue: "内销订单",
+  },
+  {
+    dictKey: "1",
+    dictValue: "外贸订单(退税)",
+  },
+  {
+    dictKey: "4",
+    dictValue: "外贸订单(不退税)",
+  },
+]);
+const selectConfig = computed(() => {
+  return [
+    // {
+    //   label: "是否可结算",
+    //   prop: "isSettlement",
+    //   data: [
+    //     {
+    //       label: "是",
+    //       value: "1",
+    //     },
+    //     {
+    //       label: "否",
+    //       value: "0",
+    //     },
+    //   ],
+    // },
+    // {
+    //   type: "time",
+    //   itemType: "date",
+    //   label: "账龄日期",
+    //   placeholder: "请选择",
+    //   prop: "accountAgeDate",
+    //   placeholderOne: "",
+    //   propOne: "",
+    //   fn: () => {
+    //     getList();
+    //   },
+    // },
+    // {
+    //   label: "账龄",
+    //   prop: "accountAge",
+    //   data: accountAgeList.value,
+    // },
+  ];
+});
+const config = computed(() => {
+  return [
+    // {
+    //   attrs: {
+    //     label: "订单编号",
+    //     prop: "contractCode",
+    //     fixed: "left",
+    //     width: 150,
+    //   },
+    // },
+    {
+      attrs: {
+        label: "打款日期",
+        prop: "salesmanName",
+        width: 100,
+      },
+    },
+    {
+      attrs: {
+        label: "银行卡",
+        prop: "merchUserName",
+        width: 100,
+      },
+    },
+    {
+      attrs: {
+        label: "收付款说明",
+        prop: "contractType",
+        width: 130,
+      },
+      render(val) {
+        return proxy.dictKeyValue(val, contractType.value);
+      },
+    },
+    {
+      attrs: {
+        label: "对方科目",
+        prop: "belongType",
+        width: 110,
+      },
+      render(val) {
+        return proxy.dictKeyValue(val, belongTypeData.value);
+      },
+    },
+    {
+      attrs: {
+        label: "销售组费用类别",
+        prop: "amount",
+        width: 100,
+      },
+      render(val) {
+        return proxy.moneyFormat(val, 2);
+      },
+    },
+    {
+      attrs: {
+        label: "收入",
+        prop: "factoryAmount",
+        width: 120,
+      },
+      render(val) {
+        return proxy.moneyFormat(val, 2);
+      },
+    },
+    {
+      attrs: {
+        label: "支出",
+        prop: "sumOutFactoryMoney",
+        width: 160,
+      },
+      render(val) {
+        return proxy.moneyFormat(val, 2);
+      },
+    },
+    {
+      attrs: {
+        label: "余额",
+        prop: "deposit",
+        width: 90,
+      },
+      render(val) {
+        return proxy.moneyFormat(val, 2);
+      },
+    },
+    {
+      attrs: {
+        label: "科目名称",
+        prop: "isSettlement",
+        width: 100,
+      },
+      render(val) {
+        return val == 1 ? "是" : "否";
+      },
+    },
+    {
+      attrs: {
+        label: "核算项目",
+        slot: "time",
+        width: 180,
+      },
+    },
+    {
+      attrs: {
+        label: "核算项目1",
+        prop: "customerName",
+        "min-width": 180,
+      },
+    },
+    {
+      attrs: {
+        label: "核算项目2",
+        prop: "customerShortName",
+        width: 110,
+      },
+    },
+    {
+      attrs: {
+        label: "对方科目代码",
+        prop: "receivableAmount",
+        width: 90,
+      },
+      render(val) {
+        return proxy.moneyFormat(val, 2);
+      },
+    },
+    {
+      attrs: {
+        label: "对方科目名称",
+        prop: "sumClaimMoney",
+        width: 90,
+      },
+      render(val) {
+        return proxy.moneyFormat(val, 2);
+      },
+    },
+    {
+      attrs: {
+        label: "核算项目数据导入",
+        prop: "outstandingAmount",
+        width: 90,
+      },
+      render(val) {
+        return proxy.moneyFormat(val, 2);
+      },
+    },
+    {
+      attrs: {
+        label: "记账凭证号",
+        prop: "firstTruckDate",
+        width: 110,
+      },
+    },
+    {
+      attrs: {
+        label: "订单性质",
+        prop: "accountAge",
+        width: 100,
+      },
+      render(val) {
+        return proxy.dictValueLabel(val, accountAgeList.value);
+      },
+    },
+    // {
+    //   attrs: {
+    //     label: "审批状态",
+    //     prop: "status",
+    //     width: 100,
+    //   },
+    //   render(type) {
+    //     return proxy.dictValueLabel(type, statusData.value);
+    //   },
+    // },
+    // {
+    //   attrs: {
+    //     label: "操作",
+    //     width: "120",
+    //     align: "center",
+    //   },
+    //   renderHTML(row) {
+    //     return row.createUser == proxy.useUserStore().user.userId
+    //       ? [
+    //           row.status == 0
+    //             ? {
+    //                 attrs: {
+    //                   label: "修改",
+    //                   type: "primary",
+    //                   text: true,
+    //                 },
+    //                 el: "button",
+    //                 click() {
+    //                   clickUpdate(row);
+    //                 },
+    //               }
+    //             : {},
+    //           row.status == 0
+    //             ? {
+    //                 attrs: {
+    //                   label: "删除",
+    //                   type: "danger",
+    //                   text: true,
+    //                 },
+    //                 el: "button",
+    //                 click() {
+    //                   proxy
+    //                     .msgConfirm()
+    //                     .then((res) => {
+    //                       proxy
+    //                         .post("/educationSubsidy/delete", {
+    //                           id: row.id,
+    //                         })
+    //                         .then((res) => {
+    //                           proxy.msgTip("操作成功", 1);
+    //                           getList();
+    //                         });
+    //                     })
+    //                     .catch((err) => {});
+    //                 },
+    //               }
+    //             : {},
+    //           row.status == 10 || row.status == 30
+    //             ? {
+    //                 attrs: {
+    //                   label: "作废",
+    //                   type: "danger",
+    //                   text: true,
+    //                 },
+    //                 el: "button",
+    //                 click() {
+    //                   proxy
+    //                     .msgConfirm()
+    //                     .then((res) => {
+    //                       proxy
+    //                         .post("/educationSubsidy/cancellation", {
+    //                           id: row.id,
+    //                         })
+    //                         .then((res) => {
+    //                           proxy.msgTip("操作成功", 1);
+    //                           getList();
+    //                         });
+    //                     })
+    //                     .catch((err) => {});
+    //                 },
+    //               }
+    //             : {},
+    //         ]
+    //       : [];
+    //   },
+    // },
+  ];
+});
+const corporationList = ref([]);
+const getList = async (req) => {
+  sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
+  loading.value = true;
+  proxy
+    .post("/report/orderSummary", sourceList.value.pagination)
+    .then((res) => {
+      sourceList.value.data = res.rows;
+      sourceList.value.pagination.total = res.total;
+      setTimeout(() => {
+        loading.value = false;
+      }, 200);
+    });
+};
+getList();
+const getDeptData = (val) => {
+  proxy
+    .get("/tenantUser/list", {
+      pageNum: 1,
+      pageSize: 10000,
+      tenantId: proxy.useUserStore().user.tenantId,
+      companyId: proxy.useUserStore().user.companyId,
+    })
+    .then((res) => {
+      userList.value = res.rows.map((item) => {
+        return {
+          ...item,
+          label: item.nickName,
+          value: item.userId,
+        };
+      });
+    });
+
+  proxy
+    .get("/tenantDept/list", {
+      pageNum: 1,
+      pageSize: 9999,
+      keyword: "",
+      ancestors: proxy.useUserStore().user.companyId,
+      tenantId: proxy.useUserStore().user.tenantId,
+      // type: 2,
+    })
+    .then((res) => {
+      deptData.value = proxy.handleTree(res.data, "deptId");
+    });
+};
+// getDeptData();
+const modalType = ref("add");
+const dialogVisible = ref(false);
+const loadingDialog = ref(false);
+const submit = ref(null);
+const formOption = reactive({
+  inline: true,
+  labelWidth: 100,
+  itemWidth: 100,
+  rules: [],
+});
+const formConfig = computed(() => {
+  return [
+    {
+      type: "title1",
+      title: "基本信息",
+    },
+    {
+      type: "input",
+      prop: "name",
+      label: "印章名称",
+      required: true,
+      itemWidth: 50,
+      itemType: "text",
+    },
+    {
+      type: "select",
+      prop: "sealType",
+      label: "印章类型",
+      data: sealType.value,
+      itemWidth: 50,
+    },
+    {
+      type: "select",
+      prop: "applyUserId",
+      label: "存管人员",
+      required: true,
+      filterable: true,
+      data: userList.value,
+      itemWidth: 50,
+      fn: (val) => {
+        let current = userList.value.find((x) => x.value == val);
+        console.log(current, "ada");
+        if (current) {
+          formData.data.deptId = current.deptId;
+        }
+      },
+    },
+    {
+      type: "treeSelect",
+      prop: "deptId",
+      label: "存管部门",
+      data: deptData.value,
+      propsTreeLabel: "deptName",
+      propsTreeValue: "deptId",
+      itemWidth: 50,
+      disabled: 50,
+    },
+    {
+      type: "input",
+      prop: "accountNumber",
+      label: "印章用途",
+      itemWidth: 100,
+      itemType: "textarea",
+    },
+  ];
+});
+const rules = ref({
+  name: [{ required: true, message: "请输入承包商", trigger: "blur" }],
+  taxPoints: [{ required: true, message: "请输入税点", trigger: "blur" }],
+  accountBank: [{ required: true, message: "请输入开户行", trigger: "blur" }],
+  accountName: [{ required: true, message: "请输入开户名", trigger: "blur" }],
+  accountNumber: [{ required: true, message: "请输入账号", trigger: "blur" }],
+});
+const formData = reactive({
+  data: {
+    accountRemainderList: [{ currency: "", remainder: undefined }],
+  },
+});
+const openModal = (val) => {
+  // modalType.value = val;
+  // formData.data = {
+  //   accountRemainderList: [{ currency: "", remainder: undefined }],
+  // };
+  // loadingDialog.value = false;
+  // dialogVisible.value = true;
+  proxy.$router.replace({
+    path: "/platform_manage/process/processApproval",
+    query: {
+      flowKey: "education_subsidy_flow",
+      flowName: "学历补贴发起流程",
+      random: proxy.random(),
+    },
+  });
+};
+const clickBalance = () => {
+  if (
+    formData.data.accountRemainderList &&
+    formData.data.accountRemainderList.length > 0
+  ) {
+    formData.data.accountRemainderList.push({
+      currency: "",
+      remainder: undefined,
+    });
+  } else {
+    formData.data.accountRemainderList = [
+      { currency: "", remainder: undefined },
+    ];
+  }
+};
+const handleRemove = (index) => {
+  formData.data.accountRemainderList.splice(index, 1);
+};
+const isRepeat = (arr) => {
+  var hash = {};
+  for (var i in arr) {
+    if (hash[arr[i].currency]) return true;
+    hash[arr[i].currency] = true;
+  }
+  return false;
+};
+const submitForm = () => {
+  submit.value.handleSubmit(() => {
+    loadingDialog.value = true;
+    proxy.post("/contractor/" + modalType.value, formData.data).then(
+      () => {
+        proxy.msgTip("操作成功", 1);
+        dialogVisible.value = false;
+        getList();
+      },
+      (err) => {
+        console.log(err);
+        loadingDialog.value = false;
+      }
+    );
+    // if (
+    //   formData.data.accountRemainderList &&
+    //   formData.data.accountRemainderList.length > 0
+    // ) {
+    //   if (isRepeat(formData.data.accountRemainderList)) {
+    //     return ElMessage("请勿重复添加货币余额");
+    //   } else {
+    //     loadingDialog.value = true;
+    //     proxy.post("/accountManagement/" + modalType.value, formData.data).then(
+    //       () => {
+    //         ElMessage({
+    //           message: modalType.value == "add" ? "添加成功" : "编辑成功",
+    //           type: "success",
+    //         });
+    //         dialogVisible.value = false;
+    //         getList();
+    //       },
+    //       (err) => {
+    //         console.log(err);
+    //         loadingDialog.value = false;
+    //       }
+    //     );
+    //   }
+    // } else {
+    //   return ElMessage("请添加至少一条类型余额");
+    // }
+  });
+};
+
+const update = (row) => {
+  loadingDialog.value = false;
+  modalType.value = "edit";
+  formData.data = proxy.deepClone(row);
+  dialogVisible.value = true;
+};
+
+const clickUpdate = (row) => {
+  proxy.$router.push({
+    path: "/platform_manage/process/processApproval",
+    query: {
+      flowKey: "education_subsidy_flow",
+      flowName: "学历补贴发起流程",
+      random: proxy.random(),
+      businessId: row.id,
+    },
+  });
+};
+
+const getDtl = (row) => {
+  proxy.$router.push({
+    path: "/platform_manage/process/processApproval",
+    query: {
+      flowKey: "education_subsidy_flow",
+      flowName: "学历补贴流程查看",
+      random: proxy.random(),
+      businessId: row.id,
+      processType: 20,
+    },
+  });
+};
+
+const changeDate = (settleStartDate, settleEndDate, id) => {
+  if (settleStartDate && settleEndDate) {
+    proxy
+      .post("/contract/editSettleDateRange", {
+        id,
+        settleStartDate,
+        settleEndDate,
+      })
+      .then((res) => {});
+  }
+};
+
+const exportExcel = () => {
+  proxy.msgTip("正在导出,请稍后", 2);
+  proxy
+    .postTwo("/report/orderSummaryExcelExport", sourceList.value.pagination)
+    .then((res) => {
+      proxy.downloadFile(res, "订单汇总.xlsx");
+    });
+};
+</script>
+
+<style lang="scss" scoped>
+.tenant {
+  padding: 20px;
+}
+::v-deep(.el-input-number .el-input__inner) {
+  text-align: left;
+}
+</style>

+ 1 - 1
src/views/systemTenant/tenant/deptTenant/index.vue

@@ -182,7 +182,7 @@ const formConfig = computed(() => {
       prop: "type",
       label: "机构类型",
       data: typeList.value,
-      disabled: disabledType.value,
+      disabled: modalType.value == "edit" || disabledType.value,
       style: {
         width: "100%",
       },