Commit e127072c authored by wanghf's avatar wanghf

线上发包任务,发票信息管理功能优化

parent 0e4826fc
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
>详情</el-button> >详情</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <!-- <el-col :span="1.5">
<el-button <el-button
type="primary" type="primary"
icon="el-icon-plus" icon="el-icon-plus"
...@@ -87,7 +87,7 @@ ...@@ -87,7 +87,7 @@
@click="handleDelete" @click="handleDelete"
v-hasPermi="['business:invoiceApply:remove']" v-hasPermi="['business:invoiceApply:remove']"
>删除</el-button> >删除</el-button>
</el-col> </el-col>-->
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
type="warning" type="warning"
...@@ -441,7 +441,7 @@ import { ...@@ -441,7 +441,7 @@ import {
} from '@/api/business/invoiceApply' } from '@/api/business/invoiceApply'
import { listCompanyInfo } from '@/api/business/companyInfo' import { listCompanyInfo } from '@/api/business/companyInfo'
import fa from 'element-ui/src/locale/lang/fa' import fa from 'element-ui/src/locale/lang/fa'
import { querySignList } from '@/api/business/unitInfo' import { laborSign, querySignList } from '@/api/business/unitInfo'
export default { export default {
name: "InvoiceApply", name: "InvoiceApply",
...@@ -619,7 +619,7 @@ export default { ...@@ -619,7 +619,7 @@ export default {
pageNum: 1, pageNum: 1,
pageSize: 1000 pageSize: 1000
} }
querySignList(queryParams).then(response => { laborSign(queryParams).then(response => {
if (response.code == 200) { if (response.code == 200) {
this.taxCompanyList = response.rows; this.taxCompanyList = response.rows;
} }
...@@ -772,6 +772,7 @@ export default { ...@@ -772,6 +772,7 @@ export default {
this.uploadInvoiceOpen = false; this.uploadInvoiceOpen = false;
this.uploadInvoieFile = null; this.uploadInvoieFile = null;
this.getList(); this.getList();
location.reload();
}else { }else {
this.$message.error(res.msg); this.$message.error(res.msg);
} }
...@@ -794,6 +795,8 @@ export default { ...@@ -794,6 +795,8 @@ export default {
updateInvoiceStatus(obj).then((res) => { updateInvoiceStatus(obj).then((res) => {
if (res.code === 200) { if (res.code === 200) {
this.$message.success("确认成功!"); this.$message.success("确认成功!");
this.getList();
location.reload();
} }
}).finally(() => { }).finally(() => {
this.loading = false; this.loading = false;
......
...@@ -214,8 +214,7 @@ import { ...@@ -214,8 +214,7 @@ import {
getInvoiceInfoByCompanyId getInvoiceInfoByCompanyId
} from '@/api/business/invoiceInfo' } from '@/api/business/invoiceInfo'
import { addApplyInvoice } from '@/api/business/invoiceApply' import { addApplyInvoice } from '@/api/business/invoiceApply'
import { querySignList } from '@/api/business/unitInfo' import { laborSign, querySignList } from '@/api/business/unitInfo'
export default { export default {
name: "PayOrder", name: "PayOrder",
components: { RePay }, components: { RePay },
...@@ -332,7 +331,7 @@ export default { ...@@ -332,7 +331,7 @@ export default {
pageNum: 1, pageNum: 1,
pageSize: 1000 pageSize: 1000
} }
querySignList(queryParams).then(response => { laborSign(queryParams).then(response => {
if (response.code == 200) { if (response.code == 200) {
this.taxCompanyList = response.rows; this.taxCompanyList = response.rows;
} }
......
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
v-hasPermi="['business:onlineTaskInfo:add']" v-hasPermi="['business:onlineTaskInfo:add']"
>发布任务</el-button> >发布任务</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <!-- <el-col :span="1.5">
<el-button <el-button
type="success" type="success"
icon="el-icon-edit" icon="el-icon-edit"
...@@ -79,7 +79,7 @@ ...@@ -79,7 +79,7 @@
@click="handleDelete" @click="handleDelete"
v-hasPermi="['business:onlineTaskInfo:remove']" v-hasPermi="['business:onlineTaskInfo:remove']"
>删除</el-button> >删除</el-button>
</el-col> </el-col>-->
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
type="warning" type="warning"
...@@ -184,10 +184,10 @@ ...@@ -184,10 +184,10 @@
<div style="margin-top: 20px;" v-if="active == 1"> <div style="margin-top: 20px;" v-if="active == 1">
<el-form ref="form" :model="form" :rules="rules" label-width="120px"> <el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-form-item label="任务编号" prop="taskNo"> <el-form-item label="任务编号" prop="taskNo">
<el-input v-model="form.taskNo" placeholder="请输入任务编号" /> <el-input v-model="form.taskNo" placeholder="请输入任务编号" disabled/>
</el-form-item> </el-form-item>
<el-form-item label="发起企业" prop="companyId"> <el-form-item label="发起企业" prop="companyId">
<el-select v-model="form.companyId" placeholder="请选择采购方" clearable @change="applyCompanyChange"> <el-select v-model="form.companyId" placeholder="请选择发起企业" clearable @change="applyCompanyChange">
<el-option v-for="item in applyCompanyList" :key="item.id" :label="item.companyName" :value="item.id"></el-option> <el-option v-for="item in applyCompanyList" :key="item.id" :label="item.companyName" :value="item.id"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -197,8 +197,8 @@ ...@@ -197,8 +197,8 @@
<el-form-item label="所属行业" prop="industry"> <el-form-item label="所属行业" prop="industry">
<el-input v-model="form.industry" placeholder="请输入所属行业" /> <el-input v-model="form.industry" placeholder="请输入所属行业" />
</el-form-item> </el-form-item>
<el-form-item label="代发企业" prop="taxCompanyId"> <el-form-item label="代发企业" prop="taxCompanySignId">
<el-select v-model="form.taxCompanyId" placeholder="请选择销售方" clearable @change="taxCompanyChange"> <el-select v-model="form.taxCompanySignId" placeholder="请选择代发企业" clearable @change="taxCompanyChange">
<el-option v-for="item in taxCompanyList" :key="item.id" :label="item.taxUnitName" :value="item.id"></el-option> <el-option v-for="item in taxCompanyList" :key="item.id" :label="item.taxUnitName" :value="item.id"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -295,6 +295,7 @@ export default { ...@@ -295,6 +295,7 @@ export default {
return { return {
// 任务名称 // 任务名称
batchPayName : '', batchPayName : '',
onlineTaskId : '',
// 支付方式 // 支付方式
payType: '', payType: '',
payVisible: false, payVisible: false,
...@@ -377,6 +378,9 @@ export default { ...@@ -377,6 +378,9 @@ export default {
taxCompanyId: [ taxCompanyId: [
{ required: true, message: "代发企业id不能为空", trigger: "blur" } { required: true, message: "代发企业id不能为空", trigger: "blur" }
], ],
taxCompanySignId: [
{ required: true, message: "代发企业id不能为空", trigger: "blur" }
],
taxCompanyName: [ taxCompanyName: [
{ required: true, message: "代发企业名称不能为空", trigger: "blur" } { required: true, message: "代发企业名称不能为空", trigger: "blur" }
], ],
...@@ -461,6 +465,10 @@ export default { ...@@ -461,6 +465,10 @@ export default {
} }
laborSign(queryParams).then(response => { laborSign(queryParams).then(response => {
if (response.code == 200) { if (response.code == 200) {
if(response.total == 0){
this.$modal.msgError("该企业未签约,无法发布任务");
return;
}
this.taxCompanyList = response.rows; this.taxCompanyList = response.rows;
} }
}) })
...@@ -537,6 +545,7 @@ export default { ...@@ -537,6 +545,7 @@ export default {
this.reset(); this.reset();
this.open = true; this.open = true;
this.title = "添加线上任务信息"; this.title = "添加线上任务信息";
this.form.taskNo = this.generateTimeCodeWithRandom();
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
...@@ -610,7 +619,8 @@ export default { ...@@ -610,7 +619,8 @@ export default {
this.form.taxCompanyInvoice = {}; this.form.taxCompanyInvoice = {};
this.taxCompanyList.forEach(item => { this.taxCompanyList.forEach(item => {
if (item.id == val) { if (item.id == val) {
this.formApply.taxCompanyName = item.taxUnitName; this.form.taxCompanyId = item.taxUnitId;
this.form.taxCompanyName = item.taxUnitName;
} }
}) })
}, },
...@@ -650,7 +660,7 @@ export default { ...@@ -650,7 +660,7 @@ export default {
}, },
//发布任务 //发布任务
handleRelease(row) { handleRelease(row) {
this.$confirm('是否确认发布任务?', '提示', { this.$confirm('是否确认发布任务【'+row.taskName+'】?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
...@@ -658,15 +668,16 @@ export default { ...@@ -658,15 +668,16 @@ export default {
const obj = { id: row.id, status: 11 } const obj = { id: row.id, status: 11 }
updateStatus(obj).then(response => { updateStatus(obj).then(response => {
if (response.code == 200) { if (response.code == 200) {
this.$modal.msgSuccess("发布成功"); this.$modal.msgSuccess("发布任务成功");
this.getList(); this.getList();
location.reload();
} }
}) })
}).catch(() => {}); }).catch(() => {});
}, },
//接收任务 //接收任务
handleRecived(row) { handleRecived(row) {
this.$confirm('是否确认接收任务?', '提示', { this.$confirm('是否确认接收任务【'+row.taskName+'】?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
...@@ -674,8 +685,9 @@ export default { ...@@ -674,8 +685,9 @@ export default {
const obj = { id: row.id, status: 21 } const obj = { id: row.id, status: 21 }
updateStatus(obj).then(response => { updateStatus(obj).then(response => {
if (response.code == 200) { if (response.code == 200) {
this.$modal.msgSuccess("接收成功"); this.$modal.msgSuccess("接收任务成功");
this.getList(); this.getList();
location.reload();
} }
}) })
}).catch(() => {}); }).catch(() => {});
...@@ -691,22 +703,38 @@ export default { ...@@ -691,22 +703,38 @@ export default {
// 导入名单 // 导入名单
importPayInfo(row) { importPayInfo(row) {
this.payVisible = true; this.payVisible = true;
this.batchPayName = "发包任务-"+row.taskName+"-"+row.id; this.onlineTaskId = row.id;
this.batchPayName = "线上发包任务-"+row.taskName+"-"+row.id;
console.log(this.batchPayName) console.log(this.batchPayName)
}, },
// 跳转到批量到支付宝 // 跳转到批量到支付宝
toLinkAlipay() { toLinkAlipay() {
console.log(this.batchPayName) console.log(this.batchPayName)
this.$router.push({ path: "/transfer/batchToAli", query: { batchPayName: this.batchPayName,number:123 } }); this.$router.push({ path: "/transfer/batchToAli", query: { batchPayName: this.batchPayName, onlineTaskId:this.onlineTaskId } });
this.payVisible = false this.payVisible = false
}, },
// 跳转到批量到银行卡 // 跳转到批量到银行卡
toLinkBankCard() { toLinkBankCard() {
console.log(this.batchPayName) console.log(this.batchPayName)
this.$router.push({ path: "/transfer/batchToBank", query: { batchPayName: this.batchPayName,number:123 } }); this.$router.push({ path: "/transfer/batchToBank", query: { batchPayName: this.batchPayName, onlineTaskId:this.onlineTaskId } });
this.payVisible = false this.payVisible = false
}, },
} generateTimeCodeWithRandom() {
const timePart = this.generateTimeCode(); // 复用基础时间编码
const random = Math.floor(Math.random() * 1000).toString().padStart(3, '0');
return `${timePart}${random}`;
},
generateTimeCode() {
const now = new Date();
const year = now.getFullYear();
const month = String(now.getMonth() + 1).padStart(2, '0'); // 补零
const date = String(now.getDate()).padStart(2, '0');
// const hours = String(now.getHours()).padStart(2, '0');
// const minutes = String(now.getMinutes()).padStart(2, '0');
// const seconds = String(now.getSeconds()).padStart(2, '0');
return `${year}${month}${date}`;
}
}
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
...@@ -184,6 +184,9 @@ export default { ...@@ -184,6 +184,9 @@ export default {
dicts: ['pay_type_title', 'payee_acc_type'], dicts: ['pay_type_title', 'payee_acc_type'],
data() { data() {
return { return {
//发包任务名称
defaultBatchPayName: null,
page: { page: {
search: '', search: '',
rows: [], rows: [],
...@@ -265,8 +268,13 @@ export default { ...@@ -265,8 +268,13 @@ export default {
this.batchForm.payerAccNo = String(this.$route.query.number) this.batchForm.payerAccNo = String(this.$route.query.number)
} }
if (this.$route.query.batchPayName) { if (this.$route.query.batchPayName) {
this.defaultBatchPayName = this.$route.query.batchPayName;
this.batchForm.batchPayName = this.$route.query.batchPayName; this.batchForm.batchPayName = this.$route.query.batchPayName;
} }
if (this.$route.query.onlineTaskId) {
this.batchForm.onlineTaskId = this.$route.query.onlineTaskId;
}
console.log(this.batchForm)
}, },
methods: { methods: {
// 新增明细 // 新增明细
......
...@@ -270,6 +270,10 @@ export default { ...@@ -270,6 +270,10 @@ export default {
this.defaultBatchPayName = this.$route.query.batchPayName; this.defaultBatchPayName = this.$route.query.batchPayName;
this.batchForm.batchPayName = this.$route.query.batchPayName; this.batchForm.batchPayName = this.$route.query.batchPayName;
} }
if (this.$route.query.onlineTaskId) {
this.batchForm.onlineTaskId = this.$route.query.onlineTaskId;
}
console.log(this.batchForm)
}, },
methods: { methods: {
chaheuhashjs() { chaheuhashjs() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment