2213980799@qq.com 1 год назад
Родитель
Сommit
d31b090eff

+ 18 - 15
src/components/addDoc/browse.vue

@@ -35,21 +35,24 @@ export default {
     },
     setFileUrl(row) {
       let file = row.storagePath[0];
-      let url = sessionStorage.filePath + file.storePath;
-      const fileExt = file.name.substr(file.name.lastIndexOf('.') + 1);
-      this.fileType = getFileType().includes(fileExt) ? 2 : 1;
-      if (this.fileType == 2) {
-        this.fileUrl =
-          '/fm/' +
-          (['dxf', 'dwg'].includes(fileExt) ? '2DViewer' : '3DViewer') +
-          '/view.html?url=' +
-          sessionStorage.filePath +
-          '/' +
-          row.outputNdsFiles;
-      } else {
-        this.fileUrl = '/kkfile/onlinePreview?url=' + btoa(url);
-        // 'http://192.168.1.107:18082/kkfile/onlinePreview?url=' + btoa(url);
-      }
+      let fileNames=file.storePath.split('/')
+      let url = window.location.origin+'/api/main/file/getFile?objectName='+file.storePath+'&fullfilename='+fileNames[fileNames.length-1]
+      this.fileUrl = '/kkfile/onlinePreview?url=' + btoa(url);
+      
+      // const fileExt = file.name.substr(file.name.lastIndexOf('.') + 1);
+      // this.fileType = getFileType().includes(fileExt) ? 2 : 1;
+      // if (this.fileType == 2) {
+      //   this.fileUrl =
+      //     '/fm/' +
+      //     (['dxf', 'dwg'].includes(fileExt) ? '2DViewer' : '3DViewer') +
+      //     '/view.html?url=' +
+      //     sessionStorage.filePath +
+      //     '/' +
+      //     row.outputNdsFiles;
+      // } else {
+      //   this.fileUrl = '/kkfile/onlinePreview?url=' + btoa(url);
+      //   // 'http://192.168.1.107:18082/kkfile/onlinePreview?url=' + btoa(url);
+      // }
     }
   }
 };

+ 20 - 5
src/views/saleManage/contact/components/addContactDialog.vue

@@ -46,7 +46,15 @@
               </el-form-item>
             </el-col>
             <el-col :span="8">
-              <el-form-item label="客户代号" prop="serialNo">
+              <el-form-item
+                label="客户代号"
+                prop="serialNo"
+                :rules="{
+                  required: clientEnvironmentId!=4?true:false,
+                  message: '请输入',
+                  trigger: 'change'
+                }"
+              >
                 <el-input
                   placeholder="请输入"
                   v-model="form.serialNo"
@@ -958,9 +966,7 @@ export default {
         categoryId: [
           { required: true, message: '请选择客户分类', trigger: 'change' }
         ],
-        serialNo: [
-          { required: true, message: '请输入客户代号', trigger: 'change' }
-        ],
+
         name: [{ required: true, message: '请输入客户名称', trigger: 'blur' }],
         authorizationLimit: [
           { required: true, message: '请输入授信额度', trigger: 'blur' }
@@ -996,6 +1002,11 @@ export default {
   created() {
     this.getGroupAll();
   },
+  computed: {
+    clientEnvironmentId() {
+      return this.$store.state.user.info.clientEnvironmentId;
+    }
+  },
   watch: {
     categoryIdList(val) {
       if (val.length > 0) {
@@ -1164,7 +1175,11 @@ export default {
       });
     },
     getValidate() {
-      return Promise.all([this.formValid(), this.otherFormValid(),this.tableLinkDataValid()]);
+      return Promise.all([
+        this.formValid(),
+        this.otherFormValid(),
+        this.tableLinkDataValid()
+      ]);
     },
 
     async pageChange(type) {

+ 15 - 4
src/views/saleManage/contact/components/drawer.vue

@@ -15,8 +15,8 @@
       >
     </div>
 
-    <div class="ele-body" style="height:100%">
-      <div style="width: calc(100% - 350px);height:100%">
+    <div class="ele-body" style="height: 100%">
+      <div style="width: calc(100% - 350px); height: 100%">
         <headerTitle title="摘要卡片" style="margin-top: 15px"></headerTitle>
 
         <div class="card">
@@ -26,7 +26,11 @@
           <span> 退款总额:</span>
           <span>待回款总额:</span>
         </div>
-        <el-tabs v-model="activeName" type="border-card" style="height: calc(100% - 124px)">
+        <el-tabs
+          v-model="activeName"
+          type="border-card"
+          style="height: calc(100% - 124px)"
+        >
           <el-tab-pane label="详细信息" name="详细信息">
             <contactInfo ref="contactInfoRef"></contactInfo>
           </el-tab-pane>
@@ -100,7 +104,10 @@
         </el-tabs>
       </div>
 
-      <el-card class="box-card" style="width: 350px; margin-left: 15px;height:100%">
+      <el-card
+        class="box-card"
+        style="width: 350px; margin-left: 15px; height: 100%"
+      >
         <div slot="header" class="clearfix">
           <span>客户动态</span>
           <el-button
@@ -295,4 +302,8 @@ export default {
     color: #40a9ff;
   }
 }
+:deep(.el-card__body) {
+  overflow: auto;
+  height: calc(100% - 51px);
+}
 </style>

+ 24 - 10
src/views/saleManage/saleOrder/components/addDialog.vue

@@ -70,6 +70,7 @@
             />
           </el-form-item>
         </el-col>
+   
         <el-col :span="12">
           <el-form-item label="选择合同" prop="contractName">
             <el-input
@@ -78,6 +79,7 @@
               @click.native="handleContractBtn"
               @clear="clearContrcat"
               placeholder="请选择"
+              :disabled="!!projectData.contractId"
             />
           </el-form-item>
           <el-form-item label="合同编号" prop="contractNumber">
@@ -126,7 +128,8 @@
               v-model="form.partaName"
               @click.native="handParent"
               placeholder="请选择"
-              :disabled="!!contactData?.id"
+              :disabled="!!contactData?.id||!!projectData.contactId"
+     
             />
           </el-form-item>
           <el-form-item
@@ -336,6 +339,8 @@ import fileUpload from '@/components/upload/fileUpload';
 import dictMixins from '@/mixins/dictMixins';
 import parentList from '@/views/saleManage/contact/components/parentList.vue';
 import { getDetail } from '@/api/contractManage/contractBook';
+import { contactDetail } from '@/api/saleManage/contact';
+
 import {
   getSaleOrderDetail,
   UpdateInformation,
@@ -363,11 +368,11 @@ export default {
     inventoryTable,
     parentList
   },
-  props:{
+  props: {
     contactData: {
       type: Object,
       default: () => {
-        return {}
+        return {};
       }
     }
   },
@@ -411,6 +416,7 @@ export default {
     };
 
     return {
+    projectData:{},//项目数据
       clearing: false, //是否清除合同
       payWayOptions: [],
       delDetailIds: [],
@@ -735,16 +741,24 @@ export default {
       this.$refs.selectContractRef.open(item);
     },
     //选择项目回调
-    changeProject(obj) {
+    async changeProject(obj) {
+      this.projectData=obj
       this.form = Object.assign({}, this.form, {
         projectName: obj.name,
         projectId: obj.id,
-        contractId: obj.contractId,
-        contractName: obj.contractName
+
       });
+
       if (obj.contractId) {
-        this.getDetailData(obj.contractId);
-        this.$store.commit('order/setContractId', obj.contractId);
+        this.changeContract({
+          id: obj.contractId,
+          contractName: obj.contractName
+        });
+      } else if (obj.contactId) {
+        const data = await contactDetail(obj.contactId);
+        if (data.base?.id) {
+          this.changeParent(data.base);
+        }
       }
     },
     //选择项目弹框
@@ -818,8 +832,8 @@ export default {
           this.form.partbFax = this.enterprisePage[0].fax;
           this.form.partbAddress = this.enterprisePage[0].address;
         }
-        if(this.contactData.id){
-          this.changeParent(this.contactData)
+        if (this.contactData.id) {
+          this.changeParent(this.contactData);
         }
       } else {
         this.isUpdate = true;

+ 1 - 1
src/views/saleManage/saleOrder/components/darwerComponents/materialReturn/index.vue

@@ -34,7 +34,7 @@
 
 <script>
   import { returnPage } from '@/api/mes/materialReturn.js';
-
+  import {getByCode} from "@/api/system/dictionary-data";
   import returnSearch from './return-search.vue';
 
   // import returnPop from './returnPop.vue';

+ 2 - 1
src/views/saleManage/saleOrder/components/drawer.vue

@@ -66,10 +66,11 @@
             :key="row.id"
           ></receivableManage>
         </el-tab-pane>
-        <el-tab-pane label="审批流程" name="审批流程">
+        <el-tab-pane label="审批流程" name="审批流程" v-if="row.processInstanceId">
           <bpmDetail
             v-if="row.processInstanceId"
             :id="row.processInstanceId"
+            :key="row.id"
           ></bpmDetail>
         </el-tab-pane>
       </el-tabs>

+ 263 - 148
src/views/saleManage/saleOrder/components/inventoryTable.vue

@@ -60,8 +60,7 @@
                 @blur="discountInputByOrder(form.discountTotalPrice)"
               >
                 <template slot="append">元</template>
-              </el-input
-              >
+              </el-input>
             </el-form-item>
           </div>
         </div>
@@ -84,25 +83,34 @@
           ></el-input>
         </el-form-item>
       </template>
-      <template v-slot:headerCustomerMark="{ column }">
+      <template v-if="clientEnvironmentId!=4" v-slot:headerCustomerMark="{ column }">
         <span class="is-required">{{ column.label }}</span>
       </template>
       <template v-slot:customerMark="{ row, $index }">
         <el-form-item
           :prop="'datasource.' + $index + '.customerMark'"
           :rules="{
-            required: true,
+            required: clientEnvironmentId!=4?true:false,
             message: '请输入',
             trigger: 'change'
-          }">
+          }"
+        >
           <el-input v-model="row.customerMark" placeholder="请输入"></el-input>
         </el-form-item>
       </template>
       <template v-slot:entrustedEnterpriseId="scope">
         <el-form-item prop="entrustedEnterpriseId">
-          <el-select v-model="scope.row['entrustedEnterpriseId']" clearable filterable>
-            <el-option v-for="i in scope.row.entrustedEnterpriseIdList" :key="i.id" :value="i.id"
-                       :label="i.name"></el-option>
+          <el-select
+            v-model="scope.row['entrustedEnterpriseId']"
+            clearable
+            filterable
+          >
+            <el-option
+              v-for="i in scope.row.entrustedEnterpriseIdList"
+              :key="i.id"
+              :value="i.id"
+              :label="i.name"
+            ></el-option>
           </el-select>
         </el-form-item>
       </template>
@@ -115,7 +123,11 @@
           style="margin-bottom: 20px"
           :prop="'datasource.' + scope.$index + '.productCode'"
         >
-          <el-input :disabled="isContractId" v-model="scope.row.productCode" disabled></el-input>
+          <el-input
+            :disabled="isContractId"
+            v-model="scope.row.productCode"
+            disabled
+          ></el-input>
         </el-form-item>
       </template>
       <template v-slot:productCategoryName="scope">
@@ -134,7 +146,7 @@
             required: pageName == 'businessOpportunity' ? false : true,
             pattern: positiveIntegerReg,
             message: '请正确输入数量',
-            trigger: ['blur','change']
+            trigger: ['blur', 'change']
           }"
         >
           <!--  :prop="'datasource.' + scope.$index + '.totalCount'"
@@ -150,7 +162,7 @@
             :disabled="isContractId"
             v-model="scope.row.totalCount"
             placeholder="请输入"
-            @input="changeCount(scope.row,scope.$index)"
+            @input="changeCount(scope.row, scope.$index)"
           ></el-input>
         </el-form-item>
       </template>
@@ -162,8 +174,11 @@
       </template>
       <template
         v-slot:headerSingleWeight="{ column }"
-        v-if="pageName != 'businessOpportunity'">
-        <span :class="{'is-required':pricingWay==2}">{{ column.label }}</span>
+        v-if="pageName != 'businessOpportunity'"
+      >
+        <span :class="{ 'is-required': pricingWay == 2 }">{{
+          column.label
+        }}</span>
       </template>
       <template v-slot:totalPrice="scope">
         <el-form-item
@@ -349,7 +364,11 @@
             :showLib="false"
             :limit="5"
           />
-          <div v-else-if="scope.row.technicalDrawings && scope.row.technicalDrawings?.length">
+          <div
+            v-else-if="
+              scope.row.technicalDrawings && scope.row.technicalDrawings?.length
+            "
+          >
             <el-link
               v-for="link in scope.row.technicalDrawings"
               :key="link.id"
@@ -358,8 +377,7 @@
               @click="downloadFile(link)"
             >
               {{ link.name }}
-            </el-link
-            >
+            </el-link>
           </div>
         </el-form-item>
       </template>
@@ -375,7 +393,11 @@
             :showLib="false"
             :limit="5"
           />
-          <div v-else-if="scope.row.customerReqFiles && scope.row.customerReqFiles?.length">
+          <div
+            v-else-if="
+              scope.row.customerReqFiles && scope.row.customerReqFiles?.length
+            "
+          >
             <el-link
               v-for="link in scope.row.customerReqFiles"
               :key="link.id"
@@ -384,8 +406,7 @@
               @click="downloadFile(link)"
             >
               {{ link.name }}
-            </el-link
-            >
+            </el-link>
           </div>
         </el-form-item>
       </template>
@@ -406,7 +427,11 @@
             :showLib="false"
             :limit="5"
           />
-          <div v-else-if="scope.row.industryArtFiles && scope.row.industryArtFiles?.length">
+          <div
+            v-else-if="
+              scope.row.industryArtFiles && scope.row.industryArtFiles?.length
+            "
+          >
             <el-link
               v-for="link in scope.row.industryArtFiles"
               :key="link.id"
@@ -415,8 +440,7 @@
               @click="downloadFile(link)"
             >
               {{ link.name }}
-            </el-link
-            >
+            </el-link>
           </div>
         </el-form-item>
       </template>
@@ -441,8 +465,7 @@
               @click="downloadFile(link)"
             >
               {{ link.name }}
-            </el-link
-            >
+            </el-link>
           </div>
         </el-form-item>
       </template>
@@ -500,10 +523,10 @@
         <el-form-item
           style="margin-bottom: 20px"
           :rules="{
-                      required: pricingWay==2,
-                      pattern: numberReg,
-                      trigger: ['change','blur']
-                    }"
+            required: pricingWay == 2,
+            pattern: numberReg,
+            trigger: ['change', 'blur']
+          }"
           :prop="'datasource.' + scope.$index + '.singleWeight'"
         >
           <!--          :rules="{
@@ -515,7 +538,7 @@
           <el-input
             :disabled="isContractId"
             v-model="scope.row.singleWeight"
-            @input="singleWeightChange(scope.row,scope.$index)"
+            @input="singleWeightChange(scope.row, scope.$index)"
             placeholder="请输入"
           ></el-input>
         </el-form-item>
@@ -537,7 +560,19 @@
           ></el-input>
         </el-form-item>
       </template>
-
+      <template v-slot:blockCount="scope">
+        <el-form-item
+          :prop="'datasource.' + scope.$index + '.blockCount'"
+          :rules="[{ required: true, message: '请输入', trigger: 'blur' }]"
+        >
+          <el-input
+            v-model="scope.row.blockCount"
+            @input="
+              (val) => tableHandleKeyUp(scope.row, scope.$index, 'blockCount')
+            "
+          ></el-input>
+        </el-form-item>
+      </template>
       <!-- 操作列 -->
       <template v-slot:action="{ row }">
         <el-popconfirm
@@ -546,7 +581,12 @@
           @confirm="remove(row)"
         >
           <template v-slot:reference>
-            <el-link type="danger" v-if="!isContractId" :underline="false" icon="el-icon-delete">
+            <el-link
+              type="danger"
+              v-if="!isContractId"
+              :underline="false"
+              icon="el-icon-delete"
+            >
               删除
             </el-link>
           </template>
@@ -567,15 +607,15 @@
   </el-form>
 </template>
 <script>
-import {numberReg, positiveIntegerReg} from 'ele-admin';
+import { numberReg, positiveIntegerReg } from 'ele-admin';
 import productList from '@/BIZComponents/product-list.vue';
 import dictMixins from '@/mixins/dictMixins';
 import fileUpload from '@/components/upload/fileUpload';
 import headList from '@/BIZComponents/user-select/user-select.vue';
 import ProductionVersion from '@/components/ProductionVersion2/index.vue';
-import {getFile} from "@/api/system/file";
-import {getByCode} from "@/api/system/dictionary-data";
-import {contactQueryByCategoryIdsAPI} from "@/api/saleManage/contact";
+import { getFile } from '@/api/system/file';
+import { getByCode } from '@/api/system/dictionary-data';
+import { contactQueryByCategoryIdsAPI } from '@/api/saleManage/contact';
 
 const dayjs = require('dayjs');
 
@@ -585,7 +625,7 @@ export default {
     productList,
     fileUpload,
     headList,
-    ProductionVersion,
+    ProductionVersion
   },
   props: {
     pageName: {
@@ -621,8 +661,8 @@ export default {
     },
     customerMark: {
       type: [Number, String],
-      default:''
-    },
+      default: ''
+    }
   },
   data() {
     const defaultForm = {
@@ -645,8 +685,19 @@ export default {
         datasource: []
       },
       rules: {},
-      dictList: {},
-      columns: [
+      dictList: {}
+    };
+  },
+  computed: {
+    canHandl() {
+      return this.form.datasource.length;
+    },
+    clientEnvironmentId() {
+      console.log(this.$store.state.user.info.clientEnvironmentId,'this.$store.state.user.info.clientEnvironmentId')
+      return this.$store.state.user.info.clientEnvironmentId;
+    },
+    columns() {
+      return [
         {
           width: 45,
           type: 'index',
@@ -660,14 +711,14 @@ export default {
           label: '名称',
           slot: 'productName',
           headerSlot: 'headerProductName',
-          align: "center"
+          align: 'center'
         },
         {
           width: 120,
           prop: 'productCode',
           label: '编码',
           slot: 'productCode',
-          align: "center"
+          align: 'center'
         },
 
         {
@@ -676,14 +727,14 @@ export default {
           label: '数量',
           slot: 'totalCount',
           headerSlot: 'headerTotalCount',
-          align: "center"
+          align: 'center'
         },
         {
           width: 120,
           prop: 'measuringUnit',
           label: '计量单位',
           slot: 'measuringUnit',
-          align: "center"
+          align: 'center'
         },
         {
           width: 100,
@@ -692,19 +743,27 @@ export default {
           slot: 'availableCountBase',
           align: 'center'
         },
+        {
+          width: 120,
+          prop: 'blockCount',
+          label: '块数',
+          slot: 'blockCount',
+          align: 'center',
+          show: this.clientEnvironmentId == '4'
+        },
         {
           width: 150,
           prop: 'singlePrice',
           label: '单价',
           slot: 'singlePrice',
           headerSlot: 'headerSinglePrice',
-          align: "center"
+          align: 'center'
         },
         {
           width: 120,
           prop: 'discountSinglePrice',
           label: '折让单价',
-          align: "center",
+          align: 'center',
           formatter: (_row, _column, cellValue) => {
             return _row.discountSinglePrice
               ? Number(_row.discountSinglePrice).toFixed(2)
@@ -716,13 +775,13 @@ export default {
           prop: 'totalPrice',
           label: '合计',
           slot: 'totalPrice',
-          align: "center"
+          align: 'center'
         },
         {
           width: 100,
           prop: 'discountTotalPrice',
           label: '折让合计',
-          align: "center",
+          align: 'center',
           formatter: (_row, _column, cellValue) => {
             return _row.discountTotalPrice
               ? Number(_row.discountTotalPrice).toFixed(2)
@@ -736,7 +795,7 @@ export default {
           slot: 'customerMark',
           headerSlot: 'headerCustomerMark',
           show: this.isCustomerMark,
-          align: "center"
+          align: 'center'
         },
         {
           minWidth: 120,
@@ -744,7 +803,7 @@ export default {
           label: '受托企业',
           slot: 'entrustedEnterpriseId',
           show: this.isCustomerMark,
-          align: "center"
+          align: 'center'
         },
         {
           width: 160,
@@ -752,7 +811,7 @@ export default {
           label: this.contractBookType == 1 ? '客户期望交期' : '交付日期',
           slot: 'customerExpectDeliveryDeadline',
           headerSlot: 'headerCustomerExpectDeliveryDeadline',
-          align: "center"
+          align: 'center'
         },
         {
           width: 120,
@@ -760,49 +819,49 @@ export default {
           label: '单重',
           slot: 'singleWeight',
           headerSlot: 'headerSingleWeight',
-          align: "center"
+          align: 'center'
         },
         {
           width: 100,
           prop: 'totalWeight',
           label: '总重',
           slot: 'totalWeight',
-          align: "center"
+          align: 'center'
         },
         {
           width: 100,
           prop: 'weightUnit',
           label: '重量单位',
           slot: 'weightUnit',
-          align: "center"
+          align: 'center'
         },
         {
           width: 120,
           prop: 'productCategoryName',
           label: '类型',
           slot: 'productCategoryName',
-          align: "center"
+          align: 'center'
         },
         {
           width: 120,
           prop: 'productBrand',
           label: '牌号',
           slot: 'productBrand',
-          align: "center"
+          align: 'center'
         },
         {
           width: 120,
           prop: 'modelType',
           label: '型号',
           slot: 'modelType',
-          align: "center"
+          align: 'center'
         },
         {
           width: 120,
           prop: 'specification',
           label: '规格',
           slot: 'specification',
-          align: "center"
+          align: 'center'
         },
         {
           width: 120,
@@ -818,7 +877,11 @@ export default {
           label: '生产类型',
           showOverflowTooltip: true,
           formatter: (row, column) => {
-            return row.produceType && row.produceType.length ? row.produceType.map(item => this.getDictV('productionType', item + '')).join(',') : ''
+            return row.produceType && row.produceType.length
+              ? row.produceType
+                  .map((item) => this.getDictV('productionType', item + ''))
+                  .join(',')
+              : '';
           }
         },
         {
@@ -855,7 +918,7 @@ export default {
           label: '生产交付交期',
           slot: 'produceDeliveryDeadline',
           show: this.contractBookType == 1 ? true : false,
-          align: "center"
+          align: 'center'
         },
 
         {
@@ -863,7 +926,7 @@ export default {
           prop: 'guaranteePeriod',
           label: '质保期',
           slot: 'guaranteePeriod',
-          align: "center"
+          align: 'center'
         },
         {
           width: 200,
@@ -871,7 +934,7 @@ export default {
           label: '质保期截止日期',
           slot: 'guaranteePeriodDeadline',
           show: this.isGuaranteePeriod,
-          align: "center"
+          align: 'center'
         },
         // {
         //   width: 120,
@@ -884,28 +947,28 @@ export default {
           prop: 'customerReqFiles',
           label: '客户需求',
           slot: 'customerReqFiles',
-          align: "center"
+          align: 'center'
         },
         {
           width: 130,
           prop: 'technicalAnswerName',
           label: '技术答疑人',
           slot: 'technicalAnswerName',
-          align: "center"
+          align: 'center'
         },
         {
           width: 220,
           prop: 'technicalParams',
           label: '技术参数',
           slot: 'technicalParams',
-          align: "center"
+          align: 'center'
         },
         {
           width: 240,
           prop: 'technicalDrawings',
           label: '技术图纸',
           slot: 'technicalDrawings',
-          align: "center"
+          align: 'center'
         },
         {
           width: 240,
@@ -913,29 +976,28 @@ export default {
           label: '工艺路线',
           slot: 'technologyRouteName',
           show: this.contractBookType == 1 ? true : false,
-          align: "center"
-
+          align: 'center'
         },
         {
           width: 240,
           prop: 'industryArtFiles',
           label: '工艺附件',
           slot: 'industryArtFiles',
-          align: "center"
+          align: 'center'
         },
         {
           width: 240,
           prop: 'otherFiles',
           label: '其他附件',
           slot: 'otherFiles',
-          align: "center"
+          align: 'center'
         },
         {
           width: 220,
           prop: 'remark',
           label: '备注',
           slot: 'remark',
-          align: "center"
+          align: 'center'
         },
         {
           columnKey: 'action',
@@ -947,12 +1009,7 @@ export default {
           fixed: 'right',
           showOverflowTooltip: true
         }
-      ]
-    };
-  },
-  computed: {
-    canHandl() {
-      return this.form.datasource.length;
+      ];
     }
   },
 
@@ -970,36 +1027,54 @@ export default {
     }
   },
   created() {
-    this.getDictList('productionType')
+    this.getDictList('productionType');
   },
   methods: {
     getDictV(code, val) {
       if (!this.dictList[code]) return '';
-      return this.dictList[code].find(item => item.value == val)?.label
+      return this.dictList[code].find((item) => item.value == val)?.label;
     },
     async getDictList(code) {
-      let {data: res} = await getByCode(code)
-      this.dictList[code] = res.map(item => {
-        let values = Object.keys(item)
+      let { data: res } = await getByCode(code);
+      this.dictList[code] = res.map((item) => {
+        let values = Object.keys(item);
         return {
           value: values[0],
           label: item[values[0]]
-        }
-      })
+        };
+      });
     },
     downloadFile(file) {
-      getFile({objectName: file.storePath}, file.name);
+      getFile({ objectName: file.storePath }, file.name);
     },
     openVersion(index) {
       this.$refs.versionRefs.open(index);
     },
+    // 表格:模数、数量(方)、块数输入框 输入事件
+    tableHandleKeyUp(row, index, name) {
+      console.log(row, 'row');
+      // && this.clientEnvironmentId == '4'
+      if (row.specification && this.clientEnvironmentId == '4') {
+        let modelArr = row.specification.split('*');
+        let modelLong = modelArr[0]; // model规格长度
+        let modeWide = modelArr[1]; // model规格宽度
+        let modeHight = modelArr[2].substr(0, modelArr[2].indexOf('cm')); // model规格高度
+        modeHight = Number(modeHight);
+        if (name === 'sum') {
+          row.blockCount = Math.floor(
+            row.totalCount / ((modelLong * modeWide * modeHight) / 1000000)
+          );
+        } else if (name === 'blockCount') {
+          row.totalCount =
+            (Number(row.blockCount) * modelLong * modeWide * modeHight) /
+            1000000;
+          this.changeCount(row.totalCount, index, 'tableHandleKeyUp');
+        }
+      }
+    },
     //工艺路线
     changeProduct(data, index) {
-      this.$set(
-        this.form.datasource[index],
-        'technologyRouteName',
-        data.name
-      );
+      this.$set(this.form.datasource[index], 'technologyRouteName', data.name);
       this.$set(this.form.datasource[index], 'technologyRouteId', data.id);
     },
     setDeliveryDays(row, index, type, isAll) {
@@ -1052,10 +1127,10 @@ export default {
       return code == 3
         ? 'day'
         : code == 4
-          ? 'month'
-          : code == 5
-            ? 'year'
-            : 'second';
+        ? 'month'
+        : code == 5
+        ? 'year'
+        : 'second';
     },
     setDay(addDay, dateType = 'day') {
       return dayjs(this.contractStartDate || new Date())
@@ -1068,7 +1143,10 @@ export default {
       if (comitDatasource.length === 0) return [];
       comitDatasource.forEach((v) => {
         if (v.guaranteePeriodUnitCode) {
-          v.guaranteePeriodUnitName = this.getDictValue('保质期单位', v.guaranteePeriodUnitCode);
+          v.guaranteePeriodUnitName = this.getDictValue(
+            '保质期单位',
+            v.guaranteePeriodUnitCode
+          );
         }
         v.technicalDrawings = v.technicalDrawings ? v.technicalDrawings : [];
         v.customerReqFiles = v.customerReqFiles || [];
@@ -1081,46 +1159,61 @@ export default {
       return [this.allPrice, this.form.discountTotalPrice];
     },
     //改变数量
-    changeCount(row, index) {
+    changeCount(row, index, type) {
       this.singleWeightChange(row, index);
-      this.getTotalPrice()
+      this.getTotalPrice();
+      if (type != 'tableHandleKeyUp') {
+        this.tableHandleKeyUp(this.form.datasource[index], index, 'sum');
+      }
     },
     //计算总金额
     getTotalPrice(row) {
       if (this.form.datasource.length) {
         let sum = 0;
-        sum = this.getNumTotalPrice()
+        sum = this.getNumTotalPrice();
         let allsum = sum.toFixed(2);
         this.allPrice = allsum;
         this.form.discountTotalPrice = allsum;
         this.$store.commit('concact/setDiscountAmount', allsum);
         this.$store.commit('order/setAllcountAmount', allsum);
-        this.$emit('orderDiscountAmount', this.allPrice)
-        this.$refs.table.reload()
+        this.$emit('orderDiscountAmount', this.allPrice);
+        this.$refs.table.reload();
         return allsum;
       } else {
         this.allPrice = 0.0;
         this.form.discountTotalPrice = 0.0;
-        this.$emit('orderDiscountAmount', 0)
+        this.$emit('orderDiscountAmount', 0);
         return 0.0;
       }
     },
     //计算总金额
     getNumTotalPrice(sum = 0) {
       this.form.datasource.forEach((r, index) => {
-        this.$set(r, 'discountSinglePrice', r.singlePrice ? Number(r.singlePrice) : '')
+        this.$set(
+          r,
+          'discountSinglePrice',
+          r.singlePrice ? Number(r.singlePrice) : ''
+        );
         if (r.singlePrice && r.totalCount) {
           r.totalPrice = this.getAllPrice(r);
           r.discountTotalPrice = this.getDiscountTotalPrice(r);
-          this.$set(this.form.datasource[index], 'totalPrice', Number(r.totalPrice))
-          this.$set(this.form.datasource[index], 'discountTotalPrice', Number(r.discountTotalPrice))
+          this.$set(
+            this.form.datasource[index],
+            'totalPrice',
+            Number(r.totalPrice)
+          );
+          this.$set(
+            this.form.datasource[index],
+            'discountTotalPrice',
+            Number(r.discountTotalPrice)
+          );
           sum += Number(r.totalPrice);
         } else {
-          this.$set(r, 'totalPrice', '')
-          this.$set(r, 'discountTotalPrice', '')
+          this.$set(r, 'totalPrice', '');
+          this.$set(r, 'discountTotalPrice', '');
         }
       });
-      return isNaN(sum) ? 0 : sum
+      return isNaN(sum) ? 0 : sum;
     },
     //更新优惠后总金额
     discountInput(val) {
@@ -1128,65 +1221,77 @@ export default {
     },
     //设置优惠后总金额修改产品单价
     discountInputByOrder(val) {
-      this.form.discountTotalPrice = val
+      this.form.discountTotalPrice = val;
       //获取优惠金额和总计的差价
       this.form.datasource.forEach((item) => {
         if (val === 0) {
-          item.discountTotalPrice = 0
-          item.discountSinglePrice = 0
-          return
+          item.discountTotalPrice = 0;
+          item.discountSinglePrice = 0;
+          return;
         }
         if (!val) {
-          item.discountTotalPrice = item.totalPrice
-          item.discountSinglePrice = item.singlePrice
-          return
+          item.discountTotalPrice = item.totalPrice;
+          item.discountSinglePrice = item.singlePrice;
+          return;
         }
         //获取折让单价
-        item.discountSinglePrice = this.getDiscountSinglePrice(item)
-        item.discountTotalPrice = this.getDiscountTotalPrice(item)
-      })
-      this.$refs.table.reload()
+        item.discountSinglePrice = this.getDiscountSinglePrice(item);
+        item.discountTotalPrice = this.getDiscountTotalPrice(item);
+      });
+      this.$refs.table.reload();
       this.$store.commit('concact/setDiscountAmount', val);
     },
     //获取折让单价
     getDiscountSinglePrice(row) {
-      let num = Number(this.form.discountTotalPrice) / Number(this.allPrice) * Number(row.singlePrice)
-      return isNaN(num) ? '' : num
+      let num =
+        (Number(this.form.discountTotalPrice) / Number(this.allPrice)) *
+        Number(row.singlePrice);
+      return isNaN(num) ? '' : num;
     },
     //获取合计
     getAllPrice(row) {
-      let num = 0
+      let num = 0;
       switch (this.pricingWay) {
         case 1: //按数量计价计算总金额
-          num = Number(row.singlePrice) * Number(row.totalCount)
+          num = Number(row.singlePrice) * Number(row.totalCount);
           break;
-        case 2 ://按重量计价计算总金额
-          num = Number(row.singlePrice) * Number(row.totalCount) * Number(row.singleWeight)
+        case 2: //按重量计价计算总金额
+          num =
+            Number(row.singlePrice) *
+            Number(row.totalCount) *
+            Number(row.singleWeight);
           break;
       }
-      return isNaN(num) ? '' : num.toFixed(2)
+      return isNaN(num) ? '' : num.toFixed(2);
     },
     //获取折让合计
     getDiscountTotalPrice(row) {
-      let num = 0
+      let num = 0;
       switch (this.pricingWay) {
         case 1: //按数量计价计算折让合计
-          num = Number(row.discountSinglePrice) * Number(row.totalCount)
+          num = Number(row.discountSinglePrice) * Number(row.totalCount);
           break;
-        case 2 ://按重量计价计算折让合计
-          num = Number(row.discountSinglePrice) * Number(row.totalCount) * Number(row.singleWeight)
+        case 2: //按重量计价计算折让合计
+          num =
+            Number(row.discountSinglePrice) *
+            Number(row.totalCount) *
+            Number(row.singleWeight);
           break;
       }
-      return isNaN(num) ? '' : num.toFixed(2)
+      return isNaN(num) ? '' : num.toFixed(2);
     },
     //修改回显
     async putTableValue(data) {
       let productList =
-        (data && (data.quoteProductList || data.productList || data.detailList)) || [];
+        (data &&
+          (data.quoteProductList || data.productList || data.detailList)) ||
+        [];
       if (productList) {
-        let supplierObj = await this.getSupplierObj(productList, 'productId')
+        let supplierObj = await this.getSupplierObj(productList, 'productId');
         productList.forEach((item) => {
-          item.guaranteePeriodUnitCode = item.guaranteePeriodUnitCode ? item.guaranteePeriodUnitCode + '' : '';
+          item.guaranteePeriodUnitCode = item.guaranteePeriodUnitCode
+            ? item.guaranteePeriodUnitCode + ''
+            : '';
           // if (item.deliveryDays) {
           //   item['deliveryDeadline'] =
           //     item['deliveryDeadline'] || this.setDay(item.deliveryDays);
@@ -1210,7 +1315,6 @@ export default {
         this.allPrice = data?.contractVO?.totalPrice;
         // this.getTotalPrice();
 
-
         this.form.discountTotalPrice = data?.contractVO?.discountTotalPrice;
 
         // this.discountInput(data?.contractVO?.discountTotalPrice);
@@ -1218,23 +1322,26 @@ export default {
     },
     async getSupplierObj(productList, queryName) {
       try {
-        let categoryIds = productList.map(item => item[queryName])
-        return await contactQueryByCategoryIdsAPI({categoryIds, isQueryEE: 1})
+        let categoryIds = productList.map((item) => item[queryName]);
+        return await contactQueryByCategoryIdsAPI({
+          categoryIds,
+          isQueryEE: 1
+        });
       } catch (e) {
         return Promise.resolve({});
       }
-
     },
     //修改订单未选择合同时回显
     async putTableValueByOrder(row) {
-      let data = {...row}
-      let productList =
-        (data && data.productList) || [];
+      let data = { ...row };
+      let productList = (data && data.productList) || [];
 
       if (productList) {
-        let supplierObj = await this.getSupplierObj(productList, 'productId')
+        let supplierObj = await this.getSupplierObj(productList, 'productId');
         productList.forEach((item) => {
-          item.guaranteePeriodUnitCode = item.guaranteePeriodUnitCode ? item.guaranteePeriodUnitCode + '' : '';
+          item.guaranteePeriodUnitCode = item.guaranteePeriodUnitCode
+            ? item.guaranteePeriodUnitCode + ''
+            : '';
           // if (item.deliveryDays) {
           //   item['deliveryDeadline'] =
           //     item['deliveryDeadline'] || this.setDay(item.deliveryDays);
@@ -1260,12 +1367,12 @@ export default {
     singleWeightChange(row, index) {
       if (row && row.singleWeight && row.totalCount) {
         row.totalWeight = (row.singleWeight * row.totalCount).toFixed(2) || 0;
-        this.$set(this.form.datasource[index], 'totalWeight', row.totalWeight)
+        this.$set(this.form.datasource[index], 'totalWeight', row.totalWeight);
       } else {
-        this.$set(this.form.datasource[index], 'totalWeight', '')
+        this.$set(this.form.datasource[index], 'totalWeight', '');
       }
       if (this.pricingWay == 2) {
-        this.getTotalPrice(row)
+        this.getTotalPrice(row);
       }
     },
     //选择产品
@@ -1288,7 +1395,7 @@ export default {
     },
     //选择产品回调
     async changeParent(obj, idx) {
-      let supplierObj = await this.getSupplierObj(obj, 'id')
+      let supplierObj = await this.getSupplierObj(obj, 'id');
       obj.forEach((item, index) => {
         let i = idx == -1 ? index : idx;
         let row = JSON.parse(JSON.stringify(this.defaultForm));
@@ -1296,7 +1403,11 @@ export default {
         let params = idx == -1 ? row : this.form.datasource[i];
 
         if (supplierObj[item.id]?.length === 1) {
-          this.$set(params, 'entrustedEnterpriseId', supplierObj[item.id][0].id);
+          this.$set(
+            params,
+            'entrustedEnterpriseId',
+            supplierObj[item.id][0].id
+          );
         }
         this.$set(params, 'entrustedEnterpriseIdList', supplierObj[item.id]);
         this.$set(params, 'productId', item.id);
@@ -1315,7 +1426,11 @@ export default {
         this.$set(params, 'produceType', item.produceType);
         this.$set(params, 'productionDays', item.productionDays);
         this.$set(params, 'approvalNumber', item.extField.approvalNumber);
-        this.$set(params, 'packingSpecification', item.extField.packingSpecification);
+        this.$set(
+          params,
+          'packingSpecification',
+          item.extField.packingSpecification
+        );
         this.$set(params, 'customerMark', this.customerMark || '');
         if (idx == -1) {
           this.form.datasource.push(row);

+ 107 - 0
src/views/saleManage/saleOrder/components/project-search.vue

@@ -0,0 +1,107 @@
+<!-- 搜索表单 -->
+<template>
+    <el-form
+      size="small"
+      label-width="80px"
+      class="ele-form-search"
+      @keyup.enter.native="search"
+      @submit.native.prevent
+    >
+      <el-row :gutter="10">
+        <el-col v-bind="styleResponsive ? { md: 6 } : { span: 6 }">
+          <el-form-item label="项目类型">
+            <dict-selection dict-name="项目类型" v-model="where.type"></dict-selection>
+          </el-form-item>
+        </el-col>
+        <el-col v-bind="styleResponsive ? { md: 6 } : { span: 6 }">
+          <el-form-item label="项目编码">
+            <el-input
+              clearable
+              size="small"
+              v-model="where.code"
+              placeholder="请输入"
+            />
+          </el-form-item>
+        </el-col>
+        <el-col v-bind="styleResponsive ? { md: 6 } : { span: 6 }">
+          <el-form-item label="项目名称">
+            <el-input
+              clearable
+              size="small"
+              v-model="where.name"
+              placeholder="请输入"
+            />
+          </el-form-item>
+        </el-col>
+        <el-col v-bind="styleResponsive ? { md: 6 } : { span: 6 }">
+          <el-form-item label="组织机构:">
+            <auth-selection data-type="Array" v-model="where.deptIds" style="width: 100%"></auth-selection>
+          </el-form-item>
+        </el-col>
+  
+      </el-row>
+      <el-row :gutter="10">
+        <el-col style="display: flex;justify-content: flex-end" v-bind="styleResponsive ? { md: 24 } : { span: 24 }">
+          <el-form-item>
+            <el-button
+              size="small"
+              type="primary"
+              icon="el-icon-search"
+              class="ele-btn-icon"
+              @click="search"
+            >
+              查询
+            </el-button>
+  
+            <el-button
+              @click="reset"
+              icon="el-icon-refresh"
+              class="ele-btn-icon"
+              size="medium"
+            >重置
+            </el-button
+            >
+            <slot></slot>
+          </el-form-item>
+        </el-col>
+      </el-row>
+    </el-form>
+  </template>
+  
+  <script>
+  export default {
+    data() {
+      // 默认表单数据
+      const defaultWhere = {
+        name: '',
+        code: '',
+        type: ''
+      };
+      return {
+        defaultWhere,
+        // 表单数据
+        where: {...defaultWhere},
+        loading: false
+      };
+    },
+    computed: {
+      // 是否开启响应式布局
+      styleResponsive() {
+        return this.$store.state.theme.styleResponsive;
+      }
+    },
+    methods: {
+      /* 搜索 */
+      search() {
+        this.$emit('search', this.where);
+      },
+      /*  重置 */
+      reset() {
+        this.where = {...this.defaultWhere};
+        this.search();
+      },
+  
+    }
+  };
+  </script>
+  

+ 4 - 2
src/views/saleManage/saleOrder/components/projectListDialog.vue

@@ -11,6 +11,8 @@
     width="70%"
   >
     <el-card shadow="never">
+      <index-search @search="reload"/>
+
       <ele-pro-table
         ref="table"
         :columns="columns"
@@ -45,9 +47,9 @@
 <script>
 import { projectsPageAPI } from '@/api/pro';
 import dictMixins from '@/mixins/dictMixins';
-
+import indexSearch from "./project-search.vue";
 export default {
-  components: {},
+  components: {indexSearch},
   mixins: [dictMixins],
   props: {
     contactData: {

+ 7 - 3
src/views/saleManage/saleOrder/components/searchTable.vue

@@ -19,7 +19,7 @@
 
       </el-col>
       <el-col v-bind="styleResponsive ? { lg:6, md: 12 } : { span:6 }">
-        <el-form-item label="名称:" prop="partaName">
+        <el-form-item label="客户名称:" prop="partaName">
           <el-input
           placeholder="请输入"
            v-model.trim="params.partaName" controls-position="right" >
@@ -85,8 +85,12 @@
 
       </el-col>
       <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
-        <el-form-item label="组织机构:">
-          <auth-selection v-model="params.deptIds" style="width: 100%"></auth-selection>
+        <el-form-item label="项目名称:">
+          <el-input
+            clearable
+            placeholder="请输入"
+            v-model.trim="params.projectName"
+          ></el-input>
         </el-form-item>
       </el-col>
       <el-col style="display: flex;justify-content: end" v-bind="styleResponsive ? { lg:6, md: 12 } : { span:6 }">

+ 16 - 6
src/views/saleManage/saleOrder/invoice/components/addInvoiceDialog.vue

@@ -90,6 +90,11 @@
             />
           </el-form-item>
         </el-col>
+        <el-col :span="12">
+          <el-form-item label="项目名称" prop="projectName">
+            <el-input clearable v-model="form.projectName" :disabled="true" />
+          </el-form-item>
+        </el-col>
       </el-row>
       <el-row :gutter="12">
         <el-col :span="12">
@@ -208,7 +213,8 @@ export default {
       pricingWay: 1,
       sendFiles: [],
       repliedFiles: [],
-
+      projectName: '',
+      projectId: '',
       receiveAddress: '',
       deviceName: '',
       deviceId: '',
@@ -290,11 +296,13 @@ export default {
             orderNo,
             id,
             partaLinkName,
-            receiveAddress,
+            partaAddress,
             productList,
             trakNoteList,
             totalAmount,
-            payAmount
+            payAmount,
+            projectName,
+            projectId
           } = data;
           if (productList && productList.length > 0) {
             productList.forEach((v) => {
@@ -309,11 +317,13 @@ export default {
             linkPhone: partaTel,
             orderNo,
             orderId: id,
-            receiveAddress,
+            receiveAddress: partaAddress,
             productList,
             trakNoteList,
             totalAmount,
-            payAmount
+            payAmount,
+            projectName,
+            projectId
           });
           this.$refs.inventoryTableref &&
             this.$refs.inventoryTableref.putTableValue(productList);
@@ -475,7 +485,7 @@ export default {
       if (orderId) {
         await this.getSaleOrderDetail(orderId);
       }
-      if(this.saleOrderData.id){
+      if (this.saleOrderData.id) {
         await this.getSaleOrderDetail(this.saleOrderData.id);
       }
       if (row && row?.id) {

+ 55 - 55
src/views/saleManage/saleOrder/invoice/components/print-template.vue

@@ -55,24 +55,24 @@
             <td colspan="3"><svg id="print"></svg></td>
           </tr>
           <tr>
-            <td colspan="3" style="padding: 2.5px">
+            <td colspan="3" style="padding: 1px">
               发货单号:{{ formData.docNo }}
             </td>
-            <td colspan="3" style="padding: 2.5px">
+            <td colspan="3" style="padding: 1px">
               项目: {{ formData.projectName }}</td
             >
-            <td colspan="3" style="padding: 2.5px">
+            <td colspan="3" style="padding: 1px">
               日期:{{ getNowFormatDate() }}
             </td>
           </tr>
           <tr>
-            <td colspan="3" style="padding: 2.5px 2.5px 10px 2.5px">
+            <td colspan="3" style="padding: 1px 1px 10px 1px">
               客户:{{ formData.linkName }}</td
             >
-            <td colspan="3" style="padding: 2.5px 2.5px 10px 2.5px">
+            <td colspan="3" style="padding: 1px 1px 10px 1px">
               联系电话: {{ formData.linkPhone }}</td
             >
-            <td colspan="3" style="padding: 2.5px 2.5px 10px 2.5px">
+            <td colspan="3" style="padding: 1px 1px 10px 1px">
               车牌号: {{ formData.carNo }}</td
             >
           </tr>
@@ -91,67 +91,67 @@
       >
         <tbody>
           <tr align="center">
-            <td style="padding: 2.5px"> 产品编码 </td>
-            <td style="padding: 2.5px"> 产品名称 </td>
-            <td style="padding: 2.5px"> 规格 </td>
-            <!-- <td style="padding: 2.5px"> 型号 </td> -->
-            <td style="padding: 2.5px"> 单位 </td>
-            <td style="padding: 2.5px"> 数量 </td>
-            <td style="padding: 2.5px"> 块数 </td>
-            <td style="padding: 2.5px"> 强度 </td>
-            <td style="padding: 2.5px"> 密度 </td>
-            <td style="padding: 2.5px" v-if="isPrintPrice"> 单价(元) </td>
-            <td style="padding: 2.5px" v-if="isPrintPrice"> 金额(元) </td>
-            <td style="padding: 2.5px"> 备注 </td>
+            <td style="padding: 1px;width: 120px" > 产品编码 </td>
+            <td style="padding: 1px;"> 产品名称 </td>
+            <td style="padding: 1px;width: 130px;"> 规格 </td>
+            <!-- <td style="padding: 1px"> 型号 </td> -->
+            <td style="padding: 1px"> 单位 </td>
+            <td style="padding: 1px"> 数量 </td>
+            <td style="padding: 1px"> 块数 </td>
+            <td style="padding: 1px"> 强度 </td>
+            <td style="padding: 1px"> 密度 </td>
+            <td style="padding: 1px" v-if="isPrintPrice"> 单价(元) </td>
+            <td style="padding: 1px" v-if="isPrintPrice"> 金额(元) </td>
+            <td style="padding: 1px"> 备注 </td>
           </tr>
           <tr align="center" v-for="(item, index) in codeList">
-            <td style="padding: 2.5px">{{ item.productCode }}</td>
-            <td style="padding: 2.5px">{{ item.productName }}</td>
-            <td style="padding: 2.5px">{{ item.specification }}</td>
-            <!-- <td style="padding: 2.5px">{{ item.modelType }}</td> -->
-            <td style="padding: 2.5px">{{ item.measuringUnit }}</td>
-            <td style="padding: 2.5px">{{ item.totalCount }}</td>
-            <td style="padding: 2.5px">{{ item.blockCount }}</td>
-            <td style="padding: 2.5px">{{
+            <td style="padding: 1px">{{ item.productCode }}</td>
+            <td style="padding: 1px">{{ item.productName }}</td>
+            <td style="padding: 1px">{{ item.specification }}</td>
+            <!-- <td style="padding: 1px">{{ item.modelType }}</td> -->
+            <td style="padding: 1px">{{ item.measuringUnit }}</td>
+            <td style="padding: 1px">{{ item.totalCount }}</td>
+            <td style="padding: 1px">{{ item.blockCount }}</td>
+            <td style="padding: 1px">{{
               item.extField.packagingStrength
             }}</td>
-            <td style="padding: 2.5px">{{ item.extField.packagingDensity }}</td>
-            <td style="padding: 2.5px" v-if="isPrintPrice">{{
+            <td style="padding: 1px">{{ item.extField.packagingDensity }}</td>
+            <td style="padding: 1px" v-if="isPrintPrice">{{
               item.discountSinglePrice
             }}</td>
-            <td style="padding: 2.5px" v-if="isPrintPrice">{{
+            <td style="padding: 1px" v-if="isPrintPrice">{{
               item.discountTotalPrice
             }}</td>
-            <td style="padding: 2.5px">{{ item.remark }}</td>
+            <td style="padding: 1px">{{ item.remark }}</td>
           </tr>
           <tr align="center">
-            <td colspan="4" style="padding: 2.5px"> 合计 </td>
-            <td colspan="1" style="padding: 2.5px">
+            <td colspan="4" style="padding: 1px"> 合计 </td>
+            <td colspan="1" style="padding: 1px">
               {{
                 codeList.reduce((total, item) => {
                   return (total += item.totalCount);
                 }, 0)
               }}
             </td>
-            <td style="padding: 2.5px"></td>
-            <td colspan="2" style="padding: 2.5px"></td>
-            <td colspan="1" style="padding: 2.5px" v-if="isPrintPrice">
+            <td style="padding: 1px"></td>
+            <td colspan="2" style="padding: 1px"></td>
+            <td colspan="1" style="padding: 1px" v-if="isPrintPrice">
               {{
                 codeList.reduce((total, item) => {
                   return (total += item.discountTotalPrice);
                 }, 0)
               }}
             </td>
-            <td colspan="1" v-if="isPrintPrice" style="padding: 2.5px"></td>
+            <td colspan="1" v-if="isPrintPrice" style="padding: 1px"></td>
           </tr>
           <tr align="center">
-            <td colspan="3" style="padding: 2.5px">
+            <td colspan="3" style="padding: 1px">
               注意事项:遗失托盘赔偿260/个
             </td>
-            <td colspan="2" style="padding: 2.5px"> 装车托盘数:</td>
-            <td style="padding: 2.5px"></td>
-            <td style="padding: 2.5px"> 带回托盘数: </td>
-            <td :colspan="isPrintPrice ? 3 : 1" style="padding: 2.5px"></td>
+            <td colspan="2" style="padding: 1px"> 装车托盘数:</td>
+            <td style="padding: 1px"></td>
+            <td style="padding: 1px"> 带回托盘数: </td>
+            <td :colspan="isPrintPrice ? 3 : 1" style="padding: 1px"></td>
           </tr>
         </tbody>
       </table>
@@ -167,25 +167,25 @@
       >
         <tbody>
           <tr>
-            <td colspan="3" style="padding: 2.5px">
+            <td colspan="3" style="padding: 1px">
               承运人:{{ this.formData.driverNames }}</td
             >
-            <td colspan="3" style="padding: 2.5px">
+            <td colspan="3" style="padding: 1px">
               装卸工:{{ this.formData.carName }}</td
             >
-            <td colspan="3" style="padding: 2.5px"> 签收人:</td>
-            <td colspan="3" style="padding: 2.5px">
+            <td colspan="3" style="padding: 1px"> 签收人:</td>
+            <td colspan="3" style="padding: 1px">
               制单人:{{ this.formData.markerName }}</td
             >
           </tr>
           <tr>
-            <td colspan="8" style="padding: 2.5px"
+            <td colspan="8" style="padding: 1px"
               >物流服务评价:<input
                 type="checkbox"
                 id="vehicle1"
                 name="vehicle1"
                 value="Bike"
-                style="padding: 1px 2.5px"
+                style="padding: 1px 1px"
               />
               <span>满意</span>
 
@@ -194,20 +194,20 @@
                 id="vehicle2"
                 name="vehicle2"
                 value="Car"
-                style="padding: 1px 2.5px"
+                style="padding: 1px 1px"
               /><span>不满意</span>
             </td>
-            <td colspan="4" style="padding: 2.5px"
+            <td colspan="4" style="padding: 1px"
               >打印时间:{{ getNowFormatDate() }}</td
             >
           </tr>
           <tr>
-            <td colspan="2" style="padding: 2.5px"> (白)记账联 </td>
-            <td colspan="2" style="padding: 2.5px"> (红)客户留存联 </td>
-            <td colspan="2" style="padding: 2.5px"> (蓝)结算联 </td>
-            <td colspan="2" style="padding: 2.5px"> (绿)运费联 </td>
-            <td colspan="2" style="padding: 2.5px"> (黄)装卸联 </td>
-            <td colspan="2" style="padding: 2.5px"> (白)出门联 </td>
+            <td colspan="2" style="padding: 1px"> (白)记账联 </td>
+            <td colspan="2" style="padding: 1px"> (红)客户留存联 </td>
+            <td colspan="2" style="padding: 1px"> (蓝)结算联 </td>
+            <td colspan="2" style="padding: 1px"> (绿)运费联 </td>
+            <td colspan="2" style="padding: 1px"> (黄)装卸联 </td>
+            <td colspan="2" style="padding: 1px"> (白)出门联 </td>
           </tr>
         </tbody>
       </table>

+ 8 - 6
src/views/saleManage/saleOrder/invoice/components/searchTable.vue

@@ -75,11 +75,12 @@
         </el-form-item>
       </el-col>
       <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
-        <el-form-item label="组织机构:">
-          <auth-selection
-            v-model="params.deptIds"
-            style="width: 100%"
-          ></auth-selection>
+        <el-form-item label="项目名称:">
+          <el-input
+            clearable
+            placeholder="请输入"
+            v-model.trim="params.projectName"
+          ></el-input>
         </el-form-item>
       </el-col>
       <el-col
@@ -116,7 +117,8 @@ export default {
       docNo: '',
       orderId: '',
       replied: null,
-      reviewStatus: null
+      reviewStatus: null,
+      projectName:''
     };
     return {
       reviewStatusEnum,

+ 12 - 0
src/views/saleManage/saleOrder/invoice/index.vue

@@ -238,6 +238,13 @@ export default {
           showOverflowTooltip: true,
           minWidth: 140
         },
+        {
+          prop: 'projectName',
+          label: '项目名称',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 180
+        },
         {
           prop: 'contactName',
           label: '客户名称',
@@ -334,6 +341,11 @@ export default {
     },
     handlePrint() {
       if (this.selection.length > 1) return this.$message.warning('请选择一条');
+      let flag = this.selection.some((item) =>
+        [2].includes(item.reviewStatus)
+      );
+      if (!flag)
+        return this.$message.warning('抱歉需要已审核的发货单才能打印,请检查');
       this.$confirm('是否需要打印价格', '提示', {
         type: 'warning',
         cancelButtonText: '否',

+ 1 - 1
vue.config.js

@@ -38,7 +38,7 @@ module.exports = {
         // target: 'http://192.168.1.132:18086', // 徐1
         // target: 'http://192.168.1.134:18086', //徐2
         //target: 'http://192.168.1.126:18086',
-        target: 'http://192.168.1.107:18086',
+        target: 'http://192.168.1.251:18086',
         // target: 'http://192.168.1.114:18086',
         changeOrigin: true, // 只有这个值为true的情况下 才表示开启跨域
         pathRewrite: {