瀏覽代碼

险峰打印修改

dengrui 4 天之前
父節點
當前提交
1e0e68092e
共有 3 個文件被更改,包括 19 次插入10 次删除
  1. 1 1
      .env.development
  2. 13 4
      src/views/plan/requisition/exportInfo.vue
  3. 5 5
      src/views/plan/requisition/print.vue

+ 1 - 1
.env.development

@@ -11,6 +11,6 @@ VITE_APP_BASE_API = '/dev-api'
 VITE_APP_UPLOAD_URL = 'http://192.168.101.4:9000'
 # 开发接口地址
 #VITE_APP_API_URL = 'http://192.168.101.4:8078'
-VITE_APP_API_URL = 'http://127.0.0.1:8078'
+VITE_APP_API_URL = 'http://113.44.0.55:8021'
 # 是否启用 Mock 服务
 VITE_MOCK_DEV_SERVER = false

+ 13 - 4
src/views/plan/requisition/exportInfo.vue

@@ -56,6 +56,10 @@ const printData = ref([]);
 const toPrintSet = async () => {
   const { data } = await getPrintInfo(tableRef.value.getSelectionRows());
   printData.value = data;
+  console.log(printData.value, 222);
+  printData.value.forEach((item) => {
+    item.materialCode = "6E05716A8016433CBE3CD18F73575A36";
+  });
   if (printData.value.length > 0) {
     dialog.visible = true;
   } else {
@@ -70,10 +74,15 @@ const router = useRouter();
 onMounted(() => {
   getTableData();
 });
-watch(()=>props.excelRow, () => {  getTableData();
-},{
-  deep:true
-});
+watch(
+  () => props.excelRow,
+  () => {
+    getTableData();
+  },
+  {
+    deep: true,
+  }
+);
 </script>
 <style>
 .btns {

+ 5 - 5
src/views/plan/requisition/print.vue

@@ -60,15 +60,15 @@
             <div class="leftItem">
               <div>
                 <div class="lable">物料编码:</div>
-                <template v-if="item.materialName.length > 15">
+                <template v-if="item.materialCode.length > 18">
                   <div class="value">
-                    {{ item.materialName.slice(0, 14) }}
+                    {{ item.materialCode.slice(0, 17) }}
                   </div>
                   <div class="value">
                     {{
-                      item.materialName.length > 30
-                        ? item.materialName.slice(15, 26) + "..."
-                        : item.materialName.slice(15)
+                      item.materialCode.length > 36
+                        ? item.materialCode.slice(18, 32) + "..."
+                        : item.materialCode.slice(18)
                     }}
                   </div>
                 </template>