cz před 1 rokem
rodič
revize
c20d21f816

+ 51 - 49
src/assets/styles/element-ui.scss

@@ -83,86 +83,88 @@
   box-sizing: content-box;
 }
 
-.el-menu--collapse
-  > div
-  > .el-submenu
-  > .el-submenu__title
-  .el-submenu__icon-arrow {
+.el-menu--collapse>div>.el-submenu>.el-submenu__title .el-submenu__icon-arrow {
   display: none;
 }
 
-.el-dropdown .el-dropdown-link{
+.el-dropdown .el-dropdown-link {
   color: var(--el-color-primary) !important;
 }
 
 
-.el-form .el-form-item__label{
-	font-weight: 400!important;
+.el-form .el-form-item__label {
+  font-weight: 400 !important;
 }
-.el-dialog{
-	background: #EEEEEE!important;
+
+.el-dialog {
+  background: #EEEEEE !important;
 }
-.el-dialog__header{
-	background: #EEEEEE;
-	padding-bottom: 14px;
+
+.el-dialog__header {
+  background: #EEEEEE;
+  padding-bottom: 14px;
 }
-.el-dialog__body{
-	background: #fff;
-  padding: 20px 30px!important;
+
+.el-dialog__body {
+  background: #fff;
+  padding: 20px 30px !important;
 }
-.el-dialog__footer{
-	background: #fff;
-	text-align: center!important;
-	padding: 40px 0;
+
+.el-dialog__footer {
+  background: #fff;
+  text-align: center !important;
+  padding: 40px 0;
 }
 
-.el-loading-mask{
-  z-index: 1000!important;
+.el-loading-mask {
+  z-index: 1000 !important;
 }
 
-.el-form-item{
+.el-form-item {
   // padding: 0!important;
 }
 
-.el-form-item__label{
-  height: 22px!important;
+.el-form-item__label {
+  height: 22px !important;
 }
 
-.el-tree-node__content{
+.el-tree-node__content {
   height: 40px !important;
-  font-size: 12px!important;
-  color: #666!important;
+  font-size: 12px !important;
+  color: #666 !important;
 }
 
-.el-tree-node:focus>.el-tree-node__content{
-  background-color: #EFF6FF!important;
-  
+.el-tree-node:focus>.el-tree-node__content {
+  background-color: #EFF6FF !important;
+
 }
 
-.is-current{
-  background-color: #EFF6FF!important;
+.is-current {
+  background-color: #EFF6FF !important;
 }
 
-.el-input.is-disabled .el-input__wrapper{
-  background: #fafafa!important;
-  
+.el-input.is-disabled .el-input__wrapper {
+  background: #fafafa !important;
+
 }
-.el-input.is-disabled .el-input__inner{
-  -webkit-text-fill-color:#606266!important;
-  color:#606266!important;
+
+.el-input.is-disabled .el-input__inner {
+  -webkit-text-fill-color: #606266 !important;
+  color: #606266 !important;
 }
-.el-textarea.is-disabled .el-textarea__inner{
-  background: #fafafa!important;
-  -webkit-text-fill-color:#606266!important;
-  color:#606266!important;
+
+.el-textarea.is-disabled .el-textarea__inner {
+  background: #fafafa !important;
+  -webkit-text-fill-color: #606266 !important;
+  color: #606266 !important;
 }
 
-.el-input.is-disabled .el-input__inner::placeholder{
-  color:#c2bdbd!important;
-  -webkit-text-fill-color:#c2bdbd!important;
+.el-input.is-disabled .el-input__inner::placeholder {
+  color: #c2bdbd !important;
+  -webkit-text-fill-color: #c2bdbd !important;
 }
 
-.is-disabled .el-textarea__inner::placeholder{
-  color:#c2bdbd!important;
-  -webkit-text-fill-color:#c2bdbd!important;
+.is-disabled .el-textarea__inner::placeholder {
+  color: #c2bdbd !important;
+  -webkit-text-fill-color: #c2bdbd !important;
 }

+ 24 - 14
src/components/PDF/jxstContractPDF.vue

@@ -3,7 +3,7 @@
     <div id="pdfDom" ref="pdfDom" style="font-family: 'msyh'">
       <div>
         <div class="title">购销合同</div>
-        <div style="display: flex; margin-bottom: 20px">
+        <div style="display: flex; margin-bottom: 30px">
           <div style="width: 50%; padding-right: 20px">
             <div style="display: flex">
               <div>甲 方:</div>
@@ -38,7 +38,11 @@
         <div style="text-indent: 2em">
           兹因甲方向乙方订购以下产品,根据《中华人民共和国合同法》及相关法律、法规双方协商一致,签订合同。
         </div>
-        <table border="1" style="width: 100%" class="table">
+        <table
+          border="1"
+          style="width: 100%; margin-bottom: 22px"
+          class="table"
+        >
           <tr>
             <td style="width: 50px">序号</td>
             <td>产品名称型号</td>
@@ -102,7 +106,7 @@
           <div style="margin-top: 8px">
             6、违约处理,本合同经甲乙双方签字或盖章生效,双方各执一份需严格遵照执行,因本合同履行双方发生争议,根据《合同法》由违约方承担责任并友好协商解决。
           </div>
-          <div style="display: flex; margin-top: 20px">
+          <div style="display: flex; margin-top: 30px">
             <div style="width: 50%; padding-right: 20px">
               <div style="display: flex">
                 <div>买方(盖章):</div>
@@ -110,7 +114,7 @@
                   {{ pdfData.customerName }}
                 </div>
               </div>
-              <div style="display: flex; margin-top: 10px">
+              <div style="display: flex; margin-top: 10px; align-items: end">
                 <div>地 址:</div>
                 <div style="border-bottom: 1px solid #000; flex: 1">
                   {{ pdfData.buyCountryName }},{{ pdfData.buyProvinceName }},{{
@@ -136,7 +140,7 @@
                   {{ pdfData.buyDutyParagraph }}
                 </div>
               </div>
-              <div style="display: flex; margin-top: 10px">
+              <div style="display: flex; margin-top: 10px; align-items: end">
                 <div>开 户 行:</div>
                 <div style="border-bottom: 1px solid #000; flex: 1">
                   {{ pdfData.customerBank }}
@@ -154,10 +158,6 @@
                   {{ pdfData.customerAccountNumber }}
                 </div>
               </div>
-              <div style="display: flex; margin-top: 30px">
-                <div>签 字:</div>
-                <div style="border-bottom: 1px solid #000; flex: 1"></div>
-              </div>
             </div>
             <div style="width: 50%">
               <div style="display: flex">
@@ -166,7 +166,7 @@
                   {{ pdfData.sellCorporationName }}
                 </div>
               </div>
-              <div style="display: flex; margin-top: 10px">
+              <div style="display: flex; margin-top: 10px; align-items: end">
                 <div>地 址:</div>
                 <div style="border-bottom: 1px solid #000; flex: 1">
                   {{ pdfData.sellCountryName }},{{
@@ -190,7 +190,7 @@
                   {{ pdfData.sellTaxationCode }}
                 </div>
               </div>
-              <div style="display: flex; margin-top: 10px">
+              <div style="display: flex; margin-top: 10px; align-items: end">
                 <div>开 户 行:</div>
                 <div style="border-bottom: 1px solid #000; flex: 1">
                   {{ pdfData.sellOpeningBank }}
@@ -208,7 +208,17 @@
                   {{ pdfData.sellAccountOpening }}
                 </div>
               </div>
-              <div style="display: flex; margin-top: 30px">
+            </div>
+          </div>
+          <div style="display: flex; margin-top: 30px">
+            <div style="width: 50%; padding-right: 20px">
+              <div style="display: flex">
+                <div>签 字:</div>
+                <div style="border-bottom: 1px solid #000; flex: 1"></div>
+              </div>
+            </div>
+            <div style="width: 50%">
+              <div style="display: flex">
                 <div>签 字:</div>
                 <div style="border-bottom: 1px solid #000; flex: 1"></div>
               </div>
@@ -273,9 +283,9 @@ watch(
 #pdfDom {
   font-size: 12px;
   color: #000000;
-  padding: 60px 30px;
+  padding: 30px 30px;
   .title {
-    font-size: 16px;
+    font-size: 25px;
     font-weight: 700;
     // margin-top: 10px;
     margin-bottom: 20px;

+ 3 - 0
src/components/byForm/index.vue

@@ -582,4 +582,7 @@ loadInit();
 .by-form-json {
   padding: 0px !important;
 }
+::v-deep(.el-input-number .el-input__inner) {
+  text-align: left;
+}
 </style>

+ 157 - 4
src/views/JXSK/production/workOrder/index.vue

@@ -276,6 +276,37 @@
     </el-dialog>
 
     <el-dialog
+      :title="'工单下发'"
+      v-model="dialogVisibleTwo"
+      width="500"
+      v-loading="submitLoading"
+      destroy-on-close
+    >
+      <byForm
+        :formConfig="formConfigTwo"
+        :formOption="formOption"
+        v-model="formData.dataTwo"
+        :rules="rulesTwo"
+        ref="byformTwo"
+      >
+      </byForm>
+      <template #footer>
+        <el-button @click="dialogVisibleTwo = false" size="large"
+          >取 消</el-button
+        >
+
+        <el-button
+          type="primary"
+          @click="submitFormTwo()"
+          size="large"
+          :loading="submitLoading"
+        >
+          提 交
+        </el-button>
+      </template>
+    </el-dialog>
+
+    <el-dialog
       v-model="openMaterial"
       title="选择产品"
       width="70%"
@@ -411,6 +442,12 @@ const config = computed(() => {
     },
     {
       attrs: {
+        label: "生产数量",
+        prop: "productionQuantity",
+      },
+    },
+    {
+      attrs: {
         label: "完成率",
         prop: "completionRate",
       },
@@ -423,8 +460,8 @@ const config = computed(() => {
     {
       attrs: {
         label: "操作",
-        width: "200",
-        align: "right",
+        width: "220",
+        align: "center",
       },
       // 渲染 el-button,一般用在最后一列。
       renderHTML(row) {
@@ -456,6 +493,19 @@ const config = computed(() => {
                 },
               }
             : {},
+          row.productionQuantity == null
+            ? {
+                attrs: {
+                  label: "下发",
+                  type: "primary",
+                  text: true,
+                },
+                el: "button",
+                click() {
+                  handleOut(row);
+                },
+              }
+            : {},
         ];
       },
     },
@@ -465,6 +515,7 @@ const config = computed(() => {
 let formData = reactive({
   data: {},
   dataOne: {},
+  dataTwo: {},
   treeData: [],
 });
 const formOption = reactive({
@@ -495,6 +546,52 @@ const formConfigOne = reactive([
     label: "上传附件",
   },
 ]);
+const formConfigTwo = reactive([
+  {
+    type: "input",
+    label: "产品名称",
+    prop: "productName",
+    disabled: true,
+  },
+  {
+    type: "input",
+    label: "工单数量",
+    prop: "orderQuantity",
+    disabled: true,
+    itemWidth: 51,
+  },
+  {
+    type: "input",
+    label: "库存数量",
+    prop: "availableStockQuantity",
+    disabled: true,
+    itemWidth: 51,
+  },
+  {
+    type: "number",
+    prop: "stockWaitQuantity",
+    label: "出库数量",
+    itemWidth: 51,
+    precision: 0,
+    min: 0,
+    controls: false,
+    style: {
+      width: "100%",
+    },
+  },
+  {
+    type: "number",
+    prop: "productionQuantity",
+    label: "生产数量",
+    itemWidth: 51,
+    precision: 0,
+    min: 0,
+    controls: false,
+    style: {
+      width: "100%",
+    },
+  },
+]);
 const getList = async (req) => {
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
   loading.value = true;
@@ -625,7 +722,7 @@ const getDtlOne = (row) => {
       dialogVisibleOne.value = true;
       res = res.map((x) => ({
         ...x,
-        fileList: x.oldId
+        fileList: x.fileName
           ? [
               {
                 fileName: x.fileName,
@@ -633,7 +730,7 @@ const getDtlOne = (row) => {
               },
             ]
           : [],
-        fileListCopy: x.oldId
+        fileListCopy: x.fileName
           ? [
               {
                 fileName: x.fileName,
@@ -744,10 +841,66 @@ const handleSuccess = (any, UploadFile) => {
 const onPreviewFile = (file) => {
   window.open(file.raw.fileUrl, "_blank");
 };
+const dialogVisibleTwo = ref(false);
+const byformTwo = ref(null);
+const handleOut = (row) => {
+  dialogVisibleTwo.value = true;
+  proxy.post("/workOrder/detail", { id: row.id }).then((res) => {
+    formData.dataTwo = {
+      id: row.id,
+      productName: row.productName,
+      orderQuantity: row.quantity,
+      productionQuantity: res.productionQuantity
+        ? res.productionQuantity
+        : null,
+      availableStockQuantity: res.availableStockQuantity,
+    };
+  });
+};
+
+const submitFormTwo = (type) => {
+  byformTwo.value.handleSubmit((valid) => {
+    if (
+      formData.dataTwo.productionQuantity +
+        formData.dataTwo.stockWaitQuantity !=
+      Number(formData.dataTwo.orderQuantity)
+    ) {
+      return ElMessage({
+        message: "出库数量和生产数量合必须等于工单数量",
+        type: "info",
+      });
+    }
+    if (
+      formData.dataTwo.stockWaitQuantity >
+      Number(formData.dataTwo.availableStockQuantity)
+    ) {
+      return ElMessage({
+        message: "出库数量不可大于库存数量",
+        type: "info",
+      });
+    }
+    submitLoading.value = true;
+    proxy.post("/workOrder/distribute", formData.dataTwo).then(
+      (res) => {
+        ElMessage({
+          message: "操作成功",
+          type: "success",
+        });
+        dialogVisibleTwo.value = false;
+        submitLoading.value = false;
+        getList();
+      },
+      (err) => (submitLoading.value = false)
+    );
+  });
+};
 </script>
   
 <style lang="scss" scoped>
 .tenant {
   padding: 20px;
 }
+::v-deep(.el-input-number .el-input__inner) {
+  text-align: left;
+}
 </style>

+ 8 - 0
src/views/purchaseSales/outAndInWarehouse/waitingForStorage/index.vue

@@ -175,11 +175,19 @@ const config = computed(() => {
     },
     {
       attrs: {
+        label: "物品Sn",
+        prop: "productSn",
+        width: 140,
+      },
+    },
+    {
+      attrs: {
         label: "规格型号",
         prop: "productSpec",
         width: 140,
       },
     },
+
     {
       attrs: {
         label: "单位",