cz 1 an în urmă
părinte
comite
622c7c1c68

+ 1 - 0
src/components/process/EHSD/Contract.vue

@@ -1790,6 +1790,7 @@ onMounted(() => {
       if (formData.data.provinceId) {
         getCityData(formData.data.provinceId, "30");
       }
+      getDecisionAids();
     });
   }
 });

+ 20 - 214
src/components/process/EHSD/Purchase.vue

@@ -292,181 +292,6 @@
       </template>
       <template #commodity>
         <div
-          style="width: 100%; padding: 15px; border: 1px solid #eee"
-          v-if="
-            formData.data.purchaseProductList &&
-            formData.data.purchaseProductList.length > 0
-          "
-        >
-          <el-row
-            style="
-              margin-bottom: 15px;
-              background: #eeeeee;
-              font-weight: 700;
-              padding: 10px;
-            "
-          >
-            <el-col :span="14">货品信息</el-col>
-            <el-col :span="4"
-              >订单总数:{{ formData.data.purchaseProductList.length }}</el-col
-            >
-            <el-col :span="6">订单总金额:{{ getTotalAmount() }}</el-col>
-          </el-row>
-          <template
-            v-for="(item, index) in formData.data.purchaseProductList"
-            :key="index"
-          >
-            <div style="width: 100%">
-              <el-table
-                :data="item.purchaseProductMountingsList"
-                :style="
-                  index !== formData.data.purchaseProductList.length - 1
-                    ? 'margin-bottom: 15px'
-                    : ''
-                "
-              >
-                <!-- :span-method=" ({ rowIndex, columnIndex }) =>
-                objectSpanMethod(rowIndex, columnIndex, item) " -->
-                <el-table-column label="货品信息" align="left">
-                  <template #default="{ row }">
-                    <div style="display: flex; align-items: center">
-                      <div style="width: 50px; height: 50px">
-                        <img
-                          v-if="row.fileUrl"
-                          :src="row.fileUrl"
-                          class="pic"
-                          @click="onPicture(row.fileUrl)"
-                        />
-                      </div>
-                      <div style="margin-left: 20px">
-                        <div>{{ row.productName }}</div>
-                        <div style="display: flex; color: #999999">
-                          <span
-                            >类型:
-                            {{
-                              dictValueLabel(row.productType, productType)
-                            }}</span
-                          ><span style="margin-left: 20px"
-                            >尺寸:{{ row.productModel }}</span
-                          >
-                        </div>
-                      </div>
-                    </div>
-                  </template>
-                </el-table-column>
-                <el-table-column
-                  label="数量"
-                  align="left"
-                  prop="quantity"
-                  width="180"
-                >
-                  <template #default="{ row, $index }">
-                    <div style="width: 100%" class="removePadding">
-                      <el-form-item
-                        :prop="
-                          'purchaseProductList.' +
-                          index +
-                          '.purchaseProductMountingsList.' +
-                          $index +
-                          '.quantity'
-                        "
-                        :rules="rules.quantity"
-                        :inline-message="true"
-                        @change="
-                          () => {
-                            return changeProductMaterial(index, $index);
-                          }
-                        "
-                      >
-                        <el-input-number
-                          onmousewheel="return false;"
-                          v-model="row.quantity"
-                          placeholder="请输入数量"
-                          :precision="0"
-                          :controls="false"
-                          :min="0"
-                        />
-                      </el-form-item>
-                    </div>
-                  </template>
-                </el-table-column>
-                <el-table-column
-                  label="单价"
-                  align="left"
-                  prop="price"
-                  width="180"
-                >
-                  <template #default="{ row, $index }">
-                    <div style="width: 100%" class="removePadding">
-                      <el-form-item
-                        :prop="
-                          'purchaseProductList.' +
-                          index +
-                          '.purchaseProductMountingsList.' +
-                          $index +
-                          '.price'
-                        "
-                        :rules="rules.price"
-                        :inline-message="true"
-                        @change="
-                          () => {
-                            return changeProductMaterial(index, $index);
-                          }
-                        "
-                      >
-                        <el-input-number
-                          onmousewheel="return false;"
-                          v-model="row.price"
-                          placeholder="请输入单价"
-                          :precision="2"
-                          :controls="false"
-                          :min="0"
-                        />
-                      </el-form-item>
-                    </div>
-                  </template>
-                </el-table-column>
-                <el-table-column
-                  label="金额小计"
-                  align="left"
-                  width="140"
-                  prop="amount"
-                />
-                <el-table-column label="操作" align="center" width="100">
-                  <template #default="{ row, $index }">
-                    <div v-if="$index === 0">
-                      <div>
-                        <el-button
-                          type="primary"
-                          text
-                          @click="handleHandover(item, index)"
-                          >备注</el-button
-                        >
-                      </div>
-                      <div>
-                        <el-button
-                          type="primary"
-                          text
-                          @click="handleMaterial(index)"
-                          >添加配件</el-button
-                        >
-                      </div>
-                    </div>
-                    <div v-else>
-                      <el-button
-                        type="primary"
-                        link
-                        @click="handleRemove(index, $index)"
-                        >删除</el-button
-                      >
-                    </div>
-                  </template>
-                </el-table-column>
-              </el-table>
-            </div>
-          </template>
-        </div>
-        <!-- <div 
           style="width: 100%"
           v-if="
             formData.data.purchaseProductList &&
@@ -490,31 +315,41 @@
               "
             >
               <el-row
-                style="width: 100%"
+                style="
+                  width: 100%;
+                  font-weight: 700;
+                  background: #eee;
+                  line-height: 50px;
+                "
                 :gutter="5"
                 type="flex"
                 align="middle"
               >
-                <el-col :span="2" style="text-align: center">
+                <el-col :span="1" style="text-align: center">
                   <img
                     v-if="item.fileUrl"
                     :src="item.fileUrl"
                     class="pic"
+                    style="width: 30px; height: 30px"
                     @click="onPicture(item.fileUrl)"
                   />
                 </el-col>
-                <el-col :span="5">
+                <el-col :span="4">
                   <span>产品名称: {{ item.productName }}</span>
                 </el-col>
                 <el-col :span="4">
                   <span>尺寸: {{ item.productModel }}</span>
                 </el-col>
-                <el-col :span="3">
+                <el-col :span="3"> </el-col>
+                <el-col :span="2">
                   <span>数量: {{ item.quantity }}</span>
                 </el-col>
                 <el-col :span="3">
                   <span>单价: {{ item.price }}</span>
                 </el-col>
+                <el-col :span="3">
+                  <span>金额小计: {{ item.amount }}</span>
+                </el-col>
                 <el-col :span="2">
                   <el-button
                     type="primary"
@@ -528,9 +363,6 @@
                     >添加配件</el-button
                   >
                 </el-col>
-                <el-col :span="3">
-                  <span>金额小计: {{ item.amount }}</span>
-                </el-col>
               </el-row>
               <el-collapse
                 v-model="item.activeName"
@@ -657,7 +489,7 @@
                 <el-button
                   type="primary"
                   @click="item.activeName = !item.activeName"
-                  style="margin-bottom: -28px"
+                  style="margin-bottom: -28px; background: #fff"
                   text
                 >
                   <span v-if="item.activeName">
@@ -686,7 +518,7 @@
               </div>
             </div>
           </div>
-        </div> -->
+        </div>
       </template>
       <template #otherCharge>
         <div style="width: 100%">
@@ -1601,7 +1433,9 @@ defineExpose({
 onMounted(() => {
   if (props.queryData.ids) {
     proxy.post("/delivery/page", { ids: props.queryData.ids }).then((res) => {
+      let arr = props.queryData.ids.split(",") || [];
       formData.data.dataResource = props.queryData.type;
+      formData.data.dataResourceId = arr[0];
       if (res.rows && res.rows.length > 0) {
         formData.data.purchaseProductList = res.rows.map((item) => {
           return {
@@ -1688,6 +1522,7 @@ onMounted(() => {
       for (const key in res) {
         formData.data[key] = res[key];
       }
+
       proxy
         .post("/fileInfo/getList", {
           businessIdList: [businessId],
@@ -1707,6 +1542,7 @@ onMounted(() => {
         formData.data.purchaseProductList.length > 0
       ) {
         let ids = formData.data.purchaseProductList.map((x) => x.productId);
+        getAuxiliaryData(formData.data.sellCorporationId, ids);
         proxy
           .post("/fileInfo/getList", {
             businessIdList: ids,
@@ -2074,36 +1910,6 @@ const remoteMethod = (keyword) => {
   }
   return;
 };
-
-const objectSpanMethod = (rowIndex, columnIndex, item) => {
-  if (columnIndex === 3) {
-    if (rowIndex === 0) {
-      return {
-        rowspan: item.purchaseProductMountingsList.length,
-        colspan: 1,
-      };
-    } else {
-      return {
-        rowspan: 0,
-        colspan: 1,
-      };
-    }
-  }
-};
-
-const getTotalAmount = () => {
-  const total = formData.data.purchaseProjectList.reduce(
-    (val, x) => (val += Number(x.amount)),
-    0
-  );
-  if (total) {
-    return parseFloat(formData.data.amount - total).toFixed(2);
-  } else {
-    if (formData.data.amount) {
-      return parseFloat(formData.data.amount).toFixed(2);
-    }
-  }
-};
 </script>
 
 <style lang="scss" scoped>

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

@@ -1515,6 +1515,7 @@ const changeAdvanceId = (val) => {
       formData.data.accountRequestFundsDetailList =
         res.accountRequestFundsDetailList.map((item) => {
           return {
+            dataType: item.dataType,
             costType: item.costType,
             amount: item.amount,
             contractId: item.contractId,

+ 22 - 1
src/views/EHSD/procurement/handoverSlipEHSD/index.vue

@@ -105,6 +105,9 @@ const config = computed(() => {
   return [
     {
       type: "selection",
+      attrs: {
+        checkAtt: "isCheck",
+      },
     },
     {
       attrs: {
@@ -223,7 +226,7 @@ const getList = async (req) => {
   proxy
     .post("/delivery/contractHandoverPage", sourceList.value.pagination)
     .then((res) => {
-      sourceList.value.data = res.rows;
+      sourceList.value.data = res.rows.map((x) => ({ ...x, isCheck: true }));
       sourceList.value.pagination.total = res.total;
       setTimeout(() => {
         loading.value = false;
@@ -259,6 +262,21 @@ const selectData = ref([]);
 const selectRow = (data) => {
   selectData.value = data;
 };
+// 监听选中的值,并动态更新是否可选中
+watch(selectData, (newVal, oldVal) => {
+  if (newVal.length == 0) {
+    sourceList.value.data.forEach((x) => {
+      x.isCheck = true;
+    });
+  } else if (newVal.length == 1) {
+    const current = newVal[0];
+    sourceList.value.data.forEach((x) => {
+      if (x.contractId !== current.contractId) {
+        x.isCheck = false;
+      }
+    });
+  }
+});
 const rowData = ref({
   fileList: [],
   packageFileList: [],
@@ -357,6 +375,9 @@ const getTimeSpent = (item) => {
 .tenant {
   padding: 20px;
 }
+:deep(.el-table__header-wrapper .el-checkbox) {
+  display: none;
+}
 ::v-deep(.el-input-number .el-input__inner) {
   text-align: left;
 }

+ 22 - 1
src/views/EHSD/procurement/handoverSlipSampleEHSD/index.vue

@@ -105,6 +105,9 @@ const config = computed(() => {
   return [
     {
       type: "selection",
+      attrs: {
+        checkAtt: "isCheck",
+      },
     },
     {
       attrs: {
@@ -223,7 +226,7 @@ const getList = async (req) => {
   proxy
     .post("/delivery/sampleHandoverList", sourceList.value.pagination)
     .then((res) => {
-      sourceList.value.data = res.rows;
+      sourceList.value.data = res.rows.map((x) => ({ ...x, isCheck: true }));
       sourceList.value.pagination.total = res.total;
       setTimeout(() => {
         loading.value = false;
@@ -259,6 +262,21 @@ const selectData = ref([]);
 const selectRow = (data) => {
   selectData.value = data;
 };
+// 监听选中的值,并动态更新是否可选中
+watch(selectData, (newVal, oldVal) => {
+  if (newVal.length == 0) {
+    sourceList.value.data.forEach((x) => {
+      x.isCheck = true;
+    });
+  } else if (newVal.length == 1) {
+    const current = newVal[0];
+    sourceList.value.data.forEach((x) => {
+      if (x.sampleId !== current.sampleId) {
+        x.isCheck = false;
+      }
+    });
+  }
+});
 const rowData = ref({
   fileList: [],
   packageFileList: [],
@@ -351,6 +369,9 @@ const getTimeSpent = (item) => {
 .tenant {
   padding: 20px;
 }
+:deep(.el-table__header-wrapper .el-checkbox) {
+  display: none;
+}
 ::v-deep(.el-input-number .el-input__inner) {
   text-align: left;
 }

+ 15 - 1
src/views/index.vue

@@ -63,7 +63,7 @@
                 link
                 type="primary"
                 size="small"
-                @click="pushProcessApproval(scope.row)"
+                @click="pushProcessApprovalOne(scope.row)"
               >
                 查看
               </el-button>
@@ -143,6 +143,20 @@ const pushProcessApproval = (row) => {
     }
   });
 };
+
+const pushProcessApprovalOne = (row) => {
+  proxy.$router.push({
+    path: "/platform_manage/process/processApproval",
+    query: {
+      flowKey: row.flowKey,
+      id: row.id,
+      processType: 20,
+      version: row.version,
+      businessId: row.businessId,
+    },
+  });
+  return;
+};
 const { proxy } = getCurrentInstance();
 const getData = () => {
   proxy