Browse Source

发票合同修改

chen 2 weeks ago
parent
commit
dcd7df996c

+ 30 - 13
src/views/contract/invoice/index.vue

@@ -216,7 +216,7 @@
        <el-button type="success" plain icon="el-icon-bottom" size="mini" @click="invoiceSync()">同步</el-button>
       </el-col>
       <el-col :span="1.5">
-       <el-button type="primary" plain icon="el-icon-document-checked" size="mini" @click="generateContract(1)">手工生成</el-button>
+       <el-button type="primary" plain icon="el-icon-document-checked" size="mini" @click="dialogVisible = true;signingDate=''">手工生成</el-button>
       </el-col>
       <el-col :span="1.5">
        <el-button type="primary" plain icon="el-icon-document-copy" size="mini" @click="generateContract(2)">批量生成</el-button>
@@ -242,13 +242,17 @@
       <el-table-column label="客户编码" align="center" prop="clientCode" width="100" show-overflow-tooltip sortable="custom"/>
       <el-table-column label="购方名称" align="center" prop="gfmc" width="200" show-overflow-tooltip sortable="custom"/>
       <el-table-column label="销售凭证" align="center" prop="ddh" width="100" show-overflow-tooltip sortable="custom"/>
-      <el-table-column label="凭证日期" align="center" prop="audat" width="150" show-overflow-tooltip sortable="custom">
+      <el-table-column label="凭证日期" align="center" prop="audat" width="100" show-overflow-tooltip sortable="custom">
         <template v-slot="scope">
-          <span>{{ parseTime(scope.row.audat) }}</span>
+          <span>{{ parseTime(scope.row.audat, '{y}-{m}-{d}') }}</span>
         </template>
       </el-table-column>
       <el-table-column label="开票月" align="center" prop="invoiceMonth" width="100" show-overflow-tooltip sortable="custom"/>
-      <el-table-column label="开票日期" align="center" prop="kprq" width="150" show-overflow-tooltip sortable="custom"/>
+      <el-table-column label="开票日期" align="center" prop="kprq" width="100" show-overflow-tooltip sortable="custom">
+        <template v-slot="scope">
+          {{parseTime(scope.row.kprq, '{y}-{m}-{d}')}} 
+        </template>
+      </el-table-column>
       <el-table-column label="发票号码" align="center" prop="fphm" width="180" show-overflow-tooltip sortable="custom"/>
       <el-table-column label="发票状态" align="center" prop="fpzt" width="100" show-overflow-tooltip sortable="custom">
         <template v-slot="scope">
@@ -292,6 +296,14 @@
     <InvoiceSyncForm ref="syncFormRef" @success="getList" />
     
     <InvoiceDetails ref="detailsRef" @success="getList" />
+
+    <el-dialog title="选择签订日期" :visible.sync="dialogVisible" width="400px">  
+      <el-date-picker  v-model="signingDate"  type="date"  placeholder="选择签订日期" value-format="yyyy-MM-dd" size="mini" style="width: 100%;"></el-date-picker>  
+      <span slot="footer" class="dialog-footer">  
+        <el-button @click="dialogVisible = false" size="mini">取消</el-button>  
+        <el-button type="primary" @click="generateContract(1)" size="mini">确定</el-button>  
+      </span>  
+    </el-dialog>  
   </div>
 </template>
 
@@ -390,6 +402,8 @@ export default {
       /** 子表的列表 */
       subTabsName: 'invoiceDetails',
       companyOptions:[],
+      signingDate:'',
+      dialogVisible:false,
     };
   },
   created() {
@@ -496,20 +510,23 @@ export default {
       this.$refs["syncFormRef"].open();
     },
     async generateContract(type){
+      this.dialogVisible = false
       let data={};
       data.type=type;
+      
+      if(this.ids.length == 0 ){
+          this.$modal.msgError("请选择需要生成合同的订单数据")
+          return
+      }
+      data.ids = this.ids.join(",")
       if(type=="1"){
-        if(this.ids.length == 0 ){
-            this.$modal.msgError("请选择需要生成合同的订单数据")
-            return
-        }
-        data.ids = this.ids.join(",")
+        data.signingDate = this.signingDate
       }
-      await this.$modal.confirm('是否确认'+(type==1?'手工生成':type==2?'批量生成':'批量生成退货') +'合同' )
+      await this.$modal.confirm('是否确认'+(type==1?'手工生成':type==2?'批量生成':'批量生成退货') +'合同' +(data.signingDate?';签订日期为'+data.signingDate:''))
       try {
-       await InvoiceApi.generateContract(data);
-       await this.getList();
-       this.$modal.msgSuccess("操作成功");
+      await InvoiceApi.generateContract(data);
+      await this.getList();
+      this.$modal.msgSuccess("操作成功");
       } catch {}
     }
   }

+ 5 - 2
src/views/contract/invoiceContract/index.vue

@@ -118,7 +118,7 @@
         </el-col>
         <el-col :span="4">
           <el-form-item label="销售大区" prop="salesmethodname">
-            <el-input v-model="queryParams.salesmethodname" placeholder="请输入销售大区" clearable class="input-with-select"  style="width: 100%;" size="mini">
+            <!-- <el-input v-model="queryParams.salesmethodname" placeholder="请输入销售大区" clearable class="input-with-select"  style="width: 100%;" size="mini">
               <el-select v-model="queryParams.salesmethodnameType" slot="prepend" placeholder="请选择" style="width: 75px;" size="mini">
                 <el-option label="模糊" value="1">
                   <span style="float: left">模糊</span>
@@ -129,7 +129,10 @@
                   <span style="float: right; color: #8492a6;margin-left: 10px; font-size: 13px">多个值,使用英文逗号隔开</span>
                 </el-option>
               </el-select>
-            </el-input>
+            </el-input> -->
+            <el-select v-model="queryParams.salesmethodname" placeholder="请选择销售部门" clearable class="input-with-select"  style="width: 100%;" size="mini">
+                <el-option  v-for="dict in getDictDatas(DICT_TYPE.SALES_DEPT)" :key="dict.value"  :label="dict.label"  :value="dict.value" />
+              </el-select>
           </el-form-item>
         </el-col>
         <el-col :span="4">

+ 20 - 2
src/views/contract/order/Form.vue

@@ -4,7 +4,17 @@
     <el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="500px" v-dialogDrag append-to-body>
       <el-form ref="formRef" :model="formData" :rules="formRules" v-loading="formLoading" label-width="150px">
         <el-form-item label="合同打印类型" prop="htdymb">
-          <el-input v-model="formData.htdymb" placeholder="请输入合同打印类型" />
+          <!-- <el-input v-model="formData.htdymb" placeholder="请输入合同打印类型" /> -->
+            <el-select v-model="formData.htdymb" placeholder="请选择合同打印类型"  clearable style="width: 100%;" size="mini" >
+              <el-option
+                v-for="item in htdymbList"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value">
+                <span style="float: left">{{ item.label }}</span>
+                <span style="float: right; color: #8492a6; font-size: 13px">{{ item.value }}</span>
+              </el-option>
+            </el-select>
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
@@ -14,7 +24,6 @@
     </el-dialog>
   </div>
 </template>
-
 <script>
   import * as OrderApi from '@/api/contract/order';
       export default {
@@ -33,6 +42,15 @@
         formData: {
           htdymb: undefined,
         },
+        htdymbList:[
+          {label:'纺丝合同模版',value:'Y1'},
+          {label:'切片合同模版',value:'Y2'},
+          {label:'报价单模板',value:'Y3'},
+          // {label:'出口合同模板',value:'Y4'},
+          {label:'合约价合同模版',value:'Y5'},
+          {label:'退货合同模板',value:'Y6'},
+          {label:'借贷项模板',value:'Y7'}
+        ],
         // 表单校验
         formRules: {
           htdymb: [{ required: true, message: '合同打印模板不能为空', trigger: 'blur' }],