浏览代码

Merge branch 'master' of http://120.46.159.163:7400/ezhizao/ezhizao_dms_vue

ezhizao_zx 1 天之前
父节点
当前提交
ff69addbd8
共有 28 个文件被更改,包括 618 次插入198 次删除
  1. 2 1
      package.json
  2. 7 1
      src/views/business/batchCertificate/DialogFurnaceNoInfo.vue
  3. 11 0
      src/views/business/batchCertificate/index.vue
  4. 6 0
      src/views/business/companyProductPackage/index.vue
  5. 2 1
      src/views/business/department/DialogSupplierSelect.vue
  6. 4 2
      src/views/business/department/form.vue
  7. 2 0
      src/views/business/department/index.vue
  8. 7 1
      src/views/business/firstOutsource/DialogFurnaceNoInfo.vue
  9. 6 0
      src/views/business/furnaceInfo/furnaceDialog.vue
  10. 402 167
      src/views/business/inboundOrder/form.vue
  11. 1 1
      src/views/business/inboundOrder/index.vue
  12. 3 1
      src/views/business/inventoryCheck/anyInboundCheckForm.vue
  13. 39 8
      src/views/business/inventoryCheck/form.vue
  14. 8 4
      src/views/business/inventoryCheck/notInboundCheckForm.vue
  15. 1 1
      src/views/business/packageLine/index.vue
  16. 6 0
      src/views/business/process/index.vue
  17. 40 6
      src/views/business/processInspection/index.vue
  18. 6 0
      src/views/business/product/index.vue
  19. 7 0
      src/views/business/productionBatch/DialogCheckMaterial.vue
  20. 4 1
      src/views/business/productionBatch/index.vue
  21. 6 0
      src/views/business/productionPlan/index.vue
  22. 6 0
      src/views/business/returnReceipt/form.vue
  23. 10 0
      src/views/business/returnTurnover/index.vue
  24. 6 0
      src/views/business/reviseBath/index.vue
  25. 13 0
      src/views/business/reviseBath/lotFormParticulars.vue
  26. 8 2
      src/views/business/specialDaywork/form.vue
  27. 1 1
      src/views/business/workshop/index.vue
  28. 4 0
      src/views/dialog/person.vue

+ 2 - 1
package.json

@@ -34,6 +34,7 @@
     "pinia": "2.0.22",
     "print-js": "^1.6.0",
     "qs": "^6.11.2",
+    "ruoyi": "file:",
     "sortable.js": "^0.3.0",
     "sortablejs": "^1.15.2",
     "vue": "3.2.45",
@@ -53,4 +54,4 @@
     "vite-plugin-svg-icons": "2.0.1",
     "vite-plugin-vue-setup-extend": "0.4.0"
   }
-}
+}

+ 7 - 1
src/views/business/batchCertificate/DialogFurnaceNoInfo.vue

@@ -45,7 +45,9 @@
 </template>
 <script setup>
 // import { carrierForOutsource } from "@/api/business/outsourcedOrder";
-import { getFurnaceNoInfo } from '@/api/business/p2'
+import { getFurnaceNoInfo } from "@/api/business/furnaceNoInfo.js";
+import useSettingsStore from "@/store/modules/settings";
+const dataSource = useSettingsStore().dataSource;
 const { proxy } = getCurrentInstance();
 /** 字典数组区 */
 const { process_status } = proxy.useDict("process_status");
@@ -101,6 +103,7 @@ function close() {
  */
 function getList() {
   loading.value = true;
+  if(!dataSource){
   getFurnaceNoInfo({
     productionPlanNo: queryParams.value.productionPlanNo,
     lineNumber: queryParams.value.lineNumber
@@ -108,6 +111,9 @@ function getList() {
     productList.value = res.data;
     loading.value = false;
   });
+}else{
+  console.log("切换数据源")
+}
 }
 
 /**

+ 11 - 0
src/views/business/batchCertificate/index.vue

@@ -169,6 +169,8 @@ import DialogFurnaceNoInfo from "./DialogFurnaceNoInfo.vue";
 import companyDialog from "./companyDialog.vue";
 import HistoryDialog from "./HistoryDialog.vue";
 import { ElLoading } from "element-plus";
+import useSettingsStore from "@/store/modules/settings";
+const dataSource = useSettingsStore().dataSource;
 const { proxy } = getCurrentInstance();
 /**字典数组 */
 /** 设备档案管理 */
@@ -352,7 +354,11 @@ function handleGenerate(row){
       certificateList.value[index].certificate = res.data;
       proxy.$modal.msgSuccess("生成成功");
       //向P2保存
+      if(!dataSource){
       setP2Certificate({ id:res.data.id });
+      }else{
+        console.log("切换数据源")
+      }
     } else {
       proxy.$modal.msgError("生成失败");
     }
@@ -362,6 +368,7 @@ function handleGenerate(row){
 
 function getInfoFromP2() {
   proxy.$modal.loading("正在拉取数据,请稍后...");
+  if(!dataSource){
   getP2Accessories()
     .then((res) => {
       if (res.code === 200) {
@@ -388,6 +395,10 @@ function getInfoFromP2() {
       proxy.$modal.closeLoading();
       // proxy.$modal.msgError("拉取失败")
     });
+  }else{
+    console.log("切换数据源")
+
+  }
 }
 </script>
 <style scoped>

+ 6 - 0
src/views/business/companyProductPackage/index.vue

@@ -257,6 +257,8 @@ import { listCompanyProductPackage, delCompanyProductPackage, addCompanyProductP
 import ChoiceCompanyDialog from "./ChoiceCompanyDialog.vue";
 import ChoiceProductDialog from "./ChoiceProductDialog.vue";
 import ChoiceAccessoriesDialog from "./ChoiceAccessoriesDialog.vue";
+import useSettingsStore from "@/store/modules/settings";
+const dataSource = useSettingsStore().dataSource;
 const { proxy } = getCurrentInstance();
 const processList = ref([]);
 const loading = ref(true);
@@ -374,6 +376,7 @@ function handleCancel(row, index) {
 function handleSync() {
   // pullP2Accessories
   loading.value = true;
+  if(!dataSource){
   getP2CompanyProductPackage().then(res => {
     if (res.code === 200) {
       getList()
@@ -382,6 +385,9 @@ function handleSync() {
       proxy.$modal.msgError("拉取失败")
     }
   })
+}else{
+  console.log("切换数据源")
+}
 }
 
 function handleSelectAccessories(row) {

+ 2 - 1
src/views/business/department/DialogSupplierSelect.vue

@@ -116,7 +116,8 @@ const selections = ref([]);
  */
 function open(data) {
   visible.value = true;
-  queryParams.value.deptId = data;
+  queryParams.value.deptId = data.deptId;
+  queryParams.value.tenantId = data.tenantId;
   getList();
 }
 

+ 4 - 2
src/views/business/department/form.vue

@@ -248,8 +248,10 @@ function submitForm() {
 }
 //打开选择外协商弹窗
 function handleSelectSupplierSingle() {
-  proxy.$refs.selectSupplierRef.open(
-    form.value.deptId == "" ? 0 : form.value.deptId
+  proxy.$refs.selectSupplierRef.open({
+    deptId:form.value.deptId == "" ? 0 : form.value.deptId,
+    tenantId:form.value.tenantId == "" ? 0 : form.value.tenantId
+  }
   );
 }
 //外协商带回

+ 2 - 0
src/views/business/department/index.vue

@@ -226,6 +226,7 @@ function handleAddBatchUsers() {
 	const userInfo = {}
 	userInfo.identifying = true
 	userInfo.deptId = currentDept.value.id
+	userInfo.tenantId = currentDept.value.tenantId
 	proxy.$refs.personRef.open(userInfo)
 }
 /**员工多选带回 */
@@ -235,6 +236,7 @@ function handleMultipleSelected(selection) {
 		var newPerson = {}
 		newPerson.userId = selection[i].userId
 		newPerson.deptId = currentDept.value.id
+		newPerson.tenantId = currentDept.value.tenantId
 		newList.push(newPerson)
 	}
 	saveDeptUser(newList).then((response) => {

+ 7 - 1
src/views/business/firstOutsource/DialogFurnaceNoInfo.vue

@@ -45,7 +45,9 @@
 </template>
 <script setup>
 // import { carrierForOutsource } from "@/api/business/outsourcedOrder";
-import { getFurnaceNoInfo } from '@/api/business/p2'
+import { getFurnaceNoInfo } from "@/api/business/furnaceNoInfo.js";
+import useSettingsStore from "@/store/modules/settings";
+const dataSource = useSettingsStore().dataSource;
 const { proxy } = getCurrentInstance();
 /** 字典数组区 */
 const { process_status } = proxy.useDict("process_status");
@@ -100,6 +102,7 @@ function close() {
  */
 function getList() {
   loading.value = true;
+  if(!dataSource){
   getFurnaceNoInfo({
     productionPlanNo: queryParams.value.productionPlanNo,
     lineNumber: queryParams.value.lineNumber
@@ -107,6 +110,9 @@ function getList() {
     productList.value = res.data;
     loading.value = false;
   });
+}else{
+console.log("切换数据源")
+}
 }
 
 /**

+ 6 - 0
src/views/business/furnaceInfo/furnaceDialog.vue

@@ -57,6 +57,8 @@
 </template>
 <script setup>
 import { getFurnaceNoInfo } from "@/api/business/furnaceNoInfo.js";
+import useSettingsStore from "@/store/modules/settings";
+const dataSource = useSettingsStore().dataSource;
 import { updateDayworkFurnace } from '@/api/business/daywork.js'
 const { proxy } = getCurrentInstance();
 const loading = ref(false)
@@ -100,6 +102,7 @@ function getFunaceList() {
   //     value: `${item.furnaceNumber}%${item.incomingDate}` // 假设您希望value是furnaceNumber
   //   };
   // });
+  if(!dataSource){
   getFurnaceNoInfo({
     productionPlanNo: detailInfo.value.productionPlanNo,
     lineNumber: detailInfo.value.lineNumber,
@@ -121,6 +124,9 @@ function getFunaceList() {
       furnaceList.value = [];
     }
   });
+}else{
+ console.log("切换数据源")
+}
   loading.value = false;
   visible.value = true;
 }

+ 402 - 167
src/views/business/inboundOrder/form.vue

@@ -1,6 +1,12 @@
 <!-- 首序外协 -->
 <template>
-  <el-drawer title="入库单管理" :with-header="false" v-model="visible" direction="rtl" size="100%">
+  <el-drawer
+    title="入库单管理"
+    :with-header="false"
+    v-model="visible"
+    direction="rtl"
+    size="100%"
+  >
     <div class="form-container column-container">
       <div class="form-btns-container">
         <span class="title-label">
@@ -9,34 +15,80 @@
           </el-icon>
           <span>入库单管理</span>
         </span>
-        <el-button v-show="!editStatus" type="warning" icon="Download" @click="handlePrint"
-          v-hasPermi="['business:inboundOrder:export']">
+        <el-button
+          v-show="!editStatus"
+          type="warning"
+          icon="Download"
+          @click="handlePrint"
+          v-hasPermi="['business:inboundOrder:export']"
+        >
           打印
         </el-button>
-        <el-button v-show="!editStatus && checkEdit()" type="warning" icon="Edit" @click="handleEdit">
+        <el-button
+          v-show="!editStatus && checkEdit()"
+          type="warning"
+          icon="Edit"
+          @click="handleEdit"
+        >
           编辑
         </el-button>
-        <el-button v-show="editStatus && form.id != null" type="info" icon="Edit" @click="cancelEdit"
-          v-hasPermi="['business:inboundOrder:export']">
+        <el-button
+          v-show="editStatus && form.id != null"
+          type="info"
+          icon="Edit"
+          @click="cancelEdit"
+          v-hasPermi="['business:inboundOrder:export']"
+        >
           取消编辑
         </el-button>
-        <el-button v-if="editStatus" type="primary" icon="Finished" @click="handleSubmit">保存</el-button>
         <el-button
-          v-if="!editStatus && form.id != null && auth.hasPermi('business:inboundOrder:francise:input') && form.status != 2"
-          type="info" icon="Calendar" @click="handleInbound">入库</el-button>
+          v-if="editStatus"
+          type="primary"
+          icon="Finished"
+          @click="handleSubmit"
+          >保存</el-button
+        >
+        <el-button
+          v-if="
+            !editStatus &&
+            form.id != null &&
+            auth.hasPermi('business:inboundOrder:francise:input') &&
+            form.status != 2
+          "
+          type="info"
+          icon="Calendar"
+          @click="handleInbound"
+          >入库</el-button
+        >
         <div class="close-btn" @click="cancel">
           <i class="fa fa-times" aria-hidden="true" />
           <!-- <span>关闭</span> -->
         </div>
       </div>
-      <el-form ref="formRef" class="master-container" :model="form" v-loading="loading" :rules="rules"
-        label-width="120px">
+      <el-form
+        ref="formRef"
+        class="master-container"
+        :model="form"
+        v-loading="loading"
+        :rules="rules"
+        label-width="120px"
+      >
         <el-row :gutter="20">
           <el-col :span="4">
             <el-form-item label="入库类别" prop="type">
-              <el-select v-if="editStatus" v-model="form.type" placeholder="请选择入库类别" style="width: 100%">
-                <el-option v-for="item in inbound_type" :key="item.value" :label="item.label"
-                  :value="parseInt(item.value)" :disabled="checkDisabledForType(item)" />
+              <el-select
+                v-if="editStatus"
+                v-model="form.type"
+                placeholder="请选择入库类别"
+                style="width: 100%"
+              >
+                <el-option
+                  v-for="item in inbound_type"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="parseInt(item.value)"
+                  :disabled="checkDisabledForType(item)"
+                />
               </el-select>
               <span v-else>{{ selectText(form.type, inbound_type) }}</span>
             </el-form-item>
@@ -53,30 +105,54 @@
           </el-col>
           <el-col :span="4">
             <el-form-item label="入库单号" prop="inboundNumber">
-              <el-input v-if="editStatus" disabled v-model="form.inboundNumber" placeholder="自动生成" />
+              <el-input
+                v-if="editStatus"
+                disabled
+                v-model="form.inboundNumber"
+                placeholder="自动生成"
+              />
               <span v-else>{{ form.inboundNumber }}</span>
             </el-form-item>
           </el-col>
           <el-col :span="4">
             <el-form-item label="入库日期" prop="inboundTime">
-              <el-date-picker v-if="editStatus" disabled v-model="form.inboundTime" type="date" placeholder="选择日期"
-                value-format="YYYY-MM-DD HH:mm:ss" format="YYYY-MM-DD" style="width: 100%;" />
+              <el-date-picker
+                v-if="editStatus"
+                disabled
+                v-model="form.inboundTime"
+                type="date"
+                placeholder="选择日期"
+                value-format="YYYY-MM-DD HH:mm:ss"
+                format="YYYY-MM-DD"
+                style="width: 100%"
+              />
               <span v-else>{{ form.inboundTime }}</span>
             </el-form-item>
           </el-col>
           <el-col :span="4">
             <el-form-item label="转运托盘码" prop="transferCode">
-              <el-input v-if="editStatus" v-model="form.transferCode" placeholder="请输入转运托盘码" />
-              <span v-else>{{
-                form.transferCode
-              }}</span>
+              <el-input
+                v-if="editStatus"
+                v-model="form.transferCode"
+                placeholder="请输入转运托盘码"
+              />
+              <span v-else>{{ form.transferCode }}</span>
             </el-form-item>
           </el-col>
           <el-col :span="4">
             <el-form-item label="储存区域" prop="storageArea">
-              <el-select v-if="editStatus" v-model="form.storageArea" placeholder="请选择">
-                <el-option v-for="dict in storage_area" :key="dict.value" :label="dict.label" :value="dict.value"
-                  :disabled="checkDisabled(dict)" />
+              <el-select
+                v-if="editStatus"
+                v-model="form.storageArea"
+                placeholder="请选择"
+              >
+                <el-option
+                  v-for="dict in storage_area"
+                  :key="dict.value"
+                  :label="dict.label"
+                  :value="dict.value"
+                  :disabled="checkDisabled(dict)"
+                />
               </el-select>
               <span v-else>{{
                 selectText(form.storageArea, storage_area)
@@ -84,27 +160,39 @@
             </el-form-item>
           </el-col>
           <el-col :span="4">
-            <el-form-item label="反检出库单号" prop="reSelectOutgoingOrderNumber">
-              <el-input v-if="editStatus" v-model="form.reSelectOutgoingOrderNumber" placeholder="请输入反检出库单号" />
-              <span v-else>{{
-                form.reSelectOutgoingOrderNumber
-              }}</span>
+            <el-form-item
+              label="反检出库单号"
+              prop="reSelectOutgoingOrderNumber"
+            >
+              <el-input
+                v-if="editStatus"
+                v-model="form.reSelectOutgoingOrderNumber"
+                placeholder="请输入反检出库单号"
+              />
+              <span v-else>{{ form.reSelectOutgoingOrderNumber }}</span>
             </el-form-item>
           </el-col>
           <el-col :span="4">
             <el-form-item label="产品种类" prop="productionType">
               <!-- <span>{{ form.productionType }}</span> -->
-              <dict-tag :value="form.productType" :options="product_production_category" />
+              <dict-tag
+                :value="form.productType"
+                :options="product_production_category"
+              />
             </el-form-item>
           </el-col>
           <el-col :span="4">
             <el-form-item label="有无子件" prop="bomsta">
-              <span>{{ form.isSubclass == 1 ? '有' : '无' }}</span>
+              <span>{{ form.isSubclass == 1 ? "有" : "无" }}</span>
             </el-form-item>
           </el-col>
           <el-col :span="4">
             <el-form-item label="录入者" prop="inputNickName">
-              <span>{{ form.inputUserId != null ? form.inputUserName + ' ' + form.inputNickName : '' }}</span>
+              <span>{{
+                form.inputUserId != null
+                  ? form.inputUserName + " " + form.inputNickName
+                  : ""
+              }}</span>
             </el-form-item>
           </el-col>
           <el-col :span="4">
@@ -114,7 +202,11 @@
           </el-col>
           <el-col :span="4">
             <el-form-item label="保管员" prop="storageUserName">
-              <span>{{ form.storageUserId != null ? form.storageUserName + ' ' + form.storageNickName : '' }}</span>
+              <span>{{
+                form.storageUserId != null
+                  ? form.storageUserName + " " + form.storageNickName
+                  : ""
+              }}</span>
             </el-form-item>
           </el-col>
           <el-col :span="4">
@@ -154,7 +246,7 @@
           </el-col>
           <el-col :span="4">
             <el-form-item label="是否全部入库" prop="status">
-              <span>{{ form.isPrint == 1 ? '是' : '否' }}</span>
+              <span>{{ form.isPrint == 1 ? "是" : "否" }}</span>
             </el-form-item>
           </el-col>
           <el-col :span="12">
@@ -166,74 +258,182 @@
       </el-form>
       <!-- 渲染数据区 -->
       <div class="form-details-btns-container">
-        <el-button v-show="editStatus" type="primary" icon="Plus" @click="handleAddByCode"
-          v-hasPermi="['business:inboundOrder:add']">
+        <el-button
+          v-show="editStatus"
+          type="primary"
+          icon="Plus"
+          @click="handleAddByCode"
+          v-hasPermi="['business:inboundOrder:add']"
+        >
           添加
         </el-button>
-        <el-button :disabled="selections.length === 0" type="primary" icon="Plus" @click="handlePrintCertificate">
+        <el-button
+          :disabled="selections.length === 0"
+          type="primary"
+          icon="Plus"
+          @click="handlePrintCertificate"
+        >
           合格证重印
         </el-button>
       </div>
       <div class="el-table-container">
         <div class="el-table-inner-container">
-          <el-table v-loading="loading" :data="form.details" size="small" border height="100%"
-            @selection-change="handleSelectionChange">
+          <el-table
+            v-loading="loading"
+            :data="form.details"
+            size="small"
+            border
+            height="100%"
+            @selection-change="handleSelectionChange"
+          >
             <el-table-column type="selection" align="center" width="48" />
-            <el-table-column label="行号" type="index" align="center" width="48" />
-            <el-table-column label="合格证编号" align="center" prop="certificateCode" />
+            <el-table-column
+              label="行号"
+              type="index"
+              align="center"
+              width="48"
+            />
+            <el-table-column
+              label="合格证编号"
+              align="center"
+              prop="certificateCode"
+            />
             <el-table-column label="批号" align="center" prop="lotCode" />
-            <el-table-column label="入库数量" width="80" prop="inboundNum" align="center" />
-            <el-table-column label="是否入库" width="80" prop="isInbound" align="center">
+            <el-table-column
+              label="入库数量"
+              width="80"
+              prop="inboundNum"
+              align="center"
+            />
+            <el-table-column
+              label="是否入库"
+              width="80"
+              prop="isInbound"
+              align="center"
+            >
               <template #default="scope">
-                <div>{{ scope.row.isInbound == '1' ? '是' : '否' }}</div>
+                <div>{{ scope.row.isInbound == "1" ? "是" : "否" }}</div>
               </template>
             </el-table-column>
-            <el-table-column label="工号1" width="80" prop="firstOperatorUserName" align="center">
+            <el-table-column
+              label="工号1"
+              width="80"
+              prop="firstOperatorUserName"
+              align="center"
+            >
               <template #default="scope">
-                <el-button v-if="editStatus" type="primary" link icon="Edit"
-                  @click="handleUser(scope.row, 'firstOperator')">{{
-                    scope.row.firstOperatorUserName }}</el-button>
+                <el-button
+                  v-if="editStatus"
+                  type="primary"
+                  link
+                  icon="Edit"
+                  @click="handleUser(scope.row, 'firstOperator')"
+                  >{{ scope.row.firstOperatorUserName }}</el-button
+                >
                 <div v-else>{{ scope.row.firstOperatorUserName }}</div>
               </template>
             </el-table-column>
-            <el-table-column label="操作者1" width="80" prop="firstOperatorNickName" align="center" />
-            <el-table-column label="工号2" width="80" prop="secondOperatorUserName" align="center">
+            <el-table-column
+              label="操作者1"
+              width="80"
+              prop="firstOperatorNickName"
+              align="center"
+            />
+            <el-table-column
+              label="工号2"
+              width="80"
+              prop="secondOperatorUserName"
+              align="center"
+            >
               <template #default="scope">
-                <el-button v-if="editStatus" type="primary" link icon="Edit"
-                  @click="handleUser(scope.row, 'secondOperator')">{{
-                    scope.row.secondOperatorUserName }}</el-button>
+                <el-button
+                  v-if="editStatus"
+                  type="primary"
+                  link
+                  icon="Edit"
+                  @click="handleUser(scope.row, 'secondOperator')"
+                  >{{ scope.row.secondOperatorUserName }}</el-button
+                >
                 <div v-else>{{ scope.row.secondOperatorUserName }}</div>
               </template>
             </el-table-column>
-            <el-table-column label="操作者2" width="80" prop="secondOperatorNickName" align="center" />
-            <el-table-column label="工号3" width="80" prop="thirdOperatorUserName" align="center">
+            <el-table-column
+              label="操作者2"
+              width="80"
+              prop="secondOperatorNickName"
+              align="center"
+            />
+            <el-table-column
+              label="工号3"
+              width="80"
+              prop="thirdOperatorUserName"
+              align="center"
+            >
               <template #default="scope">
-                <el-button v-if="editStatus" type="primary" link icon="Edit"
-                  @click="handleUser(scope.row, 'thirdOperator')">{{
-                    scope.row.thirdOperatorUserName }}</el-button>
+                <el-button
+                  v-if="editStatus"
+                  type="primary"
+                  link
+                  icon="Edit"
+                  @click="handleUser(scope.row, 'thirdOperator')"
+                  >{{ scope.row.thirdOperatorUserName }}</el-button
+                >
                 <div v-else>{{ scope.row.thirdOperatorUserName }}</div>
               </template>
             </el-table-column>
-            <el-table-column label="操作者3" width="80" prop="thirdOperatorNickName" align="center" />
-            <el-table-column label="包装形式码" width="80" prop="packageTypeCode" align="center" />
+            <el-table-column
+              label="操作者3"
+              width="80"
+              prop="thirdOperatorNickName"
+              align="center"
+            />
+            <el-table-column
+              label="包装形式码"
+              width="80"
+              prop="packageTypeCode"
+              align="center"
+            />
             <el-table-column label="备注" prop="remark" align="center">
               <template #default="scope">
-                <el-input v-if="editStatus" v-model="scope.row.remark" placeholder="请输入备注" />
+                <el-input
+                  v-if="editStatus"
+                  v-model="scope.row.remark"
+                  placeholder="请输入备注"
+                />
                 <span v-else>{{ scope.row.remark }}</span>
               </template>
             </el-table-column>
-            <el-table-column v-if="editStatus" label="操作" align="center" fixed="right"
-              class-name="small-padding fixed-width" width="64">
+            <el-table-column
+              v-if="editStatus"
+              label="操作"
+              align="center"
+              fixed="right"
+              class-name="small-padding fixed-width"
+              width="64"
+            >
               <template #default="scope">
-                <el-button link type="danger" icon="Delete" @click="handleDelete(scope.$index)">删除</el-button>
+                <el-button
+                  link
+                  type="danger"
+                  icon="Delete"
+                  @click="handleDelete(scope.$index)"
+                  >删除</el-button
+                >
               </template>
             </el-table-column>
           </el-table>
         </div>
       </div>
     </div>
-    <certificateSearchDialog ref="certificateSearchDialogRef" @submit="addDetails" />
-    <person ref="personRef" :multiple="false" :singleSelected="handleUserSingleSelected" />
+    <certificateSearchDialog
+      ref="certificateSearchDialogRef"
+      @submit="addDetails"
+    />
+    <person
+      ref="personRef"
+      :multiple="false"
+      :singleSelected="handleUserSingleSelected"
+    />
   </el-drawer>
 </template>
 <script setup>
@@ -244,7 +444,7 @@ import {
   exportInboundOrderPdf,
   setPrint,
   exportCertificateLots,
-  inboundAllLot
+  inboundAllLot,
 } from "@/api/business/inboundOrder";
 // import FormDetailsRecycling from "./detailsRecyclingForm";
 import certificateSearchDialog from "./certificateSearchDialog";
@@ -253,14 +453,16 @@ const personRef = ref(null);
 const { proxy } = getCurrentInstance();
 const { inbound_type } = proxy.useDict("inbound_type");
 const { storage_area } = proxy.useDict("storage_area");
-const { product_production_category } = proxy.useDict("product_production_category");
-import useUserStore from '@/store/modules/user'
-import auth from '@/plugins/auth'
+const { product_production_category } = proxy.useDict(
+  "product_production_category"
+);
+import useUserStore from "@/store/modules/user";
+import auth from "@/plugins/auth";
 /** 父组件传参 */
 const props = defineProps({
   getList: {
     type: Function,
-    default: () => { },
+    default: () => {},
   },
   deliveryMethod: {
     type: Array,
@@ -283,26 +485,22 @@ const loading = ref(false);
 const visible = ref(false);
 const editStatus = ref(true);
 const hasReturnReceiptDetailFlag = ref(true);
-const editUser = ref('')
-const currentRow = ref(null)
+const editUser = ref("");
+const currentRow = ref(null);
 // 创建一个引用来存储最后一次请求的时间戳
 const totalCarriersNum = ref(0);
 const detailInfo = ref({});
 const webHost = import.meta.env.VITE_APP_BASE_API;
 const form = ref({
-  details: []
+  details: [],
 });
 const selections = ref([]);
 const certificateSearchDialogRef = ref(null);
 
-let submitValue = 0
+let submitValue = 0;
 const rules = {
-  type: [
-    { required: true, message: "请选择入库类型", trigger: "change" },
-  ],
-  inboundTime: [
-    { required: true, message: "请选择入库时间", trigger: "blur" },
-  ],
+  type: [{ required: true, message: "请选择入库类型", trigger: "change" }],
+  inboundTime: [{ required: true, message: "请选择入库时间", trigger: "blur" }],
   transferCode: [
     { required: true, message: "请输入转运托盘码", trigger: "blur" },
   ],
@@ -319,13 +517,13 @@ function handleExport() {
 
 /** 打印按钮操作 */
 function handlePrint() {
-  exportInboundOrderPdf({ id: form.value.id }).then(_ => {
-    console.log('已打印完毕')
+  exportInboundOrderPdf({ id: form.value.id }).then((_) => {
+    console.log("已打印完毕");
     setPrint({ id: form.value.id, isPrint: 1 }).then(() => {
-      getForm()
+      getForm();
       getList.value();
-    })
-  })
+    });
+  });
 }
 
 /** 打开抽屉 */
@@ -343,11 +541,11 @@ function open(row, edit) {
   } else {
     editStatus.value = true;
     hasReturnReceiptDetailFlag.value = true;
-    console.log(useUserStore().user)
-    form.value.inputUserId = useUserStore().user.userId
-    form.value.inputUserName = useUserStore().user.userName
-    form.value.inputNickName = useUserStore().user.nickName
-    form.value.inboundTime = proxy.moment().format("YYYY-MM-DD HH:mm:ss")
+    console.log(useUserStore().user);
+    form.value.inputUserId = useUserStore().user.userId;
+    form.value.inputUserName = useUserStore().user.userName;
+    form.value.inputNickName = useUserStore().user.nickName;
+    form.value.inboundTime = proxy.moment().format("YYYY-MM-DD HH:mm:ss");
   }
 }
 /** 查询表单信息  */
@@ -398,7 +596,7 @@ function reset() {
     isSubmit: 0,
     isFirstProcess: 1,
     status: 0,
-    isPrint: 0
+    isPrint: 0,
   };
   proxy.resetForm("formRef");
 }
@@ -408,9 +606,12 @@ function handleSubmit() {
   // 判断是否有数量问题不能入智能区
   proxy.$refs.formRef.validate((valid) => {
     if (valid) {
-      if (form.value.storageArea == '0' && form.value.details.some(t => form.value.labelNumber != t.inboundNum)) {
+      if (
+        form.value.storageArea == "0" &&
+        form.value.details.some((t) => form.value.labelNumber != t.inboundNum)
+      ) {
         proxy.$modal.msgError("包装箱内数量与规格不符,不能智能入库");
-        return
+        return;
       }
       if (!form.value.details || form.value.details.length == 0) {
         proxy.$modal.msgError("请添加产品明细");
@@ -435,7 +636,7 @@ function handleSubmit() {
           } else {
             proxy.$modal.msgError(response.msg);
           }
-        })
+        });
       }
     }
   });
@@ -445,53 +646,82 @@ function handleSelectionChange(selection) {
 }
 
 function handleAddByCode() {
-  const first = form.value.id != null ? { inboundOrderId: form.value.id, deptCode: form.value.deptCode, deptId: form.value.deptId, deptName: form.value.deptName, productCode: form.value.productCode, packageResourceGroupId: form.value.packageResourceGroupId, packageTypeCode: form.value.packageType } : form.value.details.length > 0 ? form.value.details[0] : null
-  certificateSearchDialogRef.value.open(first, form.value.id)
+  const first =
+    form.value.id != null
+      ? {
+          inboundOrderId: form.value.id,
+          deptCode: form.value.deptCode,
+          deptId: form.value.deptId,
+          deptName: form.value.deptName,
+          productCode: form.value.productCode,
+          packageResourceGroupId: form.value.packageResourceGroupId,
+          packageTypeCode: form.value.packageType,
+        }
+      : form.value.details.length > 0
+      ? form.value.details[0]
+      : null;
+  certificateSearchDialogRef.value.open(first, form.value.id);
 }
 
 function addDetails(details) {
   // 假设已选择入库类型为样品入库
   // 判断产品是否为样品 假设不是样品 输出错误
-  if (form.value.type == 3 && !details.some(v => v.productType == 'X')) {
-    proxy.$modal.msgError("样品入库请添加样品批次")
-    return
+  if (form.value.type == 3 && !details.some((v) => v.productType == "X")) {
+    proxy.$modal.msgError("样品入库请添加样品批次");
+    return;
   }
-  form.value.details.push(...details.filter(v => !form.value.details.some(t => t.certificateCode === v.certificateCode)))
+  form.value.details.push(
+    ...details.filter(
+      (v) =>
+        !form.value.details.some((t) => t.certificateCode === v.certificateCode)
+    )
+  );
   if (form.value.details.length > 0) {
-    form.value.deptName = form.value.details[0].deptName
-    form.value.packageResourceGroupName = form.value.details[0].packageResourceGroupName
-    form.value.packageResourceGroupLineNo = form.value.details[0].packageResourceGroupLineNo
-    form.value.deptId = form.value.details[0].deptId
-    form.value.productType = form.value.details[0].productType
-    form.value.isSubclass = form.value.details[0].isSubclass
-    form.value.packageResourceGroupId = form.value.details[0].packageResourceGroupId
-    form.value.storageUserId = form.value.details[0].bgyId
-    form.value.storageUserName = form.value.details[0].bgyno
-    form.value.storageNickName = form.value.details[0].bgyna
-    form.value.isSubclass = form.value.details[0].isSubclass
-    form.value.standard = form.value.details[0].standard
-    form.value.drawingNo = form.value.details[0].drawingNo
-    form.value.productDescription = form.value.details[0].productDescription
-    form.value.companyId = form.value.details[0].companyId
-    form.value.companyAlias = form.value.details[0].companyAlias
-    form.value.companyCode = form.value.details[0].companyCode
-    form.value.labelNumber = form.value.details[0].labelNumber
-    form.value.productCode = form.value.details[0].productCode
-    form.value.productId = form.value.details[0].productId
-    form.value.boxNumber = form.value.details.length
-    form.value.inboundTotalNum = 0
-    form.value.deptCode = form.value.details[0].deptCode
-    form.value.details.forEach(item => {
-      form.value.inboundTotalNum += Number(item.inboundNum)
-    })
-    form.value.unit = '支'
-    form.value.packageType = form.value.details[0].packageTypeCode
+    form.value.deptName = form.value.details[0].deptName;
+    form.value.packageResourceGroupName =
+      form.value.details[0].packageResourceGroupName;
+    form.value.packageResourceGroupLineNo =
+      form.value.details[0].packageResourceGroupLineNo;
+    form.value.deptId = form.value.details[0].deptId;
+    form.value.productType = form.value.details[0].productType;
+    form.value.isSubclass = form.value.details[0].isSubclass;
+    form.value.packageResourceGroupId =
+      form.value.details[0].packageResourceGroupId;
+    form.value.storageUserId = form.value.details[0].bgyId;
+    form.value.storageUserName = form.value.details[0].bgyno;
+    form.value.storageNickName = form.value.details[0].bgyna;
+    form.value.isSubclass = form.value.details[0].isSubclass;
+    form.value.standard = form.value.details[0].standard;
+    form.value.drawingNo = form.value.details[0].drawingNo;
+    form.value.productDescription = form.value.details[0].productDescription;
+    form.value.companyId = form.value.details[0].companyId;
+    form.value.companyAlias = form.value.details[0].companyAlias;
+    form.value.companyCode = form.value.details[0].companyCode;
+    form.value.labelNumber = form.value.details[0].labelNumber;
+    form.value.productCode = form.value.details[0].productCode;
+    form.value.productId = form.value.details[0].productId;
+    form.value.boxNumber = form.value.details.length;
+    form.value.inboundTotalNum = 0;
+    form.value.deptCode = form.value.details[0].deptCode;
+    form.value.details.forEach((item) => {
+      form.value.inboundTotalNum += Number(item.inboundNum);
+    });
+    form.value.unit = "支";
+    form.value.packageType = form.value.details[0].packageTypeCode;
+    // 判断包装箱的areaType,"Manual字符-- 人工区;Automatic字符代表智能区
+    if (form.value.details[0].areaType) {
+      if (form.value.details[0].areaType == "Manual") {
+        form.value.storageArea = "1";
+      } else if (form.value.details[0].areaType == "Automatic") {
+        form.value.storageArea = "0";
+      }
+    }
     // 假设默认每箱支数和实际不符则不能智能入库
-    if (form.value.details.some(t => form.value.labelNumber != t.inboundNum))
-      form.value.storageArea = '1'
-    if (form.value.details.some(t => t.productType == 'X')) {
-      form.value.type = 3
-      form.value.storageArea = '1'
+    if (form.value.details.some((t) => form.value.labelNumber != t.inboundNum))
+      form.value.storageArea = "1";
+    if (form.value.details.some((t) => t.productType == "X")) {
+      form.value.type = 3;
+      form.value.storageArea = "1";
     }
   }
 }
@@ -499,89 +729,94 @@ function addDetails(details) {
 function checkDisabled(item) {
   // 判断是样品入库不能入智能区
   // 判断数量不符不能入智能区
-  if (item.value == '0') {
+  if (item.value == "0") {
     return (
       form.value.type == 3
       // ||
       // form.value.details.some(t => form.value.labelNumber != t.inboundNum)
-    )
+    );
   } else {
-    return false
+    return false;
   }
 }
 
 function checkDisabledForType(item) {
   if (item.value == 3) {
-    return form.value.details.length > 0 && !form.value.details.some(t => t.productType == 'X')
+    return (
+      form.value.details.length > 0 &&
+      !form.value.details.some((t) => t.productType == "X")
+    );
   } else {
-    return form.value.details.some(t => t.productType == 'X')
+    return form.value.details.some((t) => t.productType == "X");
   }
 }
 
 function handleEdit() {
-  editStatus.value = !editStatus.value
+  editStatus.value = !editStatus.value;
 }
 
 function cancelEdit() {
-  editStatus.value = false
-  getForm()
+  editStatus.value = false;
+  getForm();
 }
 
-
 function checkEdit() {
   // 未打印 判断权限
   // 已打印 判断权限
   // 已出库 不可编辑
   if (form.value.status >= 1) {
-    return false
+    return false;
   } else if (form.value.isPrint == 1) {
     if (auth.hasPermi("business:inboundOrder:francise:edit")) {
-      return true
+      return true;
     } else {
-      return false
+      return false;
     }
   } else if (auth.hasPermi("business:inboundOrder:edit")) {
-    return true
+    return true;
   }
-  return false
+  return false;
 }
 
 function handleInbound() {
   // 确认是否全部入库
-  proxy.$confirm("是否确认全部入库?", "提示", {
-    confirmButtonText: "确定",
-    cancelButtonText: "取消",
-    type: "warning",
-  })
+  proxy
+    .$confirm("是否确认全部入库?", "提示", {
+      confirmButtonText: "确定",
+      cancelButtonText: "取消",
+      type: "warning",
+    })
     .then(() => {
       inboundAllLot(form.value).then((res) => {
         if (res.code == 200) {
-          proxy.$modal.msgSuccess("操作成功")
-          getForm()
-          getList.value()
+          proxy.$modal.msgSuccess("操作成功");
+          getForm();
+          getList.value();
         }
-      })
-    })
+      });
+    });
 }
 
 function handlePrintCertificate() {
   // console.log()
-  exportCertificateLots({ ids: selections.value.map(item => item.certificateLotId) })
+  exportCertificateLots({
+    ids: selections.value.map((item) => item.certificateLotId),
+  });
 }
 
 function handleUser(row, field) {
-  editUser.value = field
-  const userInfo = { deptId: form.value.deptId }
-  currentRow.value = row
+  editUser.value = field;
+  const userInfo = { deptId: form.value.deptId };
+  currentRow.value = row;
   proxy.$refs.personRef.open(userInfo);
 }
 
 function handleUserSingleSelected(info) {
-  currentRow.value[editUser.value + 'UserId'] = info.userId
-  currentRow.value[editUser.value + 'UserName'] = info.userName
-  currentRow.value[editUser.value + 'NickName'] = info.nickName
-  console.log(currentRow.value)
-  console.log(editUser.value)
+  currentRow.value[editUser.value + "UserId"] = info.userId;
+  currentRow.value[editUser.value + "UserName"] = info.userName;
+  currentRow.value[editUser.value + "NickName"] = info.nickName;
+  console.log(currentRow.value);
+  console.log(editUser.value);
 }
 
 /** 暴露给父组件的方法 */

+ 1 - 1
src/views/business/inboundOrder/index.vue

@@ -7,7 +7,7 @@
           @keyup.enter="handleQuery" />
       </el-form-item>
       <el-form-item label="入库部门:" prop="deptId">
-        <el-select-v2 v-model="deptId" :options="deptList" placeholder="请选择入库部门" style="width: 100px"
+        <el-select-v2 v-model="deptId" :options="deptList" placeholder="请选择入库部门" style="width: 150px"
           @change="handleQuery" />
       </el-form-item>
       <el-form-item label="入库类别:" prop="type">

+ 3 - 1
src/views/business/inventoryCheck/anyInboundCheckForm.vue

@@ -247,7 +247,9 @@ function handleInventory() {
           }
           loading.value = false;
         }
-      );
+      ).catch(res => {
+        loading.value = false;
+      });
     })
 }
 

+ 39 - 8
src/views/business/inventoryCheck/form.vue

@@ -61,6 +61,21 @@
             ></el-option>
           </el-select>
         </el-form-item>
+        <el-form-item label="是否入库:">
+          <el-select
+            v-model="queryParams.isInbound"
+            clearable
+            placeholder="请选择生产状态"
+            style="width: 145px"
+          >
+            <el-option
+              v-for="dict in is_inventory_inbound"
+              :key="dict.value"
+              :label="dict.label"
+              :value="dict.value"
+            ></el-option>
+          </el-select>
+        </el-form-item>
         <el-form-item label="标识:">
           <el-select
             style="width: 160px"
@@ -145,17 +160,17 @@
           <el-button
             type="primary"
             icon="List"
-              v-hasPermi="['business:inventoryCheck:notInboundCheck']"
+            v-hasPermi="['business:inventoryCheck:notInboundCheck']"
             @click="handleNotInboundCheckFrom"
             >未入库盘点
-            </el-button>
-            <el-button
+          </el-button>
+          <el-button
             type="primary"
             icon="List"
-              v-hasPermi="['business:inventoryCheck:anyInboundCheck']"
+            v-hasPermi="['business:inventoryCheck:anyInboundCheck']"
             @click="handleAnyInboundCheckFrom"
             >部分入库盘点
-            </el-button>
+          </el-button>
         </el-form-item>
       </el-form>
       <div class="el-table-container">
@@ -343,6 +358,21 @@
                 </div>
               </template>
             </el-table-column>
+            <el-table-column
+              label="入库状态"
+              prop="isTaksStock"
+              width="100"
+              align="center"
+            >
+              <template #default="scope">
+                <div>
+                  <dict-tag
+                    :options="is_inventory_inbound"
+                    :value="scope.row.isInbound"
+                  />
+                </div>
+              </template>
+            </el-table-column>
             <el-table-column
               label="操作"
               width="160"
@@ -392,7 +422,7 @@
     <OutsourceCheckDialog ref="outsourceCheckDialogRef" />
     <taksForm ref="taksFormRef" @handleSaveSuccess="getList" />
     <OutsourceCheckFom ref="outsourceCheckFom" @handleSaveSuccess="getList" />
-    <NotInboundCheckForm ref="notInboundCheckForm"  />
+    <NotInboundCheckForm ref="notInboundCheckForm" />
     <AnyInboundCheckForm ref="anyInboundCheckForm" />
   </el-drawer>
 </template>
@@ -420,6 +450,7 @@ const { is_taks_stock } = proxy.useDict("is_taks_stock");
 const { inventory_production_status } = proxy.useDict(
   "inventory_production_status"
 );
+const { is_inventory_inbound } = proxy.useDict("is_inventory_inbound");
 
 // 组件
 const outsourceCheckDialogRef = ref(null);
@@ -500,10 +531,10 @@ function handleEdit(row, index) {
 function outsourceCheckFrom() {
   proxy.$refs.outsourceCheckFom.open(detailInfo.value);
 }
-function handleNotInboundCheckFrom(){
+function handleNotInboundCheckFrom() {
   proxy.$refs.notInboundCheckForm.open(detailInfo.value);
 }
-function handleAnyInboundCheckFrom(){
+function handleAnyInboundCheckFrom() {
   proxy.$refs.anyInboundCheckForm.open(detailInfo.value);
 }
 function handleTaksLot() {

+ 8 - 4
src/views/business/inventoryCheck/notInboundCheckForm.vue

@@ -221,23 +221,27 @@ function handleInventory() {
       loading.value = true;
       saveNotInboundInfo({ takeStockPeriodId: detailInfo.value.id }).then(
         (res) => {
+          console.log("res", res)
           if (res.code == 200) {
+            console.log("chenggong")
             proxy.$modal.msgSuccess("操作成功");
             loading.value = false;
             reset();
             getList();
           } else {
+            console.log("cuowu")
+            loading.value = false;
             proxy.$modal.msgError("操作失败");
-          }
-          loading.value = false;
+          } 
         }
-      );
+      ).catch(res => {
+        loading.value = false;
+      });
     })
 }
 
 function getList() {
   loading.value = true;
-
   console.log("盘点明细", detailInfo.value);
   queryTaksParams.value.takeStockPeriodId = detailInfo.value.id;
   getNotInboundInfo(queryTaksParams.value).then((res) => {

+ 1 - 1
src/views/business/packageLine/index.vue

@@ -6,7 +6,7 @@
       <el-form class="list-search-container" :inline="true" style="display: flex">
         <el-form-item class="section-title" label="包装线列表" />
         <el-form-item class="section-title" label="请选择当前工段:">
-          <el-select-v2 v-model="queryDeptParams.deptId" :options="deptList" placeholder="请选择工段" style="width: 100px"
+          <el-select-v2 v-model="queryDeptParams.deptId" :options="deptList" placeholder="请选择工段" style="width: 150px"
             @change="handleDeptChange" />
         </el-form-item>
         <!-- :disabled="packageResourceGroups.length === 0" -->

+ 6 - 0
src/views/business/process/index.vue

@@ -46,6 +46,8 @@
 import { listProcess, delProcess } from '@/api/business/process'
 import { getP2Process } from "@/api/business/p2.js";
 import processForm from './form'
+import useSettingsStore from "@/store/modules/settings";
+const dataSource = useSettingsStore().dataSource;
 const { proxy } = getCurrentInstance()
 /** 字典数组区 */
 const { process_status } = proxy.useDict('process_status')
@@ -115,8 +117,12 @@ function handleDelete(row) {
 /** 工艺添加取消操作 */
 function handleSync() {
   loading.value = true;
+  if(!dataSource){
   getP2Process().then((res) => {
     getList();
   });
+}else{
+  console.log("切换数据源")
+}
 };
 </script>

+ 40 - 6
src/views/business/processInspection/index.vue

@@ -93,7 +93,7 @@
   </div>
 </template>
 
-<script setup name="processInspection">
+<script setup name="ProcessInspection">
 import {
   listInspecion,
   getInspectionType,
@@ -101,13 +101,14 @@ import {
 import { getDeptList } from "@/api/business/planDetailSubDetail.js";
 import processInspectionForm from "./form.vue";
 const webHost = import.meta.env.VITE_APP_BASE_API;
-import { ref } from "vue";
+import { ref, watchEffect } from "vue";
+const route = useRoute();
 const { proxy } = getCurrentInstance();
 /** 字典数组区 */
 const { process_inspection_status } = proxy.useDict(
   "process_inspection_status"
 );
-
+const isFirstActivation = ref(true)
 /** 序检 */
 const processInspectionTable = ref(null);
 const inspectionList = ref([]);
@@ -132,7 +133,6 @@ const queryParams = ref({
 
 /***********************  工段相关事件  ****************************/
 function getList() {
-  getNowDate();
   loading.value = true;
   getTypeList();
   getDeptList().then((response) => {
@@ -142,7 +142,6 @@ function getList() {
     if (isDispatch.value) {
       deptList.value.unshift({ label: "全部", value: "0" });
     }
-    console.log(deptList.value)
     let index = deptList.value.findIndex((item) => {
       return item.deptCode == "170000";
     });
@@ -218,8 +217,43 @@ function handleViewImage(row) {
 }
 
 onMounted(() => {
-  getList();
+  // const hasVisited = sessionStorage.getItem('visited');
+  // if (!hasVisited || hasVisited === 'false') {
+    getNowDate();
+    //sessionStorage.setItem('visited', true);
+    if (route.query && route.query.lotCode) {
+      queryParams.value.lotCode = route.query.lotCode;
+      queryParams.value.startTime = null;
+      queryParams.value.endTime = null;
+    }
+    getList();
+  //}
 });
+
+onActivated(() => {
+  if (isFirstActivation.value) {
+    isFirstActivation.value = false;
+  } else{
+    if (route.query && route.query.lotCode) {
+      queryParams.value.lotCode = route.query.lotCode;
+      const noLotCode = sessionStorage.getItem('noLotCode');
+      if (!noLotCode || noLotCode === 'true') {
+        queryParams.value.startTime = null;
+        queryParams.value.endTime = null;
+        sessionStorage.setItem('noLotCode', 'false');
+      }
+    } else {
+      queryParams.value.lotCode = ''
+      sessionStorage.setItem('noLotCode', 'true');
+      getNowDate();
+    }
+    getList();
+  }
+});
+
+onDeactivated(() => {
+  // 离开时清空sessionStorage
+})
 </script>
 <style scoped>
 .el-form--inline .el-form-item {

+ 6 - 0
src/views/business/product/index.vue

@@ -667,6 +667,8 @@ import {
   delTechnologicalProcess,
 } from "@/api/business/technologicalProcess";
 import { ref } from "vue";
+import useSettingsStore from "@/store/modules/settings";
+const dataSource = useSettingsStore().dataSource;
 const { proxy } = getCurrentInstance();
 /** 字典数组区 */
 const { product_type } = proxy.useDict("product_type");
@@ -914,9 +916,13 @@ const handleAddTechnologicalProcess = () => {
 /** 工艺添加取消操作 */
 const handleSync = () => {
   productLoading.value = true;
+  if(!dataSource){
   getP2Product(queryParams.value).then((res) => {
     getList();
   });
+}else{
+  console.log("切换数据源")
+}
 };
 
 /** 单条删除工艺操作

+ 7 - 0
src/views/business/productionBatch/DialogCheckMaterial.vue

@@ -78,6 +78,8 @@
 </template>
 <script setup>
 import { getFurnaceNoInfo } from "@/api/business/furnaceNoInfo.js";
+import useSettingsStore from "@/store/modules/settings";
+const dataSource = useSettingsStore().dataSource;
 /** 领料信息变量 */
 const visible = ref(false);
 const loading = ref(false);
@@ -87,6 +89,8 @@ const furnaceNoInfoList = ref([]);
 function open(row) {
   loading.value = true;
   furnaceNoInfoList.value = [];
+  console.log(dataSource)
+  if(!dataSource){
   getFurnaceNoInfo({
     productionPlanNo: row.productionPlanNo,
     lineNumber: row.lineNumber,
@@ -97,6 +101,9 @@ function open(row) {
       furnaceNoInfoList.value = [];
     }
   });
+}else{
+ console.log("切换数据源")
+}
   loading.value = false;
   visible.value = true;
 }

+ 4 - 1
src/views/business/productionBatch/index.vue

@@ -391,6 +391,7 @@ import lotInfo from "./lotInfoForm.vue";
 import useSettingsStore from "@/store/modules/settings";
 import router from "@/router";
 const genLotBySub = useSettingsStore().genLotBySub;
+const dataSource = useSettingsStore().dataSource;
 // import productionDialog from "./DialogProduction";
 const { proxy } = getCurrentInstance();
 /** 字典数组区 */
@@ -443,6 +444,7 @@ function getList() {
 }
 /**工段下拉框change事件 */
 function handleDeptChange() {
+  handleQueryProductionPlanDetail();
   handlePlanDetailCurrentChange(currentPlanDetail.value);
 }
 /***********************  生产计划  ****************************/
@@ -633,7 +635,8 @@ function handleDelSubDetail(row) {
   proxy.$modal
     .confirm("是否确认删除选中的数据项?")
     .then(function () {
-      return genLotBySub
+      // return genLotBySub
+      return dataSource
         ? delPlanDetailSubDetailByNum(_ids)
         : delPlanDetailSubDetail(_ids);
     })

+ 6 - 0
src/views/business/productionPlan/index.vue

@@ -107,6 +107,8 @@ import { getConfigKey } from '@/api/system/config'
 import { listProductionPlanDetail } from '@/api/business/productionPlanDetail.js'
 import totalIcon2 from '@/assets/images/dashboard-total-icon-2.png'
 import totalIcon3 from '@/assets/images/dashboard-total-icon-3.png'
+import useSettingsStore from "@/store/modules/settings";
+const dataSource = useSettingsStore().dataSource;
 import { ref } from 'vue'
 const { proxy } = getCurrentInstance()
 /** 字典数组区 */
@@ -135,12 +137,16 @@ onMounted(() => {
 /** 查询生产计划列表 */
 function getList() {
   loading.value = true
+  if(!dataSource){
   getP2Plan(queryParams.value).then((res) => {
     productionPlanList.value = res.rows
     total.value = res.total
     loading.value = false
     queryParams.value.pullP2PlanDetails = false
   })
+}else{
+  console.log("切换数据源")
+}
 }
 
 /** 搜索按钮操作 */

+ 6 - 0
src/views/business/returnReceipt/form.vue

@@ -156,6 +156,8 @@ import {
 import { getP2NeedCheckProcess } from '@/api/business/p2'
 import dialogOutsourceDetails from "./DialogOutsourceDetails";
 import dialogSuppliers from "./DialogSuppliers";
+import useSettingsStore from "@/store/modules/settings";
+const dataSource = useSettingsStore().dataSource;
 const emit = defineEmits(["handleSaveSuccess"]);
 const { proxy } = getCurrentInstance();
 /** 表单抽屉 页变量 */
@@ -639,9 +641,13 @@ function handleSetAuditStatus() {
 }
 
 function getP2NeedCheck() {
+  if(!dataSource){
   getP2NeedCheckProcess("Y").then(res => {
     processList.value = res.rows.map(v => v.prcode.trim())
   })
+}else{
+  console.log("切换数据源")
+}
 }
 /** 暴露给父组件的方法 */
 defineExpose({

+ 10 - 0
src/views/business/returnTurnover/index.vue

@@ -127,6 +127,8 @@ import { getP2NeedCheckProcess } from '@/api/business/p2'
 import dialogReturnTurnover from './DialogReturnTurnover.vue';
 import DialogReturnTurnoverBatch from './DialogReturnTurnoverBatch.vue';
 import { isTakeStock } from "@/api/business/takeStockPeriod.js"
+import useSettingsStore from "@/store/modules/settings";
+const dataSource = useSettingsStore().dataSource;
 const { proxy } = getCurrentInstance()
 const dataList = ref([])
 const loading = ref(false)
@@ -205,6 +207,7 @@ function handleShowTurnoverDialog(row) {
 	}else{
 	//判断该批次的工序是否需要审核
 	// /* 
+	if(!dataSource){
 	getP2NeedCheckProcess("Y").then(res => {
 		if (res.code == 200) {
 			//需要序检的工序
@@ -246,6 +249,9 @@ function handleShowTurnoverDialog(row) {
 			}
 		}
 	})
+}else{
+	console.log("切换数据源")
+}
 }
 	// */
 
@@ -311,6 +317,7 @@ async function handleBatchTurnover() {
 		return
 	}
 	// /* 
+	if(!dataSource){
 	getP2NeedCheckProcess("Y").then(res => {
 		if (res.code == 200) {
 			//需要序检的工序
@@ -368,6 +375,9 @@ async function handleBatchTurnover() {
 			}
 		}
 	})
+}else{
+	console.log("切换数据源")
+}
 	// */
 
 	// proxy.$refs.dialogReturnTurnoverBatchRef.openBatch(selections.value)

+ 6 - 0
src/views/business/reviseBath/index.vue

@@ -80,6 +80,8 @@ import productionDialog from "./DialogProduction";
 import { ref } from "vue";
 import router from "@/router";
 import queryStore from "@/store/modules/query";
+import useSettingsStore from "@/store/modules/settings";
+const dataSource = useSettingsStore().dataSource;
 const { proxy } = getCurrentInstance();
 /** 字典数组区 */
 /** 查询 对象 */
@@ -114,6 +116,7 @@ function getList() {
   if (listQueryParams != null) {
     queryParams.value = listQueryParams;
   }
+  if(!dataSource){
   getP2Plan(queryParams.value).then((res) => {
     productionPlanList.value = res.rows;
     total.value = res.total;
@@ -121,6 +124,9 @@ function getList() {
     queryParams.value.pullP2PlanDetails = false;
     // console.log(productionPlanList.value[0])
   });
+}else{
+  console.log("切换数据源")
+}
 }
 /** 打开计划查询页 */
 function handleColumnClick(row) {

+ 13 - 0
src/views/business/reviseBath/lotFormParticulars.vue

@@ -18,6 +18,9 @@
           }}</el-tag>
           <el-tag v-if="lot.isWasteRecycling == 1" class="spacing" type="primary">{{ "废品回用" }}</el-tag>
         </el-form-item>
+        <el-form-item>
+          <el-button type="primary" @click="handleViewCheckInfo">查看检查信息</el-button>
+        </el-form-item>
       </el-row>
 
       <el-row :gutter="24" style="margin-top: 10px">
@@ -270,6 +273,7 @@ const processList = ref([]); //工序列表
 const permissions = useUserStore().permissions;
 const all_permission = "*:*:*";
 const route = useRoute();
+const router = useRouter();
 const inBatchesDialogRef = ref(null);
 const statusMap = {
   0: { type: "info", text: "未开始" },
@@ -286,6 +290,15 @@ const lot = ref({
 }); //批次信息
 
 /****************************  方法区  ****************************/
+/**
+ * 查看检查信息
+ */
+const handleViewCheckInfo = () => {
+  router.push({
+    path: "/quality/processInspection",
+    query: { lotCode: route.params.lotCode }
+  })
+}
 /** 单批单改按钮操作 */
 function handleOnceSingleChange() {
   if (lot.value.isWaste == 1) {

+ 8 - 2
src/views/business/specialDaywork/form.vue

@@ -544,12 +544,13 @@ import {
   specialSaveDaywork,
   specialUpdateDaywork,
 } from "@/api/business/specialDaywork";
-import { getFurnaceNoInfo } from "@/api/business/p2";
+import { getFurnaceNoInfo } from "@/api/business/furnaceNoInfo.js";
+import useSettingsStore from "@/store/modules/settings";
 import useUserStore from "@/store/modules/user";
 import { debounce } from "lodash";
 import rejectDialog from "./rejectDialog";
 import processDialog from "./processDialog";
-
+const dataSource = useSettingsStore().dataSource;
 /** 父组件传参 */
 const props = defineProps({
   getList: {
@@ -833,6 +834,7 @@ function getFurnaceInfo(data) {
     }
     daywork.value.furnaceNoInfo = furnaceNoInfo.value;
   } else {
+    if(!dataSource){
     getFurnaceNoInfo({
       productionPlanNo: daywork.value.productionPlanNo,
       lineNumber: daywork.value.lineNumber,
@@ -849,6 +851,10 @@ function getFurnaceInfo(data) {
         daywork.value.furnaceNoInfo = furnaceNumberInfoList.value[0].value;
       }
     });
+  }else{
+  console.log('切换数据源')
+  }
+
   }
 }
 

+ 1 - 1
src/views/business/workshop/index.vue

@@ -74,7 +74,7 @@
         <el-form class="list-search-container" :model="queryDeptParams" ref="queryRef" :inline="true">
           <el-form-item class="section-title" label="周转区" />
           <el-form-item>
-            <el-button v-hasPermi="['business:workshop:add']" type="primary" icon="Plus"
+            <el-button v-hasPermi="['business:workshop:add']" type="primary" icon="Plus"  :disabled="deptList.length == 0"
               @click="handleShowTurnoverFormDialog(null)">新增</el-button>
           </el-form-item>
         </el-form>

+ 4 - 0
src/views/dialog/person.vue

@@ -87,6 +87,7 @@ const { queryParams } = toRefs(data)
  * 对话框打开 事件
  */
 function open(userInfo) {
+  console.log(userInfo)
   //部门管理新增
   if (userInfo.identifying) {
     identifying.value = userInfo.identifying
@@ -97,6 +98,9 @@ function open(userInfo) {
   if (userInfo.userIds) {
     userIds.value = userInfo.userIds
   }
+  if(userInfo.tenantId != null){
+    queryParams.value.tenantId = userInfo.tenantId
+  }
   visible.value = true
   getList()
 }