cz преди 1 година
родител
ревизия
93ed3d6482

+ 1 - 0
package.json

@@ -39,6 +39,7 @@
     "fuse.js": "6.6.2",
     "html2canvas": "^1.4.1",
     "js-cookie": "3.0.1",
+    "jsbarcode": "^3.11.5",
     "jsencrypt": "3.3.1",
     "jspdf": "^2.5.1",
     "lossless-json": "^2.0.8",

+ 6 - 0
src/views/JXSK/production/bom/index.vue

@@ -303,6 +303,12 @@ const config = computed(() => {
     },
     {
       attrs: {
+        label: "规格型号",
+        prop: "productSpec",
+      },
+    },
+    {
+      attrs: {
         label: "状态",
         prop: "status",
       },

+ 81 - 1
src/views/JXSK/production/forward/index.vue

@@ -17,7 +17,7 @@
     <el-dialog
       :title="'任务流转'"
       v-model="dialogVisible"
-      width="700"
+      :width="submitType == '20' ? '60%' : '600'"
       v-loading="loading"
       destroy-on-close
     >
@@ -28,6 +28,42 @@
         :rules="rules"
         ref="byform"
       >
+        <template #right>
+          <div style="width: 100%; padding-left: 54%; margin-bottom: -330px">
+            <el-form-item label="条形码">
+              <div id="pdfDom" style="border: 1px solid #000; padding: 10px">
+                <svg id="barCode"></svg>
+                <div>
+                  <div
+                    style="
+                      font: 14px fantasy;
+                      font-weight: 700;
+                      color: #000;
+                      line-height: 32px;
+                    "
+                  >
+                    产品名称:
+                  </div>
+                  <div
+                    style="
+                      font: 14px fantasy;
+                      font-weight: 700;
+                      color: #000;
+                      line-height: 32px;
+                    "
+                  >
+                    客户名称:
+                  </div>
+                </div>
+              </div>
+            </el-form-item>
+            <div style="text-align: center; margin-top: 10px">
+              <el-button type="primary" v-print="printObj" size="large"
+                >打 印</el-button
+              >
+            </div>
+          </div>
+        </template>
         <template #file>
           <div style="width: 100%">
             <el-upload
@@ -70,6 +106,8 @@
 import { ElMessage, ElMessageBox } from "element-plus";
 import byTable from "@/components/byTable/index";
 import byForm from "@/components/byForm/index";
+import JsBarcode from "jsbarcode";
+
 const { proxy } = getCurrentInstance();
 const loading = ref(false);
 const submitLoading = ref(false);
@@ -124,6 +162,12 @@ const config = computed(() => {
     },
     {
       attrs: {
+        label: "规格型号",
+        prop: "productSpec",
+      },
+    },
+    {
+      attrs: {
         label: "产品SN",
         prop: "productSn",
       },
@@ -179,6 +223,12 @@ const byform = ref(null);
 const formConfig = computed(() => {
   return [
     {
+      type: "slot",
+      slotName: "right",
+      label: "",
+      isShow: submitType.value == "20",
+    },
+    {
       type: "input",
       itemType: "text",
       prop: "productName",
@@ -191,6 +241,16 @@ const formConfig = computed(() => {
     {
       type: "input",
       itemType: "text",
+      prop: "productSpec",
+      label: "规格型号",
+      disabled: true,
+      style: {
+        width: "50%",
+      },
+    },
+    {
+      type: "input",
+      itemType: "text",
       prop: "productSn",
       label: "产品SN",
       disabled: true,
@@ -358,6 +418,18 @@ const getDtl = (row) => {
   // formOption.disabled = true;
   formData.data = { ...row, fileList: [] };
   dialogVisible.value = true;
+  let barCode = row.productSn;
+  nextTick(() => {
+    JsBarcode("#barCode", barCode, {
+      format: "CODE128", //选择要使用的条形码类型
+      text: barCode, //显示文本
+      displayValue: true, //是否在条形码下方显示文字
+      textPosition: "bottom", //设置文本的垂直位置
+      // background: "#eee", //设置条形码的背景
+      font: "fantasy", //设置文本的字体
+      margin: 15, //设置条形码周围的空白边距
+    });
+  });
 };
 
 getList();
@@ -372,6 +444,14 @@ const uploadFile = async (file) => {
 const onPreviewFile = (file) => {
   window.open(file.raw.fileUrl, "_blank");
 };
+
+const printObj = ref({
+  id: "pdfDom",
+  popTitle: "",
+  extraCss:
+    "https://cdn.bootcdn.net/ajax/libs/animate.css/4.1.1/animate.compat.css, https://cdn.bootcdn.net/ajax/libs/hover.css/2.3.1/css/hover-min.css",
+  extraHead: '<meta http-equiv="Content-Language"content="zh-cn"/>',
+});
 </script>
 
 <style lang="scss" scoped>

+ 18 - 1
src/views/JXSK/production/plan/index.vue

@@ -151,7 +151,12 @@ const config = computed(() => {
         prop: "productName",
       },
     },
-
+    {
+      attrs: {
+        label: "规格型号",
+        prop: "productSpec",
+      },
+    },
     {
       attrs: {
         label: "计划数量",
@@ -233,6 +238,17 @@ const formConfig = computed(() => {
     {
       type: "input",
       itemType: "text",
+      prop: "productSpec",
+      label: "规格型号",
+      disabled: true,
+      style: {
+        width: "50%",
+      },
+    },
+
+    {
+      type: "input",
+      itemType: "text",
       prop: "waitQuantity",
       label: "待排程数量",
       disabled: true,
@@ -372,6 +388,7 @@ const changeFn = (val) => {
       : workOrderDataOne.value.find((x) => x.value == val);
   if (current) {
     formData.data.productName = current.productName;
+    formData.data.productSpec = current.productSpec;
     formData.data.waitQuantity = current.remainingQuantity;
   }
 };

+ 16 - 0
src/views/JXSK/production/receive/index.vue

@@ -124,6 +124,12 @@ const config = computed(() => {
     },
     {
       attrs: {
+        label: "规格型号",
+        prop: "productSpec",
+      },
+    },
+    {
+      attrs: {
         label: "产品SN",
         prop: "productSn",
       },
@@ -191,6 +197,16 @@ const formConfig = computed(() => {
     {
       type: "input",
       itemType: "text",
+      prop: "productSpec",
+      label: "规格型号",
+      disabled: true,
+      style: {
+        width: "50%",
+      },
+    },
+    {
+      type: "input",
+      itemType: "text",
       prop: "productSn",
       label: "产品SN",
       disabled: true,

+ 27 - 0
src/views/JXSK/production/task/index.vue

@@ -171,6 +171,12 @@ const config = computed(() => {
     },
     {
       attrs: {
+        label: "规格型号",
+        prop: "productSpec",
+      },
+    },
+    {
+      attrs: {
         label: "任务数量",
         prop: "quantity",
       },
@@ -253,6 +259,16 @@ const formConfig = computed(() => {
     {
       type: "input",
       itemType: "text",
+      prop: "productSpec",
+      label: "规格型号",
+      disabled: true,
+      style: {
+        width: "50%",
+      },
+    },
+    {
+      type: "input",
+      itemType: "text",
       prop: "waitQuantity",
       label: "待排程数量",
       disabled: true,
@@ -312,6 +328,16 @@ const formConfigOne = computed(() => {
     {
       type: "input",
       itemType: "text",
+      prop: "productSpec",
+      label: "规格型号",
+      disabled: true,
+      style: {
+        width: "50%",
+      },
+    },
+    {
+      type: "input",
+      itemType: "text",
       prop: "waitQuantity",
       label: "待排程数量",
       disabled: true,
@@ -492,6 +518,7 @@ const changeFn = (val) => {
       : planDataOne.value.find((x) => x.value == val);
   if (current) {
     formData.data.productName = current.productName;
+    formData.data.productSpec = current.productSpec;
     formData.data.waitQuantity = current.remainingQuantity;
   }
   if (

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

@@ -1013,7 +1013,7 @@ const handleOut = (row) => {
   proxy.post("/workOrder/detail", { id: row.id }).then((res) => {
     formData.dataTwo = {
       id: row.id,
-      productName: row.productName,
+      productName: row.productName + `(${row.productSpec})`,
       orderQuantity: row.quantity,
       productionQuantity: res.productionQuantity
         ? res.productionQuantity
@@ -1072,6 +1072,9 @@ const handleSelectRow = (row) => {
 ::v-deep(.el-input-number .el-input__inner) {
   text-align: left;
 }
+::v-deep(.el-progress__text) {
+  font-size: 15px !important;
+}
 
 .active {
   background: #a6dd82;

+ 19 - 9
src/views/JXSK/salesMange/contract/index.vue

@@ -24,7 +24,7 @@
     <el-dialog
       :title="modalType == 'add' ? '添加合同' : '查看合同'"
       v-model="dialogVisible"
-      width="60%"
+      width="80%"
       v-loading="loading"
       destroy-on-close
     >
@@ -97,7 +97,7 @@
           </div>
         </template>
         <template #shroffAccountId>
-          <div style="width: 100%">
+          <div style="width: 100%; margin-top: -30px; margin-bottom: 30px">
             <el-form-item label="收款账号" prop="shroffAccountId" required>
               <el-select
                 v-model="formData.data.shroffAccountId"
@@ -158,8 +158,17 @@
               :data="formData.data.salesContractDetailsList"
               style="margin-top: 10px"
             >
-              <el-table-column prop="productName" label="产品名称" />
-              <el-table-column prop="isCustomized" label="是否定制">
+              <el-table-column
+                prop="productName"
+                label="产品名称"
+                width="280"
+              />
+              <el-table-column
+                prop="productSpec"
+                label="规格型号"
+                width="100"
+              />
+              <el-table-column prop="isCustomized" label="是否定制" width="120">
                 <template #default="{ row, $index }">
                   <el-form-item
                     :prop="
@@ -179,7 +188,7 @@
                   </el-form-item>
                 </template>
               </el-table-column>
-              <el-table-column prop="unitPrice" label="单价">
+              <el-table-column prop="unitPrice" label="单价" width="130">
                 <template #default="{ row, $index }">
                   <el-form-item
                     :prop="'salesContractDetailsList.' + $index + '.unitPrice'"
@@ -197,7 +206,7 @@
                   </el-form-item>
                 </template>
               </el-table-column>
-              <el-table-column prop="quantity" label="数量">
+              <el-table-column prop="quantity" label="数量" width="130">
                 <template #default="{ row, $index }">
                   <el-form-item
                     :prop="'salesContractDetailsList.' + $index + '.quantity'"
@@ -215,7 +224,7 @@
                   </el-form-item>
                 </template>
               </el-table-column>
-              <el-table-column prop="total" label="金额小计" width="120" />
+              <el-table-column prop="total" label="金额小计" width="100" />
               <el-table-column prop="productRemark" label="备注">
                 <template #default="{ row, $index }">
                   <el-form-item
@@ -234,7 +243,7 @@
                   </el-form-item>
                 </template>
               </el-table-column>
-              <el-table-column prop="zip" label="操作" width="80">
+              <el-table-column prop="zip" label="操作" width="60">
                 <template #default="{ $index }">
                   <el-button type="primary" link @click="handleRemove($index)"
                     >删除</el-button
@@ -645,7 +654,8 @@ getList();
 const openProduct = ref(false);
 const handleSelect = (row) => {
   formData.data.salesContractDetailsList.push({
-    productName: row.name + ` (${row.spec})`,
+    productName: row.name,
+    productSpec: row.spec,
     productId: row.id,
     quantity: null,
   });

+ 1 - 1
src/views/purchaseManage/purchaseManage/arrival/index.vue

@@ -40,7 +40,7 @@
     <el-dialog
       title="到货质检"
       v-model="dialogVisible"
-      width="800"
+      width="70%"
       v-loading="loading"
     >
       <el-form

+ 14 - 0
src/views/purchaseSales/outAndInWarehouse/waitingForDelivery/index.vue

@@ -204,6 +204,13 @@ const config = computed(() => {
     },
     {
       attrs: {
+        label: "需出库数量",
+        prop: "quantityaa",
+        width: 120,
+      },
+    },
+    {
+      attrs: {
         label: "待出库数量",
         prop: "quantity",
         width: 120,
@@ -336,6 +343,13 @@ const formConfig = computed(() => {
     },
     {
       type: "input",
+      prop: "productSpec",
+      label: "规格型号",
+      itemType: "text",
+      disabled: true,
+    },
+    {
+      type: "input",
       prop: "quantity",
       label: "待出库数量",
       itemType: "text",

+ 90 - 7
src/views/purchaseSales/outAndInWarehouse/waitingForStorage/index.vue

@@ -47,14 +47,53 @@
         >
       </template>
     </el-dialog>
+    <el-dialog
+      title="打印"
+      v-if="printDialog"
+      v-model="printDialog"
+      width="500"
+    >
+      <div id="pdfDom" style="border: 1px solid #000; padding: 10px">
+        <svg id="barCode"></svg>
+        <div>
+          <div
+            style="
+              font: 14px fantasy;
+              font-weight: 700;
+              color: #000;
+              line-height: 32px;
+            "
+          >
+            产品名称:
+          </div>
+          <div
+            style="
+              font: 14px fantasy;
+              font-weight: 700;
+              color: #000;
+              line-height: 32px;
+            "
+          >
+            客户名称:
+          </div>
+        </div>
+      </div>
+      <template #footer>
+        <el-button @click="printDialog = false" size="large">取 消</el-button>
+        <el-button type="primary" v-print="printObj" size="large"
+          >打 印</el-button
+        >
+      </template>
+    </el-dialog>
   </div>
 </template>
 
 <script setup>
-import { computed, ref } from "vue";
+import { computed, nextTick, ref } from "vue";
 import byTable from "@/components/byTable/index";
 import byForm from "@/components/byForm/index";
 import { ElMessage } from "element-plus";
+import JsBarcode from "jsbarcode";
 
 const { proxy } = getCurrentInstance();
 const warehouseList = ref([]);
@@ -173,21 +212,21 @@ const config = computed(() => {
         "min-width": 200,
       },
     },
+
     {
       attrs: {
-        label: "物品Sn",
-        prop: "productSn",
+        label: "规格型号",
+        prop: "productSpec",
         width: 140,
       },
     },
     {
       attrs: {
-        label: "规格型号",
-        prop: "productSpec",
+        label: "物品Sn",
+        prop: "productSn",
         width: 140,
       },
     },
-
     {
       attrs: {
         label: "单位",
@@ -218,7 +257,7 @@ const config = computed(() => {
     {
       attrs: {
         label: "操作",
-        width: "80",
+        width: "160",
         align: "center",
       },
       renderHTML(row) {
@@ -236,6 +275,19 @@ const config = computed(() => {
                 },
               }
             : {},
+          row.businessType == 2
+            ? {
+                attrs: {
+                  label: "打印",
+                  type: "primary",
+                  text: true,
+                },
+                el: "button",
+                click() {
+                  handlePrint(row);
+                },
+              }
+            : {},
         ];
       },
     },
@@ -325,6 +377,13 @@ const formConfig = computed(() => {
     },
     {
       type: "input",
+      prop: "productSpec",
+      label: "规格型号",
+      itemType: "text",
+      disabled: true,
+    },
+    {
+      type: "input",
       prop: "quantity",
       label: "待入库数量",
       itemType: "text",
@@ -425,6 +484,30 @@ const clickOperation = (row) => {
 const onPreviewFile = (file) => {
   window.open(file.raw.fileUrl, "_blank");
 };
+
+const printDialog = ref(false);
+const handlePrint = (row) => {
+  printDialog.value = true;
+  let barCode = row.productSn;
+  nextTick(() => {
+    JsBarcode("#barCode", barCode, {
+      format: "CODE128", //选择要使用的条形码类型
+      text: barCode, //显示文本
+      displayValue: true, //是否在条形码下方显示文字
+      textPosition: "bottom", //设置文本的垂直位置
+      // background: "#eee", //设置条形码的背景
+      font: "fantasy", //设置文本的字体
+      margin: 15, //设置条形码周围的空白边距
+    });
+  });
+};
+const printObj = ref({
+  id: "pdfDom",
+  popTitle: "",
+  extraCss:
+    "https://cdn.bootcdn.net/ajax/libs/animate.css/4.1.1/animate.compat.css, https://cdn.bootcdn.net/ajax/libs/hover.css/2.3.1/css/hover-min.css",
+  extraHead: '<meta http-equiv="Content-Language"content="zh-cn"/>',
+});
 </script>
 
 <style lang="scss" scoped>