Bladeren bron

增加默认模板项

liuyanpeng 2 jaren geleden
bovenliggende
commit
2bf94a73ed

File diff suppressed because it is too large
+ 39 - 0
src/common/template.js


+ 7 - 8
src/customer/printTemp/step1.vue

@@ -70,7 +70,7 @@ const delVisible = ref(false);
 // const visible = ref(false);
 
 const handleChange = (_,val) =>{
-  console.log(val);
+  // console.log(val);
   store.commit('changeTempText',val.value);
   store.commit('changeTemplate',val.x6);
   store.commit('changeTemplateId',val.key);
@@ -79,7 +79,7 @@ const handleChange = (_,val) =>{
 };
 
 const delChange = (_,val) =>{
-  console.log(val);
+  // console.log(val);
   tempId.value = val.key;
 };
 const getTem = () =>{
@@ -95,15 +95,14 @@ const next = () =>{
   if (value.value == 'a') {
     store.commit('changeTemplateId','');
     store.commit('changeTemplate','');
-    store.commit('changeTempText','新建模版');
-    
+    store.commit('changeTempText','新建模板');
   }
   if ((value.value == 'b' && temVal.value == undefined || null) || value.value == 'c') {
     Modal.info({
       title: '提示',
       content: h('div', {}, [h('p', '请先选择模版或新建模板!')]),
       onOk() {
-        console.log('ok');
+        // console.log('ok');
       },
     });
     return;
@@ -132,7 +131,7 @@ const delOk = () =>{
         title: '提示',
         content: h('div', {}, [h('p', '删除成功!')]),
         onOk() {
-          console.log('ok');
+          // console.log('ok');
           delTemVal.value = undefined;
           temVal.value = undefined;
           getTemp();
@@ -160,14 +159,14 @@ const getTemp = () =>{
       loadingshow.value = false;
       if (errorCode == 0) {
         TempList.value = datas;
-        console.log(datas);
+        // console.log(datas);
       }else{
         TempList.value = [];
         Modal.info({
           title: '提示',
           content: h('div', {}, [h('p', '没有基础模版,请新建模版数据!')]),
           onOk() {
-            console.log('ok');
+            // console.log('ok');
             delTemVal.value = undefined;
             temVal.value = undefined;
             TempList.value = [];

File diff suppressed because it is too large
+ 295 - 145
src/customer/printTemp/step2.vue


+ 14 - 37
src/print/PrintCard.vue

@@ -62,7 +62,8 @@
           />
           <a-button type="primary" @click="searchPrintInfo">查询</a-button>
         </div>
-        <div style="margin: 8px 0 0 9px">
+        <div style="margin-top: 8px">
+          <span style="color: red"> * </span>
           <label>打印模板:</label>
           <a-select
             v-model:value="printTemplate"
@@ -168,29 +169,14 @@
         </a-modal>
         <a-modal
           v-model:visible="imageVisible"
-          title="打印预览"
-          ok-text="确认"
-          cancel-text="取消"
-          mask-closable="false"
-          keyboard="false"
-          closable="false"
+          title="效果预览"
+          :mask-closable="false"
           :body-style="bodyStyle"
-          @ok="imageVisible = false"
         >
           <a-image :src="imageUrls[0]" />
           <template #footer />
         </a-modal>
         <Loading v-if="globalLoading" />
-        <a-modal
-          v-model:visible="modelVisible"
-          title="正在打印中"
-          mask-closable="false"
-          keyboard="false"
-          closable="false"
-        >
-          <p>正在打印中,请稍等....</p>
-          <template #footer />
-        </a-modal>
       </div>
     </div>
     <div ref="hua" style="float: left; z-index: -999" />
@@ -217,7 +203,6 @@ import {
 const className = ref('com.leanwo.prodog.print.model.LabelPrintLine');
 const tables = ref(null);
 const imageUrls = reactive([]);
-const modelVisible = ref(false);
 const printing = ref(true);
 const total = ref(0);
 const isSelect = ref(true);
@@ -320,13 +305,6 @@ const searchPrintInfo = () => {
       },
     );
   } else {
-    message.warning('请选择导入批次');
-    status.value = '';
-    dataSource.value = [];
-    queryParams.clientName = '';
-    queryParams.costCenterName = '';
-    queryParams.depositoryUser = '';
-    queryParams.organizationName = '';
     isLoading.value = false;
   }
 };
@@ -349,7 +327,7 @@ const showPrintInfo = () => {
     newPackageName.value = nameArr.join('-');
     packageBatchNo.value = dateConvert(new Date());
   } else {
-    message.warning('请检查是否已选择导入批次模板!');
+    message.warning('请检查是否已选择导入批次模板!');
   }
 };
 // 同上一次包装信息
@@ -393,7 +371,7 @@ const printPreview = async () => {
     imageUrls.push(base64);
     printing.value = true;
   } else {
-    message.warning('请检查是否已选择导入批次模板!');
+    message.warning('请检查是否已选择导入批次模板!');
   }
 };
 
@@ -401,7 +379,6 @@ const printPreview = async () => {
 const printCard = async data => {
   if (data.length !== 0) {
     printVisible.value = false;
-    modelVisible.value = true;
     globalLoading.value = true;
     printing.value = false;
     const formData = new FormData();
@@ -424,7 +401,6 @@ const printCard = async data => {
         } else {
           message.error('资产生产图片失败');
         }
-        modelVisible.value = false;
         globalLoading.value = false;
         printing.value = true;
         all.value = false;
@@ -433,7 +409,6 @@ const printCard = async data => {
       },
       errorData => {
         Common.processException(errorData);
-        modelVisible.value = false;
         globalLoading.value = false;
 
         printing.value = true;
@@ -484,6 +459,12 @@ watch(
     if (newVal !== oldVal) {
       tables.value.clear();
     }
+    if (newVal !== '') {
+      commonSqlApi('20230613_192444', depositoryUsers); // 查询保管人
+      commonSqlApi('20230613_193808', clientNames); // 查询公司
+      commonSqlApi('20230613_194108', organizationNames); // 查询部门
+      commonSqlApi('20230613_194557', costCenterNames); // 查询成本中心
+    }
   },
 );
 onMounted(() => {
@@ -495,7 +476,7 @@ onMounted(() => {
 // 封装通用sqlApi请求函数
 const commonSqlApi = (url, data) => {
   clientId.value = JSON.parse(localStorage.getItem('#LoginInfo')).loginClientId;
-  let params = { clientId: clientId.value };
+  let params = { clientId: clientId.value, batchNo: queryParams.batchNo };
   SqlApi.execute(url, params).then(
     successData => {
       if (successData.errorCode == 0) {
@@ -522,10 +503,6 @@ const init = () => {
   getTemplate().then(res => {
     allTemplate.value = res.datas;
   });
-  commonSqlApi('20230613_192444', depositoryUsers); // 查询保管人
-  commonSqlApi('20230613_193808', clientNames); // 查询公司
-  commonSqlApi('20230613_194108', organizationNames); // 查询部门
-  commonSqlApi('20230613_194557', costCenterNames); // 查询成本中心
   // 查询批次号
   SqlApi.execute('20230613_134214', params).then(
     successData => {
@@ -562,7 +539,7 @@ const init = () => {
   SqlApi.execute('20230613_194855', params).then(
     successData => {
       if (successData.errorCode == 0) {
-        const { packageName, packageBatchNo } = successData.lines;
+        const { packageName, packageBatchNo } = successData.lines[0];
         lastPackageName.value = packageName;
         lastPackageBatchNo.value = packageBatchNo;
       } else {

+ 0 - 1
src/window/attachment/AttachmentPanel.vue

@@ -196,7 +196,6 @@ export default {
 
       AttachmentService.getFileProperties(data).then(
         successData => {
-          console.log(successData, '============222222========');
           _self.fileProperties.splice(0, _self.fileProperties.length);
           if (successData == undefined || successData.length == 0) {
             return;

+ 0 - 1
src/window/attachment/AttachmentUpload.vue

@@ -142,7 +142,6 @@ export default {
       AttachmentService.uploadAttachment(formData).then(successData => {
         _self.loading=false;
         if (successData.errorCode == 0) {
-          console.log(successData,'22222222222222');
           Notify.success(_self.$t('lang.attachmentUpload.uploadSucceeded'), _self.$t('lang.attachmentUpload.attachmentUploadedSuccessfully'), true);
         }
         if (successData.errorCode == 1) {

Some files were not shown because too many files changed in this diff