Browse Source

采购付款发起修改布局
选择物品组件

cz 1 year ago
parent
commit
36dffecce7

+ 38 - 138
src/components/process/PurchasePayment.vue

@@ -3,7 +3,7 @@
     <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit">
     <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit">
       <template #supplyId>
       <template #supplyId>
         <div style="width: 100%">
         <div style="width: 100%">
-          <el-form-item prop="supplyId" label="供应商">
+          <el-form-item prop="supplyId" label="供应商" class="margin-b-0">
             <el-select v-model="formData.data.supplyId" filterable remote reserve-keyword placeholder="请输入关键字" remote-show-suffix
             <el-select v-model="formData.data.supplyId" filterable remote reserve-keyword placeholder="请输入关键字" remote-show-suffix
                        :remote-method="remoteMethod" :loading="loadingSearch" @input="remoteMethod" style="width: 100%" @change="changeSupply" v-if="
                        :remote-method="remoteMethod" :loading="loadingSearch" @input="remoteMethod" style="width: 100%" @change="changeSupply" v-if="
                 [30].includes(route.query.processType) ||
                 [30].includes(route.query.processType) ||
@@ -16,31 +16,7 @@
           </el-form-item>
           </el-form-item>
         </div>
         </div>
       </template>
       </template>
-      <template #deadline>
-        <div style="width: 100%">
-          <el-date-picker v-model="formData.data.deadline" type="date" placeholder="请选择付款期限" value-format="YYYY-MM-DD" style="width: 100%" />
-        </div>
-      </template>
-      <template #receiptsNum>
-        <div style="width: 100%">
-          <el-input-number onmousewheel="return false;" v-model="formData.data.receiptsNum" placeholder="请输入单据数量" :min="0" :precision="0"
-                           :controls="false" style="width: 100%" />
-        </div>
-      </template>
-      <template #taxRate>
-        <div style="width: 100%">
-          <el-input-number onmousewheel="return false;" v-model="formData.data.taxRate" placeholder="请输入税率" :min="0" :max="100" :precision="2"
-                           :controls="false" style="width: 100%" />
-        </div>
-      </template>
-      <template #fileList>
-        <div style="width: 100%">
-          <el-upload v-model:fileList="fileList" action="https://winfaster.obs.cn-south-1.myhuaweicloud.com" multiple :data="uploadData"
-                     :before-upload="uploadFile" :on-preview="onPreviewFile">
-            <el-button>选择</el-button>
-          </el-upload>
-        </div>
-      </template>
+
       <template #payDetailList>
       <template #payDetailList>
         <div style="width: 100%">
         <div style="width: 100%">
           <el-button type="primary" @click="clickAdd()">添加行</el-button>
           <el-button type="primary" @click="clickAdd()">添加行</el-button>
@@ -48,7 +24,7 @@
             <el-table-column label="采购合同" width="220">
             <el-table-column label="采购合同" width="220">
               <template #default="{ row, $index }">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
                 <div style="width: 100%">
-                  <el-form-item :prop="'payDetailList.' + $index + '.purchaseId'" :rules="rules.purchaseId" :inline-message="true">
+                  <el-form-item :prop="'payDetailList.' + $index + '.purchaseId'" :rules="rules.purchaseId" :inline-message="true" class="margin-b-0">
                     <el-select v-model="row.purchaseId" placeholder="请选择采购合同" filterable style="width: 100%" @change="changePurchaseId(row, true)">
                     <el-select v-model="row.purchaseId" placeholder="请选择采购合同" filterable style="width: 100%" @change="changePurchaseId(row, true)">
                       <el-option v-for="item in contractList" :key="item.value" :label="item.label" :value="item.value" />
                       <el-option v-for="item in contractList" :key="item.value" :label="item.label" :value="item.value" />
                     </el-select>
                     </el-select>
@@ -62,7 +38,7 @@
             <el-table-column label="款项说明">
             <el-table-column label="款项说明">
               <template #default="{ row, $index }">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
                 <div style="width: 100%">
-                  <el-form-item :prop="'payDetailList.' + $index + '.remark'" :rules="rules.remark" :inline-message="true">
+                  <el-form-item :prop="'payDetailList.' + $index + '.remark'" :rules="rules.remark" :inline-message="true" class="margin-b-0">
                     <el-input v-model="row.remark" placeholder="请输入款项说明" style="width: 100%" />
                     <el-input v-model="row.remark" placeholder="请输入款项说明" style="width: 100%" />
                   </el-form-item>
                   </el-form-item>
                 </div>
                 </div>
@@ -71,7 +47,7 @@
             <el-table-column label="付款金额" width="180">
             <el-table-column label="付款金额" width="180">
               <template #default="{ row, $index }">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
                 <div style="width: 100%">
-                  <el-form-item :prop="'payDetailList.' + $index + '.money'" :rules="rules.money" :inline-message="true">
+                  <el-form-item :prop="'payDetailList.' + $index + '.money'" :rules="rules.money" :inline-message="true" class="margin-b-0">
                     <el-input-number onmousewheel="return false;" v-model="row.money" placeholder="请输入金额" style="width: 100%" :precision="2"
                     <el-input-number onmousewheel="return false;" v-model="row.money" placeholder="请输入金额" style="width: 100%" :precision="2"
                                      :controls="false" :min="0" @change="changeMoney()" />
                                      :controls="false" :min="0" @change="changeMoney()" />
                   </el-form-item>
                   </el-form-item>
@@ -97,12 +73,16 @@ import { ElMessage } from "element-plus";
 import useUserStore from "@/store/modules/user";
 import useUserStore from "@/store/modules/user";
 import { useRoute } from "vue-router";
 import { useRoute } from "vue-router";
 import { async } from "@antv/x6/lib/registry/marker/async";
 import { async } from "@antv/x6/lib/registry/marker/async";
-const userInfo = useUserStore();
 const route = useRoute();
 const route = useRoute();
 const { proxy } = getCurrentInstance();
 const { proxy } = getCurrentInstance();
+const invoiceType = computed(
+  () => proxy.useUserStore().allDict["invoice_type"]
+);
+const fundsPaymentMethod = computed(
+  () => proxy.useUserStore().allDict["funds_payment_method"]
+);
+const payMethod = computed(() => proxy.useUserStore().allDict["pay_method"]);
 const supplierList = ref([]);
 const supplierList = ref([]);
-const invoiceType = ref([]);
-const fundsPaymentMethod = ref([]);
 const accountList = ref([]);
 const accountList = ref([]);
 const contractList = ref([]);
 const contractList = ref([]);
 let formData = reactive({
 let formData = reactive({
@@ -112,7 +92,7 @@ let formData = reactive({
     invoiceType: "",
     invoiceType: "",
     remark: "",
     remark: "",
     deadline: "",
     deadline: "",
-    receiptsNum: undefined,
+    receiptsNum: null,
     payType: "",
     payType: "",
     currency: "",
     currency: "",
     accountManagementId: "",
     accountManagementId: "",
@@ -121,7 +101,7 @@ let formData = reactive({
     fileList: [],
     fileList: [],
     advanceCode: "",
     advanceCode: "",
     type: "",
     type: "",
-    taxRate: undefined,
+    taxRate: null,
   },
   },
 });
 });
 const submit = ref(null);
 const submit = ref(null);
@@ -139,12 +119,10 @@ const judgeStatus = () => {
   }
   }
   return false;
   return false;
 };
 };
-const payMethod = ref([]);
 const formOption = reactive({
 const formOption = reactive({
   inline: true,
   inline: true,
   labelWidth: 100,
   labelWidth: 100,
   itemWidth: 100,
   itemWidth: 100,
-  rules: [],
   disabled: false,
   disabled: false,
 });
 });
 const formConfig = computed(() => {
 const formConfig = computed(() => {
@@ -158,20 +136,21 @@ const formConfig = computed(() => {
       type: "slot",
       type: "slot",
       slotName: "supplyId",
       slotName: "supplyId",
       label: "",
       label: "",
+      itemWidth: 33.33,
     },
     },
     {
     {
-      type: "slot",
+      type: "date",
       prop: "deadline",
       prop: "deadline",
-      slotName: "deadline",
+      itemType: "date",
       label: "付款期限",
       label: "付款期限",
-      itemWidth: 33,
+      itemWidth: 33.33,
     },
     },
     {
     {
       type: "select",
       type: "select",
       label: "付款类型",
       label: "付款类型",
       prop: "type",
       prop: "type",
       data: payMethod.value,
       data: payMethod.value,
-      itemWidth: 33,
+      itemWidth: 33.33,
       style: "width: 100%",
       style: "width: 100%",
       fn: () => {
       fn: () => {
         formData.data.advanceCode = "";
         formData.data.advanceCode = "";
@@ -193,11 +172,13 @@ const formConfig = computed(() => {
       itemType: "textarea",
       itemType: "textarea",
     },
     },
     {
     {
-      type: "slot",
+      type: "number",
       prop: "receiptsNum",
       prop: "receiptsNum",
-      slotName: "receiptsNum",
       label: "单据数量",
       label: "单据数量",
-      itemWidth: 33,
+      precision: 0,
+      min: 0,
+      controls: false,
+      itemWidth: 33.33,
     },
     },
     {
     {
       type: "select",
       type: "select",
@@ -217,18 +198,21 @@ const formConfig = computed(() => {
       },
       },
     },
     },
     {
     {
-      type: "slot",
+      type: "number",
       prop: "taxRate",
       prop: "taxRate",
-      slotName: "taxRate",
       label: "税率 (%)",
       label: "税率 (%)",
-      itemWidth: 34,
+      precision: 2,
+      min: 0,
+      controls: false,
+      itemWidth: 33.33,
       isShow:
       isShow:
         formData.data.invoiceType == "1" || formData.data.invoiceType == "2",
         formData.data.invoiceType == "1" || formData.data.invoiceType == "2",
     },
     },
     {
     {
-      type: "slot",
+      type: "upload",
+      listType: "text",
+      accept: "",
       prop: "fileList",
       prop: "fileList",
-      slotName: "fileList",
       label: "上传附件",
       label: "上传附件",
     },
     },
     {
     {
@@ -249,9 +233,8 @@ const formConfig = computed(() => {
       required: true,
       required: true,
       itemType: "text",
       itemType: "text",
       disabled: true,
       disabled: true,
-      itemWidth: 50,
+      itemWidth: 33.33,
     },
     },
-
     {
     {
       type: "title",
       type: "title",
       title: "收款信息",
       title: "收款信息",
@@ -326,60 +309,8 @@ const rules = ref({
   type: [{ required: true, message: "请选择付款类型", trigger: "change" }],
   type: [{ required: true, message: "请选择付款类型", trigger: "change" }],
   taxRate: [{ required: true, message: "请输入税率", trigger: "blur" }],
   taxRate: [{ required: true, message: "请输入税率", trigger: "blur" }],
 });
 });
-const fileList = ref([]);
-const uploadData = ref({});
+
 const getDict = () => {
 const getDict = () => {
-  proxy
-    .post("/dictTenantData/page", {
-      pageNum: 1,
-      pageSize: 999,
-      dictCode: "invoice_type",
-      tenantId: useUserStore().user.tenantId,
-    })
-    .then((res) => {
-      if (res.rows && res.rows.length > 0) {
-        invoiceType.value = res.rows.map((item) => {
-          return {
-            label: item.dictValue,
-            value: item.dictKey,
-          };
-        });
-      }
-    });
-  proxy
-    .post("/dictTenantData/page", {
-      pageNum: 1,
-      pageSize: 999,
-      dictCode: "funds_payment_method",
-      tenantId: useUserStore().user.tenantId,
-    })
-    .then((res) => {
-      if (res.rows && res.rows.length > 0) {
-        fundsPaymentMethod.value = res.rows.map((item) => {
-          return {
-            label: item.dictValue,
-            value: item.dictKey,
-          };
-        });
-      }
-    });
-  proxy
-    .post("/dictTenantData/page", {
-      pageNum: 1,
-      pageSize: 999,
-      dictCode: "pay_method",
-      tenantId: useUserStore().user.tenantId,
-    })
-    .then((res) => {
-      if (res.rows && res.rows.length > 0) {
-        payMethod.value = res.rows.map((item) => {
-          return {
-            label: item.dictValue,
-            value: item.dictKey,
-          };
-        });
-      }
-    });
   proxy.post("/supplierInfo/page", { pageNum: 1, pageSize: 50 }).then((res) => {
   proxy.post("/supplierInfo/page", { pageNum: 1, pageSize: 50 }).then((res) => {
     if (res.rows && res.rows.length > 0) {
     if (res.rows && res.rows.length > 0) {
       supplierList.value = res.rows.map((item) => {
       supplierList.value = res.rows.map((item) => {
@@ -391,6 +322,7 @@ const getDict = () => {
       });
       });
     }
     }
   });
   });
+
   proxy
   proxy
     .post("/accountManagement/page", { pageNum: 1, pageSize: 999 })
     .post("/accountManagement/page", { pageNum: 1, pageSize: 999 })
     .then((res) => {
     .then((res) => {
@@ -407,17 +339,7 @@ const getDict = () => {
     });
     });
 };
 };
 getDict();
 getDict();
-const uploadFile = async (file) => {
-  const res = await proxy.post("/fileInfo/getSing", { fileName: file.name });
-  uploadData.value = res.uploadBody;
-  file.id = res.id;
-  file.fileName = res.fileName;
-  file.fileUrl = res.fileUrl;
-  return true;
-};
-const onPreviewFile = (file) => {
-  window.open(file.raw.fileUrl, "_blank");
-};
+
 const changeSupply = async (val) => {
 const changeSupply = async (val) => {
   if (val) {
   if (val) {
     await proxy
     await proxy
@@ -502,15 +424,6 @@ const handleSubmit = async () => {
   let status = await submit.value.handleSubmit(() => {});
   let status = await submit.value.handleSubmit(() => {});
   if (status) {
   if (status) {
     if (formData.data.payDetailList && formData.data.payDetailList.length > 0) {
     if (formData.data.payDetailList && formData.data.payDetailList.length > 0) {
-      if (fileList.value && fileList.value.length > 0) {
-        formData.data.fileList = fileList.value.map((item) => {
-          return {
-            id: item.raw.id,
-            fileName: item.raw.fileName,
-            fileUrl: item.raw.fileUrl,
-          };
-        });
-      }
       return true;
       return true;
     } else {
     } else {
       ElMessage("请添加至少一条付款明细");
       ElMessage("请添加至少一条付款明细");
@@ -523,16 +436,6 @@ const handleSubmit = async () => {
 const props = defineProps({
 const props = defineProps({
   queryData: Object,
   queryData: Object,
 });
 });
-// 判断当前用户有无销售合同页面权限
-const isHave = ref(false);
-if (userInfo.permissions && userInfo.permissions.includes("contract")) {
-  isHave.value = true;
-}
-// 判断当前用户有无采购合同页面权限
-const isHaveOne = ref(false);
-if (userInfo.permissions && userInfo.permissions.includes("alreadyPurchase")) {
-  isHaveOne.value = true;
-}
 
 
 onMounted(async () => {
 onMounted(async () => {
   if (props.queryData.supplyIdTwo) {
   if (props.queryData.supplyIdTwo) {
@@ -608,12 +511,11 @@ onMounted(async () => {
             ) {
             ) {
               formData.data.fileList = fileObj[route.query.businessId].map(
               formData.data.fileList = fileObj[route.query.businessId].map(
                 (x) => ({
                 (x) => ({
-                  raw: x,
+                  ...x,
                   name: x.fileName,
                   name: x.fileName,
                   url: x.fileUrl,
                   url: x.fileUrl,
                 })
                 })
               );
               );
-              fileList.value = formData.data.fileList;
             }
             }
           });
           });
       });
       });
@@ -643,6 +545,7 @@ let auxiliaryData = ref([
 ]);
 ]);
 const emit = defineEmits(["auxiliaryChange"]);
 const emit = defineEmits(["auxiliaryChange"]);
 const getDecisionAids = () => {
 const getDecisionAids = () => {
+  return;
   let data = {
   let data = {
     purchaseIdList: [],
     purchaseIdList: [],
   };
   };
@@ -792,7 +695,4 @@ const remoteMethod = (keyword) => {
 </script>
 </script>
 
 
 <style lang="scss" scoped>
 <style lang="scss" scoped>
-::v-deep(.el-input-number .el-input__inner) {
-  text-align: left;
-}
 </style>
 </style>

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

@@ -149,7 +149,7 @@
                     </el-table-column>
                     </el-table-column>
                     <el-table-column prop="productCode" label="物料编码" width="190" />
                     <el-table-column prop="productCode" label="物料编码" width="190" />
                     <el-table-column prop="productName" label="物料名称" min-width="200" />
                     <el-table-column prop="productName" label="物料名称" min-width="200" />
-                    <el-table-column label="尺寸 cm*cm*cm" width="150">
+                    <el-table-column label="尺寸 (cm)" width="150">
                       <template #default="{ row, $index }">
                       <template #default="{ row, $index }">
                         <div style="width: 100%">
                         <div style="width: 100%">
                           {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}
                           {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}

+ 1 - 0
src/components/process/SF/Subscribe.vue

@@ -222,6 +222,7 @@ onMounted(() => {
   formOption.disabled = judgeStatus();
   formOption.disabled = judgeStatus();
   formData.data.subcribeTime = proxy.parseTime(new Date());
   formData.data.subcribeTime = proxy.parseTime(new Date());
   formData.data.deptName = proxy.useUserStore().user.dept.deptName;
   formData.data.deptName = proxy.useUserStore().user.dept.deptName;
+  formData.data.deptId = proxy.useUserStore().user.dept.deptId;
   formData.data.subcribeName = proxy.useUserStore().user.nickName;
   formData.data.subcribeName = proxy.useUserStore().user.nickName;
   if (route.query.businessId && route.query.processType) {
   if (route.query.businessId && route.query.processType) {
     getAllData(route.query.businessId);
     getAllData(route.query.businessId);

+ 69 - 48
src/components/product/SelectAllGood.vue

@@ -11,7 +11,7 @@
         ]" @get-list="getList">
         ]" @get-list="getList">
 
 
         <template #pic="{ item }">
         <template #pic="{ item }">
-          <div v-if="item.fileList.length > 0">
+          <div v-if="item.fileList&&item.fileList.length > 0">
             <img :src="item.fileList[0].fileUrl" class="pic" @click="handleClickFile(item.fileList[0])" />
             <img :src="item.fileList[0].fileUrl" class="pic" @click="handleClickFile(item.fileList[0])" />
           </div>
           </div>
           <div v-else></div>
           <div v-else></div>
@@ -54,6 +54,9 @@ import AllTreeList from "@/components/product/allTreeList.vue";
 import { ElMessage, ElMessageBox } from "element-plus";
 import { ElMessage, ElMessageBox } from "element-plus";
 
 
 const { proxy } = getCurrentInstance();
 const { proxy } = getCurrentInstance();
+const materialUnitData = computed(
+  () => proxy.useUserStore().allDict["material_unit"]
+);
 const props = defineProps({
 const props = defineProps({
   selectStatus: Boolean,
   selectStatus: Boolean,
   warehouseId: String,
   warehouseId: String,
@@ -115,39 +118,39 @@ const config = computed(() => {
     },
     },
     {
     {
       attrs: {
       attrs: {
-        label: "物分类",
+        label: "物分类",
         prop: "classifyName",
         prop: "classifyName",
         "min-width": 150,
         "min-width": 150,
       },
       },
     },
     },
     {
     {
       attrs: {
       attrs: {
-        label: "物编码",
+        label: "物编码",
         prop: "customCode",
         prop: "customCode",
         width: 120,
         width: 120,
       },
       },
     },
     },
     {
     {
       attrs: {
       attrs: {
-        label: " 物料名称",
+        label: "物品名称",
         slot: "name",
         slot: "name",
         "min-width": 150,
         "min-width": 150,
       },
       },
     },
     },
-    {
-      attrs: {
-        label: "物料材质",
-        prop: "material",
-        width: 120,
-      },
-    },
-    {
-      attrs: {
-        label: "物料型号",
-        prop: "spec",
-        width: 120,
-      },
-    },
+    // {
+    //   attrs: {
+    //     label: "物料材质",
+    //     prop: "material",
+    //     width: 120,
+    //   },
+    // },
+    // {
+    //   attrs: {
+    //     label: "物料型号",
+    //     prop: "spec",
+    //     width: 120,
+    //   },
+    // },
     {
     {
       attrs: {
       attrs: {
         label: "单位",
         label: "单位",
@@ -177,23 +180,37 @@ const config = computed(() => {
         }
         }
       },
       },
     },
     },
-    {
-      attrs: {
-        label: "成本价",
-        slot: "costPrice",
-        width: 100,
-      },
-    },
-
     // {
     // {
     //   attrs: {
     //   attrs: {
-    //     label: "操作",
-    //     slot: "btn",
-    //     width: 120,
-    //     fixed: "right",
-    //     align: "center",
+    //     label: "成本价",
+    //     slot: "costPrice",
+    //     width: 100,
     //   },
     //   },
     // },
     // },
+
+    {
+      attrs: {
+        label: "操作",
+        width: "80",
+        align: "center",
+        fixed: "right",
+      },
+      renderHTML(row) {
+        return [
+          {
+            attrs: {
+              label: "选择",
+              type: "primary",
+              text: true,
+            },
+            el: "button",
+            click() {
+              clickSelect(row);
+            },
+          },
+        ];
+      },
+    },
   ];
   ];
 });
 });
 
 
@@ -327,23 +344,23 @@ const deriveExcel = () => {
 //   proxy.$emit("select", item);
 //   proxy.$emit("select", item);
 // };
 // };
 const goodList = ref([]);
 const goodList = ref([]);
-const clickSelect = (row) => {
-  const flag = goodList.value.some((x) => x.id === row.id);
-  if (flag)
-    return ElMessage({
-      message: "该物品已选择",
-      type: "info",
-    });
-  goodList.value.push({
-    ...row,
-    goodType: sourceList.value.pagination.definition,
-  });
-  return ElMessage({
-    message: "选择成功",
-    type: "success",
-  });
-  proxy.$emit("select", item);
-};
+// const clickSelect = (row) => {
+//   const flag = goodList.value.some((x) => x.id === row.id);
+//   if (flag)
+//     return ElMessage({
+//       message: "该物品已选择",
+//       type: "info",
+//     });
+//   goodList.value.push({
+//     ...row,
+//     goodType: sourceList.value.pagination.definition,
+//   });
+//   return ElMessage({
+//     message: "选择成功",
+//     type: "success",
+//   });
+//   proxy.$emit("select", item);
+// };
 const handleRemove = (index) => {
 const handleRemove = (index) => {
   goodList.value.splice(index, 1);
   goodList.value.splice(index, 1);
   return ElMessage({
   return ElMessage({
@@ -366,6 +383,10 @@ const handleSubmit = () => {
   proxy.$emit("select", goodList.value);
   proxy.$emit("select", goodList.value);
   goodList.value = [];
   goodList.value = [];
 };
 };
+
+const clickSelect = (item) => {
+  proxy.$emit("selectGood", item);
+};
 </script>
 </script>
 
 
 <style lang="scss" scoped>
 <style lang="scss" scoped>

+ 69 - 13
src/views/MES/productionOrder/index.vue

@@ -39,6 +39,16 @@
       </template>
       </template>
     </el-dialog>
     </el-dialog>
 
 
+    <el-dialog :title="'投产'" v-model="productionDialog" width="500px" destroy-on-close>
+      <byForm :formConfig="productionFormConfig" :formOption="formOption" v-model="formData.data" :rules="productionRules" ref="productionFormDom"
+              v-loading="formLoading">
+      </byForm>
+      <template #footer>
+        <el-button @click="productionDialog =false" size="default" v-debounce>取 消</el-button>
+        <el-button @click="submitProduction" type="primary" size="default" v-debounce>提 交</el-button>
+      </template>
+    </el-dialog>
+
   </div>
   </div>
 </template>
 </template>
 
 
@@ -127,6 +137,13 @@ const config = computed(() => {
     },
     },
     {
     {
       attrs: {
       attrs: {
+        label: "投产时间",
+        prop: "produceTime",
+        width: 160,
+      },
+    },
+    {
+      attrs: {
         label: "生产状态",
         label: "生产状态",
         prop: "produceStatus",
         prop: "produceStatus",
         width: 120,
         width: 120,
@@ -161,19 +178,20 @@ const config = computed(() => {
                 },
                 },
                 el: "button",
                 el: "button",
                 click() {
                 click() {
-                  proxy
-                    .msgConfirm()
-                    .then((res) => {
-                      proxy
-                        .post("/produceOrder/putProduction", {
-                          id: row.id,
-                        })
-                        .then((res) => {
-                          proxy.msgTip("操作成功", 1);
-                          getList();
-                        });
-                    })
-                    .catch((err) => {});
+                  // proxy
+                  //   .msgConfirm()
+                  //   .then((res) => {
+                  //     proxy
+                  //       .post("/produceOrder/putProduction", {
+                  //         id: row.id,
+                  //       })
+                  //       .then((res) => {
+                  //         proxy.msgTip("操作成功", 1);
+                  //         getList();
+                  //       });
+                  //   })
+                  //   .catch((err) => {});
+                  clickDistributeProduction(row);
                 },
                 },
               },
               },
         ];
         ];
@@ -275,6 +293,44 @@ const getDtl = (row) => {
 };
 };
 
 
 getList();
 getList();
+
+const productionFormDom = ref(null);
+const productionDialog = ref(false);
+const formLoading = ref(false);
+const productionFormConfig = computed(() => [
+  {
+    type: "date",
+    itemType: "datetime",
+    label: "投产时间",
+    prop: "produceTime",
+    // placeholder: "合同开始时间",
+    itemWidth: 100,
+    clearable: true,
+  },
+]);
+const productionRules = ref({
+  produceTime: [
+    { required: true, message: "请选择投产时间", trigger: "change" },
+  ],
+});
+const clickDistributeProduction = (row) => {
+  formData.data = {
+    id: row.id,
+    produceTime: "",
+  };
+  productionDialog.value = true;
+};
+const submitProduction = () => {
+  productionFormDom.value.handleSubmit(() => {
+    formLoading.value = true;
+    proxy.post("/produceOrder/putProduction", formData.data).then((res) => {
+      proxy.msgTip("操作成功");
+      formLoading.value = false;
+      productionDialog.value = false;
+      getList();
+    });
+  });
+};
 </script>
 </script>
 
 
 <style lang="scss" scoped>
 <style lang="scss" scoped>

+ 64 - 2
src/views/MES/productionScheduling/index.vue

@@ -23,7 +23,12 @@
 
 
         <template #date="{ item }">
         <template #date="{ item }">
           <div style="width:100%; ">
           <div style="width:100%; ">
-            <div>{{item.produceTime}} ~ {{item.deliveryPeriod}}</div>
+            <div><el-icon :size="16" style="cursor:pointer;margin-right: 3px;position:relative;top:4px" color="#409EFF"
+                       @click="clickDistributeProduction(item)">
+                <Clock />
+              </el-icon>
+              {{item.produceTime}} ~ {{item.deliveryPeriod}}
+            </div>
           </div>
           </div>
         </template>
         </template>
 
 
@@ -72,6 +77,17 @@
         <el-button type="primary" v-print="printObj" size="defualt">打 印</el-button>
         <el-button type="primary" v-print="printObj" size="defualt">打 印</el-button>
       </template>
       </template>
     </el-dialog>
     </el-dialog>
+
+    <el-dialog :title="'投产'" v-model="productionDialog" width="500px" destroy-on-close>
+      <byForm :formConfig="productionFormConfig" :formOption="formOption" v-model="formData.data" :rules="productionRules" ref="productionFormDom"
+              v-loading="formLoading">
+      </byForm>
+      <template #footer>
+        <el-button @click="productionDialog =false" size="default" v-debounce>取 消</el-button>
+        <el-button @click="submitProduction" type="primary" size="default" v-debounce>提 交</el-button>
+      </template>
+    </el-dialog>
+
   </div>
   </div>
 </template>
 </template>
 
 
@@ -174,7 +190,7 @@ const config = ref([
     attrs: {
     attrs: {
       label: "生产日期",
       label: "生产日期",
       slot: "date",
       slot: "date",
-      width: 180,
+      width: 200,
       align: "center",
       align: "center",
     },
     },
   },
   },
@@ -196,6 +212,7 @@ const getList = (req) => {
       sourceList.value.data = res.map((x, index) => ({
       sourceList.value.data = res.map((x, index) => ({
         ...x,
         ...x,
         // id: "id" + index,
         // id: "id" + index,
+        produceTimeOne: x.produceTime,
         produceTime: x.produceTime.substr(0, 10),
         produceTime: x.produceTime.substr(0, 10),
         deliveryPeriod: x.deliveryPeriod.substr(0, 10),
         deliveryPeriod: x.deliveryPeriod.substr(0, 10),
       }));
       }));
@@ -247,6 +264,51 @@ const isAddRightClass = (day, index) => {
     }
     }
   }
   }
 };
 };
+const formData = reactive({
+  data: {},
+});
+const formOption = reactive({
+  inline: true,
+  labelWidth: 100,
+  itemWidth: 100,
+});
+const productionFormDom = ref(null);
+const productionDialog = ref(false);
+const formLoading = ref(false);
+const productionFormConfig = computed(() => [
+  {
+    type: "date",
+    itemType: "datetime",
+    label: "投产时间",
+    prop: "produceTime",
+    // placeholder: "合同开始时间",
+    itemWidth: 100,
+    clearable: true,
+  },
+]);
+const productionRules = ref({
+  produceTime: [
+    { required: true, message: "请选择投产时间", trigger: "change" },
+  ],
+});
+const clickDistributeProduction = (row) => {
+  formData.data = {
+    id: row.id,
+    produceTime: row.produceTimeOne,
+  };
+  productionDialog.value = true;
+};
+const submitProduction = () => {
+  productionFormDom.value.handleSubmit(() => {
+    formLoading.value = true;
+    proxy.post("/produceOrder/editProduceTime", formData.data).then((res) => {
+      proxy.msgTip("操作成功");
+      formLoading.value = false;
+      productionDialog.value = false;
+      getList();
+    });
+  });
+};
 </script>
 </script>
 
 
 <style lang="scss" scoped>
 <style lang="scss" scoped>

+ 1 - 0
src/views/process/processApproval/index.vue

@@ -524,6 +524,7 @@ const skipPage = () => {
     contract_flow: "Contract",
     contract_flow: "Contract",
     sale_quotation_flow: "Quotation",
     sale_quotation_flow: "Quotation",
     purchase_flow: "Purchased",
     purchase_flow: "Purchased",
+    pay_flow: "Payment",
   };
   };
   const useTagsStore = useTagsViewStore();
   const useTagsStore = useTagsViewStore();
   useTagsStore.delVisitedView(router.currentRoute.value);
   useTagsStore.delVisitedView(router.currentRoute.value);

+ 55 - 31
src/views/purchaseSales/outAndInWarehouse/inventoryInquiry/index.vue

@@ -15,13 +15,17 @@
                 text: '导出Excel',
                 text: '导出Excel',
                 action: () => deriveExcel(),
                 action: () => deriveExcel(),
               }, -->
               }, -->
+        <template #size="{ item }">
+          <div v-if="item.productLength && item.productWidth && item.productHeight">
+            <span>{{ item.productLength }}cm</span>*
+            <span>{{ item.productWidth }}cm</span>*
+            <span>{{ item.productHeight }}cm</span>
+          </div>
+        </template>
         <template #btn="{ item }">
         <template #btn="{ item }">
           <div style="width: 100%; text-align: center">
           <div style="width: 100%; text-align: center">
-            <el-button type="primary" @click="checkTheFlow(item)" v-if="!selectStatus" text>查看流水</el-button>
-            <!-- <el-button type="primary" @click="clickSelect(item)" v-else text
-              >选择</el-button
-            > -->
-            <el-button type="primary" @click="clickSelect(item)" v-else text>选择</el-button>
+            <!-- <el-button type="primary" @click="checkTheFlow(item)" v-if="!selectStatus" text>查看流水</el-button> -->
+            <el-button type="primary" @click="clickSelect(item)" text>选择</el-button>
           </div>
           </div>
         </template>
         </template>
       </byTable>
       </byTable>
@@ -69,6 +73,7 @@ const sourceList = ref({
     companyId: "",
     companyId: "",
     definition: "",
     definition: "",
     productClassifyId: "",
     productClassifyId: "",
+    id: "",
   },
   },
 });
 });
 const productUnit = ref([]);
 const productUnit = ref([]);
@@ -97,6 +102,11 @@ const selectConfig = computed(() => {
       prop: "definition",
       prop: "definition",
       data: definition.value,
       data: definition.value,
     },
     },
+    {
+      label: "仓库",
+      prop: "id",
+      data: warehouseList.value,
+    },
   ];
   ];
 });
 });
 const config = computed(() => {
 const config = computed(() => {
@@ -141,8 +151,8 @@ const config = computed(() => {
     },
     },
     {
     {
       attrs: {
       attrs: {
-        label: "规格型号",
-        prop: "productSpec",
+        label: "尺寸",
+        slot: "size",
         width: 160,
         width: 160,
       },
       },
     },
     },
@@ -171,15 +181,15 @@ const config = computed(() => {
       },
       },
     },
     },
 
 
-    // {
-    //   attrs: {
-    //     label: "操作",
-    //     slot: "btn",
-    //     width: 120,
-    //     fixed: "right",
-    //     align: "center",
-    //   },
-    // },
+    {
+      attrs: {
+        label: "操作",
+        slot: "btn",
+        width: 120,
+        fixed: "right",
+        align: "center",
+      },
+    },
   ];
   ];
 });
 });
 
 
@@ -215,6 +225,17 @@ const getDict = () => {
       getList();
       getList();
     });
     });
 
 
+  proxy.post("/warehouse/page", { pageNum: 1, pageSize: 999 }).then((res) => {
+    if (res.rows && res.rows.length > 0) {
+      warehouseList.value = res.rows.map((item) => {
+        return {
+          label: item.name,
+          value: item.id,
+        };
+      });
+    }
+  });
+
   Promise.all([
   Promise.all([
     proxy.post("/productClassify/tree", {
     proxy.post("/productClassify/tree", {
       parentId: "",
       parentId: "",
@@ -268,6 +289,9 @@ const getList = (req) => {
   } else {
   } else {
     url = "/stock/page";
     url = "/stock/page";
   }
   }
+  if (props.warehouseId) {
+    sourceList.value.pagination.id = props.warehouseId;
+  }
   proxy.post(url, sourceList.value.pagination).then((res) => {
   proxy.post(url, sourceList.value.pagination).then((res) => {
     sourceList.value.data = res.rows;
     sourceList.value.data = res.rows;
     sourceList.value.pagination.total = res.total;
     sourceList.value.pagination.total = res.total;
@@ -316,21 +340,21 @@ const deriveExcel = () => {
 // };
 // };
 const goodList = ref([]);
 const goodList = ref([]);
 const clickSelect = (row) => {
 const clickSelect = (row) => {
-  const flag = goodList.value.some((x) => x.id === row.id);
-  if (flag)
-    return ElMessage({
-      message: "该物品已选择",
-      type: "info",
-    });
-  goodList.value.push({
-    ...row,
-    goodType: sourceList.value.pagination.definition,
-  });
-  return ElMessage({
-    message: "选择成功",
-    type: "success",
-  });
-  proxy.$emit("select", item);
+  // const flag = goodList.value.some((x) => x.id === row.id);
+  // if (flag)
+  //   return ElMessage({
+  //     message: "该物品已选择",
+  //     type: "info",
+  //   });
+  // goodList.value.push({
+  //   ...row,
+  //   goodType: sourceList.value.pagination.definition,
+  // });
+  // return ElMessage({
+  //   message: "选择成功",
+  //   type: "success",
+  // });
+  proxy.$emit("selectGood", row);
 };
 };
 const handleRemove = (index) => {
 const handleRemove = (index) => {
   goodList.value.splice(index, 1);
   goodList.value.splice(index, 1);

+ 31 - 27
src/views/purchaseSales/outAndInWarehouse/manualDelivery/index.vue

@@ -19,15 +19,21 @@
             <el-table :data="formData.data.list" style="width: 100%; margin-top: 16px">
             <el-table :data="formData.data.list" style="width: 100%; margin-top: 16px">
               <el-table-column prop="productCode" label="产品编码" width="140" />
               <el-table-column prop="productCode" label="产品编码" width="140" />
               <el-table-column prop="productName" label="产品名称" min-width="160" />
               <el-table-column prop="productName" label="产品名称" min-width="160" />
-              <el-table-column prop="productSpec" label="规格型号" width="160" />
-              <el-table-column prop="productUnit" label="单位" width="100" :formatter="
+              <el-table-column label="尺寸 (cm)" min-width="100">
+                <template #default="{ row, $index }">
+                  <div style="width: 100%">
+                    {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}
+                  </div>
+                </template>
+              </el-table-column>
+              <!-- <el-table-column prop="productUnit" label="单位" width="100" :formatter="
                   (row) => dictValueLabel(row.productUnit, productUnit)
                   (row) => dictValueLabel(row.productUnit, productUnit)
-                " />
-              <el-table-column prop="productQuantity" label="库存数量" width="120" />
-              <el-table-column label="出库数量" width="160">
+                " /> -->
+              <el-table-column prop="stockQuantity" label="库存数量" width="100" />
+              <el-table-column label="出库数量" width="140">
                 <template #default="{ row, $index }">
                 <template #default="{ row, $index }">
                   <div style="width: 100%">
                   <div style="width: 100%">
-                    <el-form-item :prop="'list.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true">
+                    <el-form-item :prop="'list.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true" class="margin-b-0">
                       <el-input-number v-model="row.quantity" placeholder="请输入出库数量" style="width: 100%" :precision="0" :controls="false" :min="1"
                       <el-input-number v-model="row.quantity" placeholder="请输入出库数量" style="width: 100%" :precision="0" :controls="false" :min="1"
                                        onmousewheel="return false;" />
                                        onmousewheel="return false;" />
                     </el-form-item>
                     </el-form-item>
@@ -49,9 +55,8 @@
       </template>
       </template>
     </el-dialog>
     </el-dialog>
 
 
-    <el-dialog v-model="openProduct" title="选择商品" width="80%" append-to-body>
-      <InventoryInquiry :selectStatus="true" :warehouseId="formData.data.warehouseId" @cancel="openProduct = false" @select="pushGoods"
-                        :key="formData.data.warehouseId">
+    <el-dialog v-model="openProduct" title="选择商品" width="80%" append-to-body destroy-on-close>
+      <InventoryInquiry :selectStatus="true" :warehouseId="formData.data.warehouseId" @selectGood="selectGood" :key="formData.data.warehouseId">
       </InventoryInquiry>
       </InventoryInquiry>
     </el-dialog>
     </el-dialog>
   </div>
   </div>
@@ -200,7 +205,8 @@ const formData = reactive({
 const formConfig = computed(() => {
 const formConfig = computed(() => {
   return [
   return [
     {
     {
-      label: "基本信息",
+      type: "title1",
+      title: "基本信息",
     },
     },
     {
     {
       type: "select",
       type: "select",
@@ -256,7 +262,7 @@ const select = (item) => {
     productName: item.productName,
     productName: item.productName,
     productSpec: item.productSpec,
     productSpec: item.productSpec,
     productUnit: item.productUnit,
     productUnit: item.productUnit,
-    productQuantity: item.quantity,
+    stockQuantity: item.quantity,
     quantity: undefined,
     quantity: undefined,
   });
   });
   ElMessage({
   ElMessage({
@@ -264,29 +270,27 @@ const select = (item) => {
     type: "success",
     type: "success",
   });
   });
 };
 };
-const pushGoods = (goods) => {
-  const arr = goods.map((item) => ({
-    productCode: item.productCode,
-    productId: item.productId,
-    productName: item.productName,
-    productSpec: item.productSpec,
-    productUnit: item.productUnit,
-    productQuantity: item.quantity,
-    quantity: undefined,
-  }));
-  formData.data.list = formData.data.list.concat(arr);
-  openProduct.value = false;
-  return ElMessage({
-    message: "添加成功!",
-    type: "success",
+
+const selectGood = (row) => {
+  formData.data.list.push({
+    productCode: row.productCustomCode,
+    productId: row.productId,
+    productName: row.productName,
+    productLength: row.productLength,
+    productWidth: row.productWidth,
+    productHeight: row.productHeight,
+    stockQuantity: row.quantity,
+    quantity: null,
   });
   });
+  proxy.msgTip("选择成功");
 };
 };
+
 const submitForm = () => {
 const submitForm = () => {
   submit.value.handleSubmit(() => {
   submit.value.handleSubmit(() => {
     if (formData.data.list && formData.data.list.length > 0) {
     if (formData.data.list && formData.data.list.length > 0) {
       for (let i = 0; i < formData.data.list.length; i++) {
       for (let i = 0; i < formData.data.list.length; i++) {
         if (
         if (
-          formData.data.list[i].productQuantity < formData.data.list[i].quantity
+          formData.data.list[i].stockQuantity < formData.data.list[i].quantity
         ) {
         ) {
           return ElMessage("出库数量不能大于库存数量");
           return ElMessage("出库数量不能大于库存数量");
         }
         }

+ 26 - 6
src/views/purchaseSales/outAndInWarehouse/manualWarehousing/index.vue

@@ -19,11 +19,17 @@
             <el-table :data="formData.data.list" style="width: 100%; margin-top: 16px">
             <el-table :data="formData.data.list" style="width: 100%; margin-top: 16px">
               <el-table-column prop="productCode" label="产品编码" width="140" />
               <el-table-column prop="productCode" label="产品编码" width="140" />
               <el-table-column prop="productName" label="产品名称" min-width="220" />
               <el-table-column prop="productName" label="产品名称" min-width="220" />
-              <el-table-column prop="productSpec" label="规格型号" min-width="220" />
-              <el-table-column prop="productUnit" label="单位" width="100" :formatter="
+              <el-table-column label="尺寸 (cm)" min-width="160">
+                <template #default="{ row, $index }">
+                  <div style="width: 100%">
+                    {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}
+                  </div>
+                </template>
+              </el-table-column>
+              <!-- <el-table-column prop="productUnit" label="单位" width="100" :formatter="
                   (row) => dictValueLabel(row.productUnit, productUnit)
                   (row) => dictValueLabel(row.productUnit, productUnit)
-                " />
-              <el-table-column label="入库数量" width="160">
+                " /> -->
+              <el-table-column label="入库数量" width="140">
                 <template #default="{ row, $index }">
                 <template #default="{ row, $index }">
                   <div style="width: 100%">
                   <div style="width: 100%">
                     <el-form-item :prop="'list.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true" class="margin-b-0">
                     <el-form-item :prop="'list.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true" class="margin-b-0">
@@ -49,7 +55,7 @@
     </el-dialog>
     </el-dialog>
 
 
     <el-dialog v-if="openProduct" v-model="openProduct" title="物料选择" width="90%" append-to-body>
     <el-dialog v-if="openProduct" v-model="openProduct" title="物料选择" width="90%" append-to-body>
-      <SelectAllGood></SelectAllGood>
+      <SelectAllGood @selectGood="selectGood"></SelectAllGood>
       <!-- <SelectMaterial @selectMaterial="selectMaterial"></SelectMaterial> -->
       <!-- <SelectMaterial @selectMaterial="selectMaterial"></SelectMaterial> -->
     </el-dialog>
     </el-dialog>
   </div>
   </div>
@@ -199,7 +205,8 @@ const formData = reactive({
 const formConfig = computed(() => {
 const formConfig = computed(() => {
   return [
   return [
     {
     {
-      label: "基本信息",
+      type: "title1",
+      title: "基本信息",
     },
     },
     {
     {
       type: "select",
       type: "select",
@@ -280,6 +287,19 @@ const selectMaterial = (row) => {
     proxy.msgTip("该物料已选择", 2);
     proxy.msgTip("该物料已选择", 2);
   }
   }
 };
 };
+
+const selectGood = (row) => {
+  formData.data.list.push({
+    productCode: row.customCode,
+    productId: row.id,
+    productName: row.name,
+    productLength: row["length"],
+    productWidth: row.width,
+    productHeight: row.height,
+    quantity: null,
+  });
+  proxy.msgTip("选择成功");
+};
 const submitForm = () => {
 const submitForm = () => {
   submit.value.handleSubmit(() => {
   submit.value.handleSubmit(() => {
     loadingDialog.value = true;
     loadingDialog.value = true;