Selaa lähdekoodia

部分新功能

cz 1 vuosi sitten
vanhempi
commit
8558ee3bba

+ 9 - 2
src/components/headerBar/header-bar.vue

@@ -378,7 +378,7 @@ import "@/components/headerBar/header.scss";
 import notice from "@/components/notice/index";
 import TitleInfoOne from "@/components/TitleInfo/indexOne.vue";
 import Sortable from "sortablejs";
-
+import { tansParams } from "@/utils/ruoyi";
 const router = useRouter();
 const userStore = useUserStore();
 const { proxy } = getCurrentInstance();
@@ -627,7 +627,14 @@ const commonsBannerToRouter = (i) => {
         if (j.children) {
           j.children.map((n) => {
             if (n.menuId === i.menuId) {
-              router.push("/" + item.path + "/" + j.path + "/" + n.path);
+              if (n.query) {
+                let query = tansParams(JSON.parse(n.query));
+                router.push(
+                  "/" + item.path + "/" + j.path + "/" + n.path + "?" + query
+                );
+              } else {
+                router.push("/" + item.path + "/" + j.path + "/" + n.path);
+              }
               isChildMenu.value = false;
             }
           });

+ 9 - 0
src/components/process/SF/Contract.vue

@@ -1411,6 +1411,8 @@ const handleSubmit = async () => {
 };
 
 const getFormData = () => {
+  // 赋值类型
+  formData.data.type = route.query.flowKey == "sample_flow" ? "1" : "0";
   return proxy.deepClone(formData.data);
 };
 // 向父组件暴露
@@ -1731,6 +1733,13 @@ onMounted(() => {
   } else if (route.query && route.query.businessId && route.query.processType) {
     let businessId = route.query.businessId;
     getAllData(businessId);
+  } else if (
+    route.query &&
+    route.query.businessId &&
+    !route.query.processType
+  ) {
+    let businessId = route.query.businessId;
+    getAllData(businessId);
   }
 });
 

+ 167 - 1
src/views/EHSD/procurement/purchasedEHSD/index.vue

@@ -41,12 +41,58 @@
         <el-button type="primary" @click="exportExcel()" size="default">导出Excel</el-button>
       </template> -->
     </el-dialog>
+
+    <el-dialog title="到货登记" v-model="arrivalDialog" width="70%" destroy-on-close>
+      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="formDom" v-loading="submitLoading">
+        <template #details>
+          <div style="width:100%;padding:0 15px">
+            <el-table :data="formData.data.purchaseProductList">
+              <el-table-column label="商品图片" width="80">
+                <template #default="{ row }">
+                  <div v-if="row.fileUrl">
+                    <img :src="row.fileUrl" class="pic" @click="openImg(row.fileUrl)" />
+                  </div>
+                </template>
+              </el-table-column>
+              <el-table-column prop="productCode" label="商品编码" width="160" />
+              <el-table-column prop="productName" label="商品名称" min-width="130" />
+              <el-table-column label="尺寸 (cm)" width="140">
+                <template #default="{ row, $index }">
+                  <div style="width: 100%">
+                    {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}
+                  </div>
+                </template>
+              </el-table-column>
+              <el-table-column label="采购数量" prop="quantity" width="100" />
+              <el-table-column label="已到货数量" prop="quantity" width="100" />
+              <el-table-column prop="contractMoney" label="到货数量" width="130">
+                <template #default="{ row, $index }">
+                  <el-form-item :prop="'purchaseProductList.' + $index + '.contractMoney'" :rules="rules.contractMoney" :inline-message="true"
+                                class="margin-b-0">
+                    <el-input-number onmousewheel="return false;" v-model="row.contractMoney" placeholder="请输入" style="width: 100%" :precision="0"
+                                     :controls="false" :min="0" />
+                  </el-form-item>
+                </template>
+              </el-table-column>
+            </el-table>
+          </div>
+        </template>
+      </byForm>
+      <template #footer>
+        <el-button @click="arrivalDialog = false" size="defualt" v-debounce>取 消</el-button>
+        <el-button type="primary" @click="submitForm()" size="defualt" v-debounce>
+          确 定
+        </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";
 import { ElMessage, ElMessageBox } from "element-plus";
 import PurchasePDF from "@/components/PDF/purchasePDF.vue";
 // import PurchasePDFOne from "@/components/PDF/purchasePDFOne.vue";
@@ -213,7 +259,7 @@ const config = computed(() => {
     {
       attrs: {
         label: "操作",
-        width: 160,
+        width: 200,
         align: "right",
         fixed: "right",
       },
@@ -233,6 +279,19 @@ const config = computed(() => {
                     },
                   }
                 : {},
+              row.status == 30
+                ? {
+                    attrs: {
+                      label: "到货登记",
+                      type: "primary",
+                      text: true,
+                    },
+                    el: "button",
+                    click() {
+                      handleArrival(row);
+                    },
+                  }
+                : {},
               {
                 attrs: {
                   label: "打印",
@@ -433,6 +492,113 @@ const handleChange = (row) => {
   });
 };
 
+const formData = reactive({
+  data: {},
+});
+const formOption = reactive({
+  inline: true,
+  labelWidth: 110,
+  itemWidth: 100,
+  rules: [],
+});
+const formConfig = computed(() => {
+  return [
+    {
+      type: "title1",
+      title: "基本信息",
+    },
+    {
+      type: "input",
+      prop: "code",
+      label: "采购单号",
+      itemWidth: 50,
+      disabled: true,
+    },
+    {
+      type: "input",
+      prop: "sellCorporationName",
+      label: "供应商",
+      itemWidth: 50,
+      disabled: true,
+    },
+    {
+      type: "date",
+      prop: "aa",
+      label: "到货日期",
+      itemType: "date",
+      itemWidth: 50,
+    },
+    {
+      type: "title1",
+      title: "到货明细",
+    },
+    {
+      type: "slot",
+      slotName: "details",
+      label: "",
+    },
+  ];
+});
+const rules = ref({
+  productSn: [{ required: true, message: "请输入商品Sn", trigger: "blur" }],
+  type: [{ required: true, message: "请选择售后类型", trigger: "change" }],
+  remark: [{ required: true, message: "请输入售后说明", trigger: "blur" }],
+  contactName: [
+    { required: true, message: "请输入客户联系人", trigger: "blur" },
+  ],
+  contactInfo: [
+    { required: true, message: "请输入客户联系方式", trigger: "blur" },
+  ],
+  afterSalesPersonId: [
+    { required: true, message: "请选择售后人员", trigger: "change" },
+  ],
+  quantity: [{ required: true, message: "请输入数量", trigger: "blur" }],
+});
+
+const formDom = ref(null);
+const arrivalDialog = ref(false);
+const handleArrival = (row) => {
+  proxy.post("/ehsdPurchase/detail", { id: row.id }).then((res) => {
+    formData.data = res;
+    if (
+      formData.data.purchaseProductList &&
+      formData.data.purchaseProductList.length > 0
+    ) {
+      let productIds = formData.data.purchaseProductList.map(
+        (x) => x.productId
+      );
+      proxy.getFileData({
+        businessIdList: productIds,
+        data: formData.data.purchaseProductList,
+        att: "productId",
+        businessType: "0",
+        fileAtt: "fileList",
+        filePathAtt: "fileUrl",
+      });
+    }
+  });
+  arrivalDialog.value = true;
+};
+const submitForm = () => {
+  formDom.value.handleSubmit(() => {
+    submitLoading.value = true;
+    proxy.post("/afterSalesRecord/add", formData.data).then(
+      (res) => {
+        ElMessage({
+          message: "操作成功",
+          type: "success",
+        });
+        dialogVisible.value = false;
+        submitLoading.value = false;
+        getList();
+      },
+      (err) => {
+        submitLoading.value = false;
+      }
+    );
+  });
+};
+
 const PdfDom = ref(null);
 const exportExcel = () => {
   PdfDom.value.exportExcel();

+ 19 - 12
src/views/EHSD/productLibrary/companyProduct/index.vue

@@ -31,9 +31,9 @@
         </template>
         <template #size="{ item }">
           <div v-if="item['length'] && item.width && item.height">
-            <span>{{ item['length'] }}cm</span>*
-            <span>{{ item.width }}cm</span>*
-            <span>{{ item.height }}cm</span>
+            <span>{{ item['length'] }}</span>*
+            <span>{{ item.width }}</span>*
+            <span>{{ item.height }}</span>
           </div>
           <div v-else></div>
         </template>
@@ -283,9 +283,16 @@ const config = computed(() => {
     // },
     {
       attrs: {
-        label: "尺寸",
+        label: "尺寸 (cm)",
         slot: "size",
-        width: 180,
+        width: 130,
+      },
+    },
+    {
+      attrs: {
+        label: "颜色",
+        prop: "color",
+        width: 100,
       },
     },
     {
@@ -504,13 +511,13 @@ const formConfig = computed(() => {
       filterable: true,
       disabled: false,
     },
-    {
-      type: "input",
-      prop: "spec",
-      label: "规格型号",
-      itemWidth: 50,
-      disabled: false,
-    },
+    // {
+    //   type: "input",
+    //   prop: "spec",
+    //   label: "规格型号",
+    //   itemWidth: 50,
+    //   disabled: false,
+    // },
     {
       type: "input",
       prop: "color",

+ 64 - 31
src/views/EHSD/saleContract/contractEHSD/index.vue

@@ -4,7 +4,7 @@
       <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" :selectConfig="selectConfig"
                :statConfig="statConfig" :onMoreSearch="false" @moreSearch="clickMoreSearch" highlight-current-row :action-list="[
           {
-            text: '新建销售合同',
+            text: '新建',
             action: () => newContract(),
           },
         ]" @get-list="getList">
@@ -67,13 +67,25 @@
         </template>
 
         <template #prodTag="{ item }">
-          <div style="width: 100%">
-            <el-icon :size="16" style="cursor:pointer;margin-right: 5px;position:relative;top:5px" color="#409EFF" @click="handleEditTag(item)">
+          <div style="width: 100%;display:flex;align-items:center">
+            <el-icon :size="16" style="cursor:pointer;margin-right: 8px;position:relative;top:5px" color="#409EFF" @click="handleEditTag(item)">
               <Edit />
-            </el-icon> <el-tag style="margin-right: 8px" type="success" v-for="(tag, index) in item.prodTags" closable :key="index"
-                    @close="prodTagClose(index, item)">
-              {{ dictKeyValue(tag, contractTag) }}
-            </el-tag>
+            </el-icon>
+            <el-popover placement="top-start" :width="300" trigger="hover">
+              <div>
+                aabeizhu
+              </div>
+              <template #reference>
+                <div style="width:100%;display:inline-block">
+                  <el-tag style="margin-right: 8px" type="success" v-for="(tag, index) in item.prodTags" closable :key="index"
+                          @close="prodTagClose(index, item)">
+                    {{ dictKeyValue(tag, contractTag) }}
+                  </el-tag>
+                </div>
+
+              </template>
+            </el-popover>
+
           </div>
         </template>
 
@@ -251,7 +263,6 @@ import ContractPDFOneNew from "@/components/PDF/contractPDFOneNew.vue";
 import $bus from "@/bus/index.js";
 import moment from "moment";
 const route = useRoute();
-
 const contractTag = computed(
   () => proxy.useUserStore().allDict["contract_prod_tag"]
 );
@@ -605,17 +616,19 @@ const config = computed(() => {
                 },
               }
             : {},
-          // {
-          //   attrs: {
-          //     label: "交接单",
-          //     type: "primary",
-          //     text: true,
-          //   },
-          //   el: "button",
-          //   click() {
-          //     clickHandoverSlip(row);
-          //   },
-          // },
+          route.query.pageType == "1"
+            ? {
+                attrs: {
+                  label: "转销售订单",
+                  type: "primary",
+                  text: true,
+                },
+                el: "button",
+                click() {
+                  trunContract(row);
+                },
+              }
+            : {},
           row.status == 30
             ? {
                 attrs: {
@@ -847,11 +860,12 @@ if (route.query.code) {
 }
 getList();
 const newContract = () => {
+  let flowKey = route.query.pageType == "1" ? "sample_flow" : "contract_flow";
   proxy.$router.replace({
     path: "/platform_manage/process/processApproval",
     query: {
-      flowKey: "contract_flow",
-      flowName: "销售合同审批流程",
+      flowKey: flowKey,
+      flowName: "订单流程",
       random: proxy.random(),
     },
   });
@@ -1123,11 +1137,13 @@ const printObj = ref({
 });
 
 const clickAlteration = (row) => {
+  let flowKey =
+    route.query.pageType == "1" ? "sample_update_flow" : "contract_update_flow";
   proxy.$router.push({
     path: "/platform_manage/process/processApproval",
     query: {
-      flowKey: "contract_update_flow",
-      flowName: "销售合同变更流程",
+      flowKey: flowKey,
+      flowName: "订单变更流程",
       random: proxy.random(),
       businessId: row.id,
     },
@@ -1325,14 +1341,6 @@ const moreSearchReset = () => {
 const productionFormDom = ref(null);
 const productionDialog = ref(false);
 const productionFormConfig = computed(() => [
-  // {
-  //   type: "slot",
-  //   slotName: "companyName",
-  //   label: "报价子公司:",
-  //   prop: "companyName",
-  //   itemWidth: 100,
-  //   isShow: formData.data.companyName ? true : false,
-  // },
   {
     type: "treeSelect",
     prop: "produceCompanyId",
@@ -1344,6 +1352,13 @@ const productionFormConfig = computed(() => [
     disabled: true,
   },
   {
+    type: "input",
+    label: "驳回原因",
+    prop: "aa",
+    itemWidth: 100,
+    isShow: formData.data.companyName ? true : false,
+  },
+  {
     type: "date",
     itemType: "datetime",
     label: "交期",
@@ -1403,6 +1418,13 @@ const tagFormConfig = computed(() => [
     data: contractTag.value,
     itemWidth: 100,
   },
+  {
+    type: "input",
+    prop: "aa",
+    itemType: "textarea",
+    label: "备注",
+    itemWidth: 100,
+  },
 ]);
 const tagRules = ref({
   prodTag: [{ required: true, message: "请选择生产指示", trigger: "change" }],
@@ -1451,6 +1473,17 @@ onBeforeUnmount(() => {
   // 取消订阅特定事件
   $bus.off("refreshTableData");
 });
+const trunContract = (row) => {
+  proxy.$router.replace({
+    path: "/platform_manage/process/processApproval",
+    query: {
+      flowKey: "contract_flow",
+      flowName: "转销售订单",
+      random: proxy.random(),
+      businessId: row.id,
+    },
+  });
+};
 </script>
 
 <style lang="scss" scoped>

+ 73 - 14
src/views/MES/productionOrder/index.vue

@@ -132,6 +132,17 @@
       </template>
     </el-dialog>
 
+    <el-dialog :title="'确认交期'" v-model="confirmDialog" width="500px" destroy-on-close>
+      <byForm :formConfig="confirmFormConfig" :formOption="confirmFormOption" v-model="formData.dataOne" :rules="confirmRules" ref="confirmDom"
+              v-loading="formLoading">
+      </byForm>
+      <template #footer>
+        <el-button @click="confirmDialog =false" size="default" v-debounce>取 消</el-button>
+        <el-button @click="submitConfirm(true)" type="danger" size="default" v-debounce>驳 回</el-button>
+        <el-button @click="submitConfirm(false)" type="primary" size="default" v-debounce>提 交</el-button>
+      </template>
+    </el-dialog>
+
     <el-dialog :title="'订单详情'" v-model="dialogVisible" width="90%" destroy-on-close>
       <byForm :formConfig="formConfig" :formOption="formOptionOne" v-model="formData.orderData" ref="formDom">
         <template #commodity>
@@ -427,22 +438,22 @@ const config = computed(() => {
                 },
                 el: "button",
                 click() {
-                  // proxy
-                  //   .msgConfirm()
-                  //   .then((res) => {
-                  //     proxy
-                  //       .post("/produceOrder/putProduction", {
-                  //         id: row.id,
-                  //       })
-                  //       .then((res) => {
-                  //         proxy.msgTip("操作成功", 1);
-                  //         getList();
-                  //       });
-                  //   })
-                  //   .catch((err) => {});
                   clickDistributeProduction(row);
                 },
               },
+          row.produceTime || !proxy.isCurrentCompanyData(row.companyId)
+            ? {}
+            : {
+                attrs: {
+                  label: "确认交期",
+                  type: "primary",
+                  text: true,
+                },
+                el: "button",
+                click() {
+                  confirmDeliveryTime(row);
+                },
+              },
         ];
       },
     },
@@ -451,6 +462,7 @@ const config = computed(() => {
 const formData = reactive({
   data: {},
   orderData: {},
+  dataOne: {},
 });
 
 const formOption = reactive({
@@ -740,7 +752,6 @@ const judgeDay = (day) => {
 const showData = ref([]);
 const onShow = (day) => {
   let rows = judgeDay(day);
-  console.log(rows, colorData, "sss");
   showData.value = rows;
 };
 
@@ -899,6 +910,54 @@ const handleClickUpload = async (att, flag, index) => {
 const onPicture = (path) => {
   window.open(path, "_blank");
 };
+
+const confirmFormDom = ref(null);
+const confirmDialog = ref(false);
+const confirmFormOption = reactive({
+  inline: true,
+  labelWidth: 100,
+  itemWidth: 100,
+  disabled: false,
+});
+const confirmFormConfig = computed(() => [
+  {
+    type: "input",
+    itemType: "textarea",
+    label: "退回原因",
+    prop: "aa",
+    // placeholder: "合同开始时间",
+    itemWidth: 100,
+    // clearable: true,
+    // disabledFn: (date) => {
+    //   return moment(date).isBefore(moment());
+    // },
+  },
+]);
+const confirmRules = ref({});
+const confirmDeliveryTime = (row) => {
+  formData.dataOne = {
+    id: row.id,
+    aa: "",
+  };
+
+  confirmDialog.value = true;
+};
+
+const submitConfirm = () => {
+  confirmFormDom.value.handleSubmit(() => {
+    if (!formData.dataOne.aa) {
+      return proxy.msgTip("请填写退回原因", 2);
+    }
+    formLoading.value = true;
+    proxy.post("/produceOrder/putProduction", formData.data).then((res) => {
+      proxy.msgTip("操作成功");
+      formLoading.value = false;
+      confirmDialog.value = false;
+      getList();
+      getRightData();
+    });
+  });
+};
 </script>
 
 <style lang="scss" scoped>

+ 57 - 1
src/views/MES/productionTask/index.vue

@@ -14,6 +14,12 @@
        'select-all':selectRow
         }" @get-list="getList">
 
+        <template #orderCode="{ item }">
+          <div style="width: 100%" class="el-click" @click="lookDetails(item)">
+            {{item.orderCode}}
+          </div>
+        </template>
+
         <template #pic="{ item }">
           <div v-if="item.fileList &&item.fileList.length > 0">
             <img :src="item.fileList[0].fileUrl" class="pic" @click="handleClickFile(item.fileList[0])" />
@@ -232,6 +238,24 @@
         </el-button>
       </template>
     </el-dialog>
+
+    <el-dialog title="记录查看" v-model="recordDialog" width="70%" destroy-on-close v-if="recordDialog">
+      <byForm :formConfig="recordFormConfig" :formOption="recordFormOption" v-model="formData.recordData">
+        <template #detail1>
+          <div style="width:100%">
+            a
+          </div>
+        </template>
+        <template #detail2>
+          <div style="width:100%">
+            b
+          </div>
+        </template>
+      </byForm>
+      <template #footer>
+        <el-button @click="recordDialog = false" size="defualt" v-debounce>关闭</el-button>
+      </template>
+    </el-dialog>
   </div>
 </template>
 
@@ -343,7 +367,7 @@ const config = ref([
   {
     attrs: {
       label: "订单号",
-      prop: "orderCode",
+      slot: "orderCode",
       width: 130,
     },
   },
@@ -459,6 +483,7 @@ const config = ref([
 ]);
 const formData = reactive({
   data: {},
+  recordData: {},
 });
 const formOption = reactive({
   inline: true,
@@ -763,6 +788,37 @@ const openRemark = (row) => {
   };
   remarkDialog.value = true;
 };
+const recordDialog = ref(false);
+const recordFormOption = reactive({
+  inline: true,
+  labelWidth: 40,
+  itemWidth: 100,
+});
+const recordFormConfig = computed(() => {
+  return [
+    {
+      type: "title1",
+      title: "采购记录",
+    },
+    {
+      type: "slot",
+      slotName: "detail1",
+      label: " ",
+    },
+    {
+      type: "title1",
+      title: "出入库流水记录",
+    },
+    {
+      type: "slot",
+      slotName: "detail2",
+      label: " ",
+    },
+  ];
+});
+const lookDetails = (item) => {
+  recordDialog.value = true;
+};
 </script>
 
 <style lang="scss" scoped>

+ 1 - 1
src/views/index.vue

@@ -431,7 +431,7 @@ const getData = () => {
     .post("/sale/accountRunningWater/page", {
       pageNum: 1,
       pageSize: 5,
-      isClaim: "0",
+      isClaim: "0,1",
       dataType: "1",
     })
     .then((res) => {

+ 6 - 118
src/views/process/processApproval/index.vue

@@ -13,10 +13,12 @@
         </template>
 
         <!-- 销售合同 -->
-        <Contract ref="makeDom" :queryData="queryData.data" v-else-if="flowForm.flowKey == 'contract_flow'"></Contract>
+        <Contract ref="makeDom" :queryData="queryData.data" v-else-if="flowForm.flowKey == 'contract_flow' || flowForm.flowKey == 'sample_flow'">
+        </Contract>
 
         <!-- 销售合同变更 -->
-        <ContractChange ref="makeDom" :queryData="queryData.data" v-else-if="flowForm.flowKey == 'contract_update_flow'"></ContractChange>
+        <ContractChange ref="makeDom" :queryData="queryData.data"
+                        v-else-if="flowForm.flowKey == 'contract_update_flow' || flowForm.flowKey == 'sample_update_flow' "></ContractChange>
 
         <!-- 申购 -->
         <Subscribe ref="makeDom" :queryData="queryData.data" v-else-if="flowForm.flowKey == 'subscribe_flow'"></Subscribe>
@@ -251,122 +253,6 @@ const handleSubmit = async (_type) => {
         btnLoading.value = true;
         if (valid) {
           const data = { ...makeDom.value.getFormData() };
-          if (flowForm.flowKey == "subscribe_flow") {
-          } else if (flowForm.flowKey == "account_request_funds_flow") {
-          } else if (flowForm.flowKey == "sale_quotation_flow") {
-          } else if (flowForm.flowKey == "contract_flow") {
-          } else if (flowForm.flowKey == "contract_update_flow") {
-            data.dataJson = JSON.stringify(proxy.deepClone(data));
-            if (data.fileList && data.fileList.length > 0) {
-              data.fileList = data.fileList.map((item) => {
-                return {
-                  id: item.raw.id,
-                  fileName: item.raw.fileName,
-                  fileUrl: item.raw.fileUrl,
-                };
-              });
-            } else {
-              data.fileList = [];
-            }
-            if (data.packageFileList && data.packageFileList.length > 0) {
-              data.packageFileList = data.packageFileList.map((item) => {
-                return {
-                  id: item.raw.id,
-                  fileName: item.raw.fileName,
-                  fileUrl: item.raw.fileUrl,
-                };
-              });
-            } else {
-              data.packageFileList = [];
-            }
-            data.ehsdJson = JSON.stringify({
-              deliveryTime: data.deliveryTime,
-            });
-            data.contractProductList = data.contractProductList.map((item) => {
-              let ehsdJson = JSON.stringify({
-                packMethod: item.packMethod,
-                tradeMethods: item.tradeMethods,
-              });
-              return {
-                ...item,
-                ehsdJson: ehsdJson,
-              };
-            });
-          } else if (flowForm.flowKey == "sample_flow") {
-            data.dataJson = JSON.stringify(proxy.deepClone(data));
-            if (data.fileList && data.fileList.length > 0) {
-              data.fileList = data.fileList.map((item) => {
-                return {
-                  id: item.raw.id,
-                  fileName: item.raw.fileName,
-                  fileUrl: item.raw.fileUrl,
-                };
-              });
-            } else {
-              data.fileList = [];
-            }
-            if (data.packageFileList && data.packageFileList.length > 0) {
-              data.packageFileList = data.packageFileList.map((item) => {
-                return {
-                  id: item.raw.id,
-                  fileName: item.raw.fileName,
-                  fileUrl: item.raw.fileUrl,
-                };
-              });
-            } else {
-              data.packageFileList = [];
-            }
-            data.ehsdJson = JSON.stringify({
-              deliveryTime: data.deliveryTime,
-            });
-            data.sampleProductList = data.sampleProductList.map((item) => {
-              let ehsdJson = JSON.stringify({
-                packMethod: item.packMethod,
-                tradeMethods: item.tradeMethods,
-              });
-              return {
-                ...item,
-                ehsdJson: ehsdJson,
-              };
-            });
-          } else if (flowForm.flowKey == "sample_update_flow") {
-            data.dataJson = JSON.stringify(proxy.deepClone(data));
-            if (data.fileList && data.fileList.length > 0) {
-              data.fileList = data.fileList.map((item) => {
-                return {
-                  id: item.raw.id,
-                  fileName: item.raw.fileName,
-                  fileUrl: item.raw.fileUrl,
-                };
-              });
-            } else {
-              data.fileList = [];
-            }
-            if (data.packageFileList && data.packageFileList.length > 0) {
-              data.packageFileList = data.packageFileList.map((item) => {
-                return {
-                  id: item.raw.id,
-                  fileName: item.raw.fileName,
-                  fileUrl: item.raw.fileUrl,
-                };
-              });
-            } else {
-              data.packageFileList = [];
-            }
-            data.ehsdJson = JSON.stringify({
-              deliveryTime: data.deliveryTime,
-            });
-            data.sampleProductList = data.sampleProductList.map((item) => {
-              let ehsdJson = JSON.stringify({
-                packMethod: item.packMethod,
-                tradeMethods: item.tradeMethods,
-              });
-              return {
-                ...item,
-                ehsdJson: ehsdJson,
-              };
-            });
-          }
           flowForm.fileList = flowForm.fileList.map((item) => {
             return {
               ...item,
@@ -429,6 +315,8 @@ const skipPage = () => {
     subscribe_flow: "Subscribe",
     contract_flow: "Contract",
     contract_update_flow: "Contract",
+    sample_flow: "ContractSample",
+    sample_update_flow: "ContractSample",
     sale_quotation_flow: "Quotation",
     purchase_update_flow: "Purchased",
     purchase_flow: "Purchase",

+ 100 - 15
src/views/product/material/index.vue

@@ -27,9 +27,9 @@
         </template>
         <template #size="{ item }">
           <div v-if="item['length'] && item.width && item.height">
-            <span>{{ item['length'] }}cm</span>*
-            <span>{{ item.width }}cm</span>*
-            <span>{{ item.height }}cm</span>
+            <span>{{ item['length'] }}</span>*
+            <span>{{ item.width }}</span>*
+            <span>{{ item.height }}</span>
           </div>
           <div v-else></div>
         </template>
@@ -88,9 +88,10 @@
       </template>
     </el-dialog>
 
-    <el-dialog :title="'关联产品'+`  (${associationProductData.length})`" v-model="openAssociationProduct" width="70%" destroy-on-close>
-      <div style="padding: 0 15px" class="public_height_dialog">
-        <el-table :data="associationProductData" style="width: 100%;">
+    <el-dialog :title="'关联产品'+`  (${associationData.pagination.total})`" v-model="openAssociationProduct" width="70%" destroy-on-close>
+      <div>
+        <!-- class="public_height_dialog" -->
+        <!-- <el-table :data="associationProductData" style="width: 100%;">
           <el-table-column label="产品图片" width="80">
             <template #default="{ row }">
               <div v-if="row.fileUrl">
@@ -108,7 +109,27 @@
             </template>
           </el-table-column>
           <el-table-column prop="color" label="颜色" width="150" />
-        </el-table>
+        </el-table> -->
+        <byTable :source="associationData.data" :pagination="associationData.pagination" :config="associationConfig" :loading="loading"
+                 highlight-current-row :selectConfig="[]" :action-list="[]" @get-list="getAssociationList">
+
+          <template #pic="{ item }">
+            <div v-if="item.fileUrl">
+              <img :src="item.fileUrl" class="pic" @click="openImg(item.fileUrl)" />
+            </div>
+            <div v-else></div>
+          </template>
+
+          <template #size="{ item }">
+            <div v-if="item['length'] && item.width && item.height">
+              <span>{{ item['length'] }}</span>*
+              <span>{{ item.width }}</span>*
+              <span>{{ item.height }}</span>
+            </div>
+            <div v-else></div>
+          </template>
+
+        </byTable>
       </div>
       <template #footer>
         <el-button @click="openAssociationProduct = false" size="defualt" v-debounce>关 闭</el-button>
@@ -241,7 +262,7 @@ const config = computed(() => {
       attrs: {
         label: "尺寸",
         slot: "size",
-        width: 180,
+        width: 130,
       },
     },
     {
@@ -595,19 +616,72 @@ const handleClickFile = (file) => {
 getTreeList();
 getList();
 
+const associationConfig = computed(() => {
+  return [
+    {
+      attrs: {
+        label: "产品图片",
+        slot: "pic",
+        align: "center",
+        width: 80,
+      },
+    },
+    {
+      attrs: {
+        label: "产品编码",
+        prop: "customCode",
+        width: 190,
+      },
+    },
+    {
+      attrs: {
+        label: "产品名称",
+        prop: "name",
+        "min-width": 300,
+      },
+    },
+    {
+      attrs: {
+        label: "尺寸",
+        slot: "size",
+        width: 130,
+      },
+    },
+    {
+      attrs: {
+        label: "产品颜色",
+        prop: "color",
+        width: 140,
+      },
+    },
+  ];
+});
+const associationData = ref({
+  data: [],
+  pagination: {
+    pageNum: 1,
+    pageSize: 10,
+    total: 3,
+  },
+});
 const openAssociationProduct = ref(false);
-const associationProductData = ref([]);
-const getAssociationProduct = (row) => {
-  openAssociationProduct.value = true;
+const getAssociationList = (req) => {
+  associationData.value.pagination = {
+    ...associationData.value.pagination,
+    ...req,
+  };
   proxy
-    .post("/productInfo/getProductByMaterialId", { materialId: row.id })
+    .post(
+      "/productInfo/getProductByMaterialId",
+      associationData.value.pagination
+    )
     .then((res) => {
-      associationProductData.value = res;
-      let productIds = associationProductData.value.map((x) => x.id);
+      associationData.value.data = res;
+      let productIds = associationData.value.data.map((x) => x.id);
       if (productIds && productIds.length > 0) {
         proxy.getFileData({
           businessIdList: productIds,
-          data: associationProductData.value,
+          data: associationData.value.data,
           att: "id",
           businessType: "0",
           fileAtt: "fileList",
@@ -616,6 +690,17 @@ const getAssociationProduct = (row) => {
       }
     });
 };
+
+const getAssociationProduct = (row) => {
+  openAssociationProduct.value = true;
+  associationData.value.pagination = {
+    pageNum: 1,
+    pageSize: 10,
+    total: 3,
+    materialId: row.id,
+  };
+  getAssociationList();
+};
 </script>
 
 <style lang="scss" scoped>

+ 338 - 0
src/views/production/project/moldManage/index.vue

@@ -0,0 +1,338 @@
+<template>
+  <div class="pageIndexClass">
+    <div>
+      <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row
+               :selectConfig="selectConfig" :table-events="{
+        }" :action-list="[
+          {
+            text: '添加模具',
+            action: () => openModal('add'),
+          },
+        ]" @get-list="getList">
+        <template #fileSlot="{ item }">
+          <div style="cursor: pointer; color: #409eff" @click="handleClickFile(item)">
+            {{ item.fileName }}
+          </div>
+        </template>
+      </byTable>
+    </div>
+    <el-dialog :title="modalType == 'add' ? '添加模具' : '编辑模具'" v-model="dialogVisible" width="800">
+      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="byform" v-loading="submitLoading">
+      </byForm>
+      <template #footer>
+        <el-button @click="dialogVisible = false" size="default" v-debounce>取 消</el-button>
+        <el-button type="primary" @click="submitForm" size="default" v-debounce>
+          确 定
+        </el-button>
+      </template>
+    </el-dialog>
+  </div>
+</template>
+  
+<script setup>
+import { ElMessage, ElMessageBox } from "element-plus";
+import byTable from "@/components/byTable/index";
+import byForm from "@/components/byForm/index";
+import { computed, defineComponent, ref } from "vue";
+import { getToken } from "@/utils/auth";
+
+const uploadFileUrl = ref(import.meta.env.VITE_APP_BASE_API + "/common/upload"); // 上传文件服务器地址
+const headers = ref({ Authorization: "Bearer " + getToken() });
+const uploadData = ref({});
+const loading = ref(false);
+const submitLoading = ref(false);
+const sourceList = ref({
+  data: [],
+  pagination: {
+    total: 3,
+    pageNum: 1,
+    pageSize: 10,
+  },
+});
+let dialogVisible = ref(false);
+let modalType = ref("add");
+let fileList = ref([]);
+let rules = ref({
+  name: [{ required: true, message: "请输入模具名称", trigger: "blur" }],
+  code: [{ required: true, message: "请输入模具编号", trigger: "blur" }],
+});
+const { proxy } = getCurrentInstance();
+const selectConfig = reactive([
+  // {
+  //   label: "车间类型",
+  //   prop: "type",
+  //   data: [
+  //     {
+  //       label: "普通车间",
+  //       value: "1",
+  //     },
+  //     {
+  //       label: "半自动化车间",
+  //       value: "2",
+  //     },
+  //     {
+  //       label: "自动化车间",
+  //       value: "3",
+  //     },
+  //   ],
+  // },
+]);
+const config = computed(() => {
+  return [
+    {
+      attrs: {
+        label: "模具名称",
+        prop: "name",
+      },
+    },
+
+    {
+      attrs: {
+        label: "长",
+        prop: "name",
+      },
+    },
+    {
+      attrs: {
+        label: "宽",
+        prop: "name",
+      },
+    },
+    {
+      attrs: {
+        label: "高",
+        prop: "name",
+      },
+    },
+    {
+      attrs: {
+        label: "备注",
+        prop: "remarks",
+      },
+    },
+
+    {
+      attrs: {
+        label: "操作",
+        width: "120",
+        align: "center",
+      },
+      // 渲染 el-button,一般用在最后一列。
+      renderHTML(row) {
+        return [
+          {
+            attrs: {
+              label: "修改",
+              type: "primary",
+              text: true,
+            },
+            el: "button",
+            click() {
+              getDtl(row);
+            },
+          },
+          {
+            attrs: {
+              label: "删除",
+              type: "danger",
+              text: true,
+            },
+            el: "button",
+            click() {
+              // 弹窗提示是否删除
+              ElMessageBox.confirm(
+                "此操作将永久删除该数据, 是否继续?",
+                "提示",
+                {
+                  confirmButtonText: "确定",
+                  cancelButtonText: "取消",
+                  type: "warning",
+                }
+              ).then(() => {
+                // 删除
+                proxy
+                  .post("/productionProcesses/delete", {
+                    id: row.id,
+                  })
+                  .then((res) => {
+                    ElMessage({
+                      message: "删除成功",
+                      type: "success",
+                    });
+                    getList();
+                  });
+              });
+            },
+          },
+        ];
+      },
+    },
+  ];
+});
+
+let formData = reactive({
+  data: {
+    type: "1",
+  },
+});
+const formOption = reactive({
+  inline: true,
+  labelWidth: 100,
+  itemWidth: 100,
+  rules: [],
+});
+const byform = ref(null);
+const formConfig = computed(() => {
+  return [
+    {
+      type: "input",
+      prop: "name",
+      label: "模具名称",
+      required: true,
+    },
+    {
+      type: "number",
+      prop: "netWeight",
+      label: "长",
+      precision: 2,
+      min: 0,
+      controls: false,
+      itemWidth: 100,
+    },
+    {
+      type: "number",
+      prop: "netWeight",
+      label: "宽",
+      precision: 2,
+      min: 0,
+      controls: false,
+      itemWidth: 100,
+    },
+    {
+      type: "number",
+      prop: "netWeight",
+      label: "高",
+      precision: 2,
+      min: 0,
+      controls: false,
+      itemWidth: 100,
+    },
+    {
+      type: "input",
+      prop: "remarks",
+      label: "备注",
+      itemType: "textarea",
+    },
+  ];
+});
+const getList = async (req) => {
+  sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
+  loading.value = true;
+  proxy
+    .post("/productionProcesses/page", sourceList.value.pagination)
+    .then((message) => {
+      console.log(message);
+      sourceList.value.data = message.rows;
+      sourceList.value.pagination.total = message.total;
+      setTimeout(() => {
+        loading.value = false;
+      }, 200);
+    });
+};
+const openModal = () => {
+  dialogVisible.value = true;
+  modalType.value = "add";
+  formData.data = {};
+  fileList.value = [];
+};
+
+const submitForm = () => {
+  byform.value.handleSubmit((valid) => {
+    formData.data.fileList = fileList.value;
+    submitLoading.value = true;
+    proxy.post("/productionProcesses/" + modalType.value, formData.data).then(
+      (res) => {
+        ElMessage({
+          message: modalType.value == "add" ? "添加成功" : "编辑成功",
+          type: "success",
+        });
+        fileList.value = [];
+        dialogVisible.value = false;
+        submitLoading.value = false;
+        getList();
+      },
+      (err) => {
+        console.log(err, "aswwwww");
+        submitLoading.value = false;
+      }
+    );
+  });
+  // if (fileList.value.length > 0) {
+
+  // } else {
+  //   return ElMessage({
+  //     message: "请上传附件!",
+  //     type: "info",
+  //   });
+  // }
+};
+
+const getDtl = (row) => {
+  modalType.value = "edit";
+  proxy.post("/productionProcesses/detail", { id: row.id }).then((res) => {
+    fileList.value = res.fileName
+      ? [
+          {
+            id: "",
+            fileName: res.fileName,
+            path: "",
+          },
+        ]
+      : [];
+    formData.data = res;
+    dialogVisible.value = true;
+  });
+};
+const handleBeforeUpload = async (file) => {
+  const res = await proxy.post("/fileInfo/getSing", { fileName: file.name });
+  uploadData.value = res.uploadBody;
+  fileList.value = [
+    {
+      id: res.id,
+      fileName: res.fileName,
+      path: res.fileUrl,
+    },
+  ];
+};
+const handleClickFile = (row) => {
+  ElMessage({
+    message: "数据请求中,请稍后!",
+    type: "success",
+  });
+  let id = row.id;
+  proxy.post("/fileInfo/getList", { businessIdList: [id] }).then((res) => {
+    const file = res[id][0];
+    window.open(file.fileUrl, "_blank");
+  });
+};
+
+const handlePreview = (file) => {
+  console.log(file);
+};
+const handleSuccess = (file) => {
+  console.log(file);
+};
+const handleRemove = (file) => {
+  fileList.value = [];
+};
+const handleClose = (index) => {
+  fileList.value.splice(index, 1);
+};
+getList();
+</script>
+  
+<style lang="scss" scoped>
+.tenant {
+  padding: 20px;
+}
+</style>

+ 18 - 0
src/views/production/project/processes/index.vue

@@ -210,6 +210,24 @@ const formConfig = computed(() => {
       required: true,
     },
     {
+      type: "number",
+      prop: "netWeight",
+      label: "成本单价",
+      precision: 2,
+      min: 0,
+      controls: false,
+      itemWidth: 50,
+    },
+    {
+      type: "number",
+      prop: "netWeight",
+      label: "负载量",
+      precision: 0,
+      min: 1,
+      controls: false,
+      itemWidth: 50,
+    },
+    {
       type: "input",
       prop: "remarks",
       label: "工序说明",

+ 27 - 2
src/views/systemTenant/tenant/userTenant/index.vue

@@ -252,6 +252,8 @@ getList();
 const modalType = ref("add");
 const dialogVisible = ref(false);
 const loadingDialog = ref(false);
+const roleData = ref([]);
+const companyData = ref([]);
 const submit = ref(null);
 const formOption = reactive({
   inline: true,
@@ -309,7 +311,7 @@ const formConfig = computed(() => {
       label: "角色",
       prop: "roleIds",
       multiple: true,
-      data: [],
+      data: roleData.value,
     },
     {
       type: "input",
@@ -327,6 +329,13 @@ const formConfig = computed(() => {
       itemWidth: 100,
       itemType: "text",
     },
+    {
+      type: "select",
+      label: "关联公司",
+      prop: "sa",
+      multiple: true,
+      data: companyData.value,
+    },
   ];
 });
 const rules = ref({
@@ -342,7 +351,7 @@ const getUserList = () => {
       `/tenantRole/list?pageNum=1&pageSize=10000&tenantId=${sourceList.value.pagination.tenantId}`
     )
     .then((message) => {
-      formConfig.value[5].data = message.rows.map((item) => {
+      roleData.value = message.rows.map((item) => {
         return {
           ...item,
           id: item.roleId,
@@ -350,6 +359,22 @@ const getUserList = () => {
         };
       });
     });
+
+  proxy
+    .get("/tenantDept/list", {
+      pageNum: 1,
+      pageSize: 9999,
+      keyword: "",
+      tenantId: proxy.useUserStore().user.tenantId,
+      type: 0,
+    })
+    .then((res) => {
+      companyData.value = res.data.map((x) => ({
+        ...x,
+        label: x.deptName,
+        value: x.deptId,
+      }));
+    });
 };
 getUserList();
 const openModal = () => {