|
|
|
@ -204,7 +204,7 @@ import {
|
|
|
|
|
getThrInvOrderDetails,
|
|
|
|
|
delThrInvOrderDetail,
|
|
|
|
|
refreshBill,
|
|
|
|
|
dlInvGhOrder, downloadInvPhOrder
|
|
|
|
|
dlInvGhOrder, downloadInvPhOrder,generateOrder,generateGhOrder
|
|
|
|
|
} from "@/api/thrsys/thrInvOrder";
|
|
|
|
|
import {getBussinessType} from "@/api/basic/bussinessType";
|
|
|
|
|
import {getOriginBusType} from "@/api/basic/busOriginType";
|
|
|
|
@ -212,6 +212,7 @@ import {getBasicThirdSys, filterDetailByKey} from "@/api/basic/basicThirdSys";
|
|
|
|
|
import {selectIp} from "@/api/param/systemParamConfig";
|
|
|
|
|
import thrInvOrderGenerate from "@/views/thirdSys/invOrder/thrInvOrderGenerate";
|
|
|
|
|
import moment from "moment";
|
|
|
|
|
import { parseTime } from '../../../utils/coTools'
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
data() {
|
|
|
|
@ -348,8 +349,42 @@ export default {
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
generateBill(row){
|
|
|
|
|
this.thisData = row;
|
|
|
|
|
this.thrInvOrderGenerateVisible = true;
|
|
|
|
|
|
|
|
|
|
this.$confirm("此操作将生成单据, 是否继续?", "提示", {
|
|
|
|
|
confirmButtonText: "确定",
|
|
|
|
|
cancelButtonText: "取消",
|
|
|
|
|
type: "warning",
|
|
|
|
|
})
|
|
|
|
|
.then(() => {
|
|
|
|
|
//页面初始化
|
|
|
|
|
row.code = ''
|
|
|
|
|
row.orderType = 4
|
|
|
|
|
let date = new Date()
|
|
|
|
|
row.createTime = parseTime(
|
|
|
|
|
date,
|
|
|
|
|
'{y}-{m}-{d} {h}:{i}:{s}'
|
|
|
|
|
)
|
|
|
|
|
row.corpOrderId =
|
|
|
|
|
parseTime(date, '{y}{m}{d}{h}{i}{s}') +
|
|
|
|
|
Math.ceil(Math.random() * 89 + 10)
|
|
|
|
|
row.action = row.billType;
|
|
|
|
|
row.fromCorp = row.invCode;
|
|
|
|
|
|
|
|
|
|
generateOrder(row).then((res) => {
|
|
|
|
|
if (res.code == 20000) {
|
|
|
|
|
this.$message.success('生成成功!')
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.error(res.message)
|
|
|
|
|
}
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
this.$message.error(error.message)
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
refreshBill(row){
|
|
|
|
|
let rQuery = {
|
|
|
|
|