|
@@ -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 {}
|
|
|
}
|
|
|
}
|