Ver código fonte

合同变更

yusheng 1 ano atrás
pai
commit
6ef2cd68e5

+ 10 - 0
src/api/contractManage/contractChange.js

@@ -55,4 +55,14 @@ export async function deleteInformation(data) {
   return Promise.reject(new Error(res.data.message));
 }
 
+/**
+ * 获取变更记录
+ */
+export async function changeHistory(id) {
+  const res = await request.get(`/eom/contract/changeHistory/${id}`, {});
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
 

+ 131 - 0
src/components/upload/import-dialog.vue

@@ -0,0 +1,131 @@
+<template>
+  <!-- 上传 -->
+  <el-dialog title="导入文件上传" :visible.sync="dialogVisible" width="40%">
+    <el-form label-width="110px" class="zw-criterion">
+      <el-form-item label="选择文件">
+        <el-upload
+          class="avatar-uploader"
+          action="#"
+          :show-file-list="false"
+          :http-request="handlSuccess"
+          :before-upload="beforeUpload"
+        >
+          <el-button icon="el-icon-plus" size="small" type="primary"
+            >文件上传</el-button
+          >
+          <div slot="tip" class="el-upload__tip">
+            只能上传excel文件,点击
+            <el-link
+              type="primary"
+              :underline="false"
+              @click="downLoadTemplate()"
+            >
+              下载模板</el-link
+            >
+          </div>
+        </el-upload>
+      </el-form-item>
+      <el-form-item label="上传列表">
+        <div class="imgs-box">
+          <p v-for="(item, index) in attaments" :key="index" class="imgs-p">
+            <span> {{ item.name }}</span>
+            <el-link @click="delFileList(index)" type="primary">删除</el-link>
+          </p>
+        </div>
+      </el-form-item>
+    </el-form>
+    <div slot="footer" class="dialog-footer">
+      <el-button size="small" @click="dialogVisible = false">关 闭</el-button>
+      <el-button size="small" @click="upload" type="primary">上 传</el-button>
+    </div>
+  </el-dialog>
+</template>
+
+<script>
+import { importBatch,downLoadTemplate } from '@/api/system/file/index.js';
+
+export default {
+  props: {
+    // eslint-disable-next-line vue/require-prop-type-constructor
+    defModule: ''
+  },
+  //注册组件
+  data() {
+    return {
+      showViewer: false, // 显示查看器
+      dialogVisible: false,
+      uploadShow: false,
+      module: '',
+      attaments: [], //上传文件
+      file: ''
+    };
+  },
+  created() {},
+  methods: {
+    open() {
+      this.attaments = [];
+      this.module = '';
+      this.dialogVisible = true;
+    },
+    //删除附件
+    delFileList(index) {
+      this.attaments.splice(index, 1);
+    },
+    //上传限制
+    beforeUpload(file) {
+      const isLt10M = file.size / 1024 / 1024 < 10;
+      if (!isLt10M) {
+        this.$message.error('导入单文件大小不能超过 10MB!');
+      }
+      return isLt10M;
+    },
+    //图片上传
+    handlSuccess(param) {
+      this.file = param.file;
+      this.attaments.push(param.file);
+    },
+    // 文件上传
+    async upload() {
+      if (this.attaments.length == 0) {
+        return this.$message.warning('文件不能为空!');
+      }
+      this.module = this.$props.defModule;
+
+      await importBatch({
+        module: this.module,
+        multiPartFiles: this.attaments
+      });
+      this.$message.success('操作成功!');
+      this.dialogVisible = false;
+      this.$emit('success');
+    },
+    //下载模板
+    downLoadTemplate(){
+      downLoadTemplate()
+    }
+  }
+};
+</script>
+
+<style lang="scss">
+.zw-table-header {
+  float: right;
+}
+
+.imgs-box .imgs-p {
+  height: 30px;
+  background: #f0f3f3;
+  line-height: 30px;
+  width: 372px;
+  margin-bottom: 5px;
+  padding: 0 10px;
+  display: flex;
+  justify-content: space-between;
+}
+.zw-criterion-normal {
+  padding: 20px 0 0 0;
+}
+.el-main {
+  overflow: hidden;
+}
+</style>

+ 152 - 34
src/views/contractManage/contractBook/components/changeList.vue

@@ -19,7 +19,7 @@
 </template>
 <script>
   import { reviewStatus } from '@/enum/dict';
-  import { getTableList } from '@/api/contractManage/contractChange.js';
+  import { changeHistory } from '@/api/contractManage/contractChange.js';
   import detailDialog from './detailDialog1.vue';
 
   export default {
@@ -28,69 +28,191 @@
       return {
         datasource: [],
         columns: [
-          {
-            width: 60,
+        {
+            columnKey: 'index',
             label: '序号',
             type: 'index',
-            columnKey: 'index',
-            align: 'center'
+            width: 55,
+            align: 'center',
+            showOverflowTooltip: true,
+            fixed: 'left'
+          },
+          {
+            prop: 'contractName',
+            label: '合同名称',
+            align: 'center',
+            slot: 'contractName',
+            showOverflowTooltip: true,
+            minWidth: 200
+          },
+
+          {
+            prop: 'categoryName',
+            label: '合同分类',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 140
           },
           {
             minWidth: 200,
-            prop: 'changeCode',
-            label: '编码',
+            prop: 'changeReason',
+            label: '变更原因',
             align: 'center',
-            slot: 'changeCode',
             showOverflowTooltip: true
           },
           {
             minWidth: 200,
-            prop: 'contractName',
-            label: '变更合同',
-            slot: 'contractName',
+            prop: 'changeRemark',
+            label: '变更描述',
             align: 'center',
             showOverflowTooltip: true
           },
-
           {
-            minWidth: 200,
-            prop: 'reason',
-            label: '变更原因',
+            minWidth: 140,
+            prop: 'changeTime',
+            label: '变更时间',
             align: 'center',
             showOverflowTooltip: true
           },
+          {
+            prop: 'dversion',
+            label: '版本号',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 80
+          },
+          {
+            prop: 'productNames',
+            label: '产品名称',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 140
+          },
+          {
+            prop: 'partaName',
+            label: '甲方名称',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 150
+          },
+          {
+            prop: 'partaLinkName',
+            label: '甲方联系人',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 130
+          },
 
           {
-            minWidth: 80,
-            prop: 'remark',
-            label: '变更描述',
+            prop: 'partaTel',
+            label: '甲方联系电话',
             align: 'center',
-            showOverflowTooltip: true
+            showOverflowTooltip: true,
+            minWidth: 130
+          },
+          {
+            prop: 'partbName',
+            label: '乙方名称',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 130
+          },
+          {
+            prop: 'partbLinkName',
+            label: '乙方联系人',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 130
           },
           {
-            prop: 'approvalStatus',
+            prop: 'partbTel',
+            label: '乙方联系电话',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 130
+          },
+
+          {
+            prop: 'contractNo',
+            label: '编码',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 170
+          },
+          {
+            prop: 'contractNumber',
+            label: '合同编号',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 200
+          },
+
+          {
+            prop: 'enabled',
+            label: '是否可用',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 140,
+            formatter: (_row, _column, cellValue) => {
+              return _row.enabled ? '是' : '否';
+            }
+          },
+          {
+            prop: 'contractStartDate',
+            label: '签订日期',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 140
+          },
+          {
+            prop: 'contractEndDate',
+            label: '结束日期',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 140
+          },
+          {
+            prop: 'receiptPaymentType',
+            label: '收付款类型',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 130,
+            formatter: (_row, _column, cellValue) => {
+              return _row.receiptPaymentType == 1 ? '固定' : '分期';
+            }
+          },
+          {
+            prop: 'totalPrice',
+            label: '合同总金额',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 130
+          },
+
+          {
+            prop: 'status',
             label: '审核状态',
             align: 'center',
             showOverflowTooltip: true,
             minWidth: 100,
             formatter: (_row, _column, cellValue) => {
-              return reviewStatus[_row.approvalStatus];
+              return reviewStatus[_row.status];
             }
           },
           {
-            minWidth: 100,
-            prop: 'createUserName',
+            prop: 'createUsername',
             label: '创建人',
             align: 'center',
-            showOverflowTooltip: true
+            showOverflowTooltip: true,
+            minWidth: 120
           },
           {
-            minWidth: 100,
             prop: 'createTime',
             label: '创建时间',
             align: 'center',
-            showOverflowTooltip: true
-          }
+            showOverflowTooltip: true,
+            minWidth: 150
+          },
         ]
       };
     },
@@ -98,15 +220,11 @@
     methods: {
       //查看详情
       openDetail(row) {
-        this.$refs.contactDetailDialogRef.open({id:row.contractId});
+        this.$refs.contactDetailDialogRef.open({id:row.id});
       },
       init(id) {
-        getTableList({
-          pageNum: 1,
-          size: 100,
-          contractId: id
-        }).then((res) => {
-          this.datasource=res.list
+        changeHistory(id).then((res) => {
+          this.datasource=res
         });
       }
     }

+ 4 - 4
src/views/contractManage/contractBook/components/detailDialog.vue

@@ -211,14 +211,14 @@
             :isChangeCount="false"
           ></inventoryTabledetail>
         </el-tab-pane>
-        <el-tab-pane label="带料清单" name="2">
+        <el-tab-pane label="带料清单" name="2" v-if="form.categoryId == '1752993827954225153'">
           <inventoryTabledetail
             ref="rawDetailListRef"
             :isCustomerMark="true"
             :contractBookType="form.type"
           ></inventoryTabledetail>
         </el-tab-pane>
-        <el-tab-pane label="产出清单" name="3">
+        <el-tab-pane label="产出清单" name="3" v-if="form.categoryId == '1752993827954225153'">
           <inventoryTabledetail
             ref="outputDetailListRef"
             :isCustomerMark="true"
@@ -284,8 +284,8 @@
         tabOptions: [
           { key: 'main', name: '合同详情' },
           { key: 'bpm', name: '流程详情' },
-          { key: 'changeList', name: '变更记录' }
-          // { key: 'dversion', name: '历史版本' },
+          { key: 'changeList', name: '历史版本' },
+          // { key: 'oldMain', name: '变更记录' },
         ],
         visible: false,
         detailId: '',

+ 2 - 2
src/views/contractManage/contractBook/components/detailDialog1.vue

@@ -209,14 +209,14 @@
             :isChangeCount="false"
           ></inventoryTabledetail>
         </el-tab-pane>
-        <el-tab-pane label="带料清单" name="2">
+        <el-tab-pane label="带料清单" name="2" v-if="form.categoryId == '1752993827954225153'">
           <inventoryTabledetail
             ref="rawDetailListRef"
             :isCustomerMark="true"
             :contractBookType="form.type"
           ></inventoryTabledetail>
         </el-tab-pane>
-        <el-tab-pane label="产出清单" name="3">
+        <el-tab-pane label="产出清单" name="3" v-if="form.categoryId == '1752993827954225153'">
           <inventoryTabledetail
             ref="outputDetailListRef"
             :isCustomerMark="true"

+ 1 - 1
src/views/contractManage/contractChange/index.vue

@@ -111,7 +111,7 @@
     deleteInformation
   } from '@/api/contractManage/contractChange.js';
   import tabMixins from '@/mixins/tableColumnsMixin';
-  import detailDialog from '@/views/contractManage/contractBook/components/detailDialog.vue';
+  import detailDialog from '@/views/contractManage/contractBook/components/detailDialog1.vue';
 
   export default {
     mixins: [tabMixins],

+ 8 - 6
src/views/saleManage/contact/components/addContactDialog.vue

@@ -263,9 +263,10 @@
                   :options="options.cityData"
                   ref="address"
                   style="width: 35%"
+                  placeholder="请选择省市区/县"
                 ></el-cascader>
                 <el-input
-                  placeholder="请输入"
+                  placeholder="请输入详细地址"
                   v-model="form.address"
                   style="width: 65%"
                 ></el-input>
@@ -289,9 +290,10 @@
                   :options="options.cityData"
                   ref="sendAddress"
                   style="width: 35%"
+                  placeholder="请选择省市区/县"
                 ></el-cascader>
                 <el-input
-                  placeholder="请输入"
+                  placeholder="请输入详细地址"
                   v-model="otherForm.address"
                   maxlength="50"
                   style="width: 65%"
@@ -1079,9 +1081,9 @@
           // settlementMode: [
           //   { required: true, message: '请输入结算方式', trigger: 'blur' }
           // ],
-          addressId: [
-            { required: true, message: '请选择地址', trigger: 'change' }
-          ]
+          // addressId: [
+          //   { required: true, message: '请选择地址', trigger: 'change' }
+          // ]
         },
         options: {
           cityData,
@@ -1371,7 +1373,7 @@
           this.isUpdate = false;
           // 默认带出列表页面选中的分类
           this.$nextTick(() => {
-            this.categoryIdList = [contactCategoryId];
+            this.categoryIdList = contactCategoryId?[contactCategoryId]:'';
           });
         } else {
           this.isUpdate = true;

+ 9 - 1
src/views/saleManage/saleOrder/components/addDialog.vue

@@ -62,7 +62,7 @@
             <el-radio v-model="form.needProduce" :label="2"
               >无客户生产性订单</el-radio
             >
-            <el-radio v-model="form.needProduce" :label="4"
+            <el-radio v-model="form.needProduce" :label="4" @change="needProduceChange"
               >不定向订单</el-radio
             >
           </el-form-item>
@@ -949,6 +949,14 @@
           this.getSaleOrderDetail(row.id);
         }
       },
+      needProduceChange(needProduce){
+        this.$nextTick(()=>{
+          this.form.totalAmount = 0;
+        this.form.payAmount = 0;
+
+        })
+        
+      },
 
       //从合同页面新增订单
       async contractOpen(row) {

+ 29 - 7
src/views/saleManage/saleOrder/index.vue

@@ -55,6 +55,14 @@
                 >
                   批量删除
                 </el-button>
+                <el-button
+                  type="primary"
+                  size="small"
+                  icon="el-icon-upload2"
+                  plain
+                  @click="uploadFile"
+                  >导入</el-button
+                >
               </template>
 
               <!-- 查看详情列 -->
@@ -135,7 +143,6 @@
                       删除
                     </el-link>
                   </template>
-          
                 </el-popconfirm>
                 <el-dropdown
                   @command="(command) => handleCommand(command, row)"
@@ -154,7 +161,9 @@
                     <el-dropdown-item command="saleOrderReminder"
                       >催单
                     </el-dropdown-item>
-                    <el-dropdown-item command="invoiceManage" v-if="!row.hasInvoiceApply"
+                    <el-dropdown-item
+                      command="invoiceManage"
+                      v-if="!row.hasInvoiceApply"
                       >新增发票
                     </el-dropdown-item>
                   </el-dropdown-menu>
@@ -185,7 +194,7 @@
           <exceptionList></exceptionList>
         </div>
         <div v-if="activeComp == 'trayList'">
-         <palletManagement></palletManagement>
+          <palletManagement></palletManagement>
         </div>
       </div>
     </el-card>
@@ -232,6 +241,11 @@
       v-if="addOrEditDialogFlag1"
       @reload="reload"
     ></addInvoiceManage>
+    <importDialog
+      :defModule="moudleName"
+      ref="importDialogRef"
+      @success="reload"
+    />
   </div>
 </template>
 
@@ -266,9 +280,10 @@
   import autogenerateDialog from '@/BIZComponents/autogenerateDialog.vue';
   import processSubmitDialog from '@/BIZComponents/processSubmitDialog/processSubmitDialog.vue';
   import tabMixins from '@/mixins/tableColumnsMixin';
+  import importDialog from '@/components/upload/import-dialog.vue';
 
   export default {
-    mixins: [dictMixins,tabMixins],
+    mixins: [dictMixins, tabMixins],
     components: {
       processSubmitDialog,
       autogenerateDialog,
@@ -286,7 +301,9 @@
       entrustedReceive,
       invoiceConfirm,
       drawer,
-      exceptionList,addInvoiceManage,palletManagement
+      exceptionList,
+      addInvoiceManage,
+      palletManagement,importDialog
     },
     //客户管理数据
     props: {
@@ -491,7 +508,7 @@
             fixed: 'right'
           }
         ],
-        cacheKeyUrl:'eos-c2e9664a-saleManage-saleOrder',
+        cacheKeyUrl: 'eos-c2e9664a-saleManage-saleOrder'
       };
     },
     computed: {},
@@ -627,7 +644,12 @@
           id: row.contractId
         };
         this.$refs.contractDetailRef.open(data);
-      }
+      },
+      uploadFile() {
+        this.$refs.importDialogRef.open();
+
+      },
+
     }
   };
 </script>

+ 5 - 4
src/views/saleManage/saleOrder/returnGoods/index.vue

@@ -44,6 +44,7 @@
             >
               批量删除
             </el-button>
+            
           </template>
 
           <!-- 查看详情列 -->
@@ -166,7 +167,6 @@
       :addOrEditDialogFlag.sync="customerReturnOrderDialogFlag"
       ref="customerReturnOrderDialogRef"
       @done="reload"
-      
     >
     </customer-return-order-dialog>
     <!-- 多选删除弹窗 -->
@@ -182,6 +182,7 @@
       ref="processSubmitDialogRef"
       @reload="reload"
     ></process-submit-dialog>
+   
   </div>
 </template>
 
@@ -206,7 +207,7 @@
   import tabMixins from '@/mixins/tableColumnsMixin';
 
   export default {
-    mixins: [dictMixins,tabMixins],
+    mixins: [dictMixins, tabMixins],
     components: {
       processSubmitDialog,
       searchTable,
@@ -215,7 +216,7 @@
       popModal,
       addReturnGoodsDialog,
       detailDialog,
-      customerReturnOrderDialog
+      customerReturnOrderDialog,
     },
     //客户管理数据
     props: {
@@ -368,7 +369,7 @@
             fixed: 'right'
           }
         ],
-        cacheKeyUrl:'eos-64acd1e7-saleManage-returnorder'
+        cacheKeyUrl: 'eos-64acd1e7-saleManage-returnorder'
       };
     },
     computed: {},