cz před 1 rokem
rodič
revize
3436ee600b

+ 3 - 0
src/components/WDLY/process/SendPurchaseWDLY.vue

@@ -344,14 +344,17 @@ const handleSubmit = async () => {
 };
 // 获取用户信息并赋默认值
 const userInfo = useUserStore().user;
+
 onMounted(() => {
   formData.data.purchaseTime = proxy.parseTime(new Date());
   formData.data.deptName = userInfo.dept.deptName;
+  formData.data.deptId = userInfo.dept.deptId;
   formData.data.purchaseName = userInfo.nickName;
   getSupplierList();
   if (!route.query.processType) {
     formData.data.freight = 0;
     formData.data.preferential = 0;
+    formData.data.teamId = route.query.teamId;
     ids.value = props.queryData.ids.split(",") || [];
     getDetails();
   } else {

+ 8 - 18
src/views/WDLY/purchaseManage/purchase/index.vue

@@ -2,35 +2,22 @@
   <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="{
+      <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row
+               :selectConfig="selectConfig" :table-events="{
           //element talbe事件都能传
           select: (data) => selectRow(data, 'row'),
           'select-all': (data) => selectAll(data, 'all'),
           'sort-change': sortChange,
-        }"
-        :action-list="[
+        }" :action-list="[
           {
             text: '采购',
             disabled: selectData.length === 0 && selectAllData.length === 0,
             action: () => start(20),
           },
-        ]"
-        @get-list="getList"
-      >
+        ]" @get-list="getList">
         <template #pic="{ item }">
           <div v-if="item.fileList.length > 0">
-            <img
-              :src="item.fileList[0].fileUrl"
-              class="pic"
-              @click="handleClickFile(item.fileList[0])"
-            />
+            <img :src="item.fileList[0].fileUrl" class="pic" @click="handleClickFile(item.fileList[0])" />
           </div>
           <div v-else></div>
         </template>
@@ -364,6 +351,7 @@ const start = (type) => {
         query: {
           flowKey: "wdly_purchase",
           ids,
+          teamId: deptId,
           flowName: "采购申请",
           random: proxy.random(),
         },
@@ -384,11 +372,13 @@ const start = (type) => {
       ids = selectData.value.map((x) => x.id).join();
       row = selectData.value[0];
     }
+    let deptId = row.deptId;
     proxy.$router.replace({
       path: "/platform_manage/process/processApproval",
       query: {
         flowKey: "wdly_purchase",
         ids,
+        teamId: deptId,
         flowName: "采购申请",
         random: proxy.random(),
       },