-
+
{{ index + 1 }}
{{ item.projectName }}
-
@@ -369,7 +650,217 @@
取 消
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 筛选
+
+
+
+
+
+
+ {{
+ scope.row.carNum || scope.row.certificateNum || "----"
+ }}
+
+
+
+
+
+
+
+ {{
+ scope.row.goodsPrice / 100
+ }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -392,10 +883,12 @@ import {
delWorkInfo,
detail,
getINspectionProject,
- getWeorkNodesById, getCustomerSource
+ getWeorkNodesById,
+ getCustomerSource,
+ batchSettlement,
} from "./api/workOrder";
-import print from 'vue-print-nb'
-import moment from 'moment';
+import print from "vue-print-nb";
+import moment from "moment";
import request from "@/utils/request";
import DictTag from "@/components/DictTagOld/index.vue";
import CashierConfirmForm from "@/views/drivingSchool/DriveSchoolPay/form/cashierConfirmForm.vue";
@@ -404,16 +897,51 @@ import FileUpload from "@/components/FileUpload/index.vue";
export default {
name: "Info",
- dicts: ['customer_source', 'pay_type', 'car_status', 'car_use_nature', 'inspection_use_role'],
+ dicts: [
+ "customer_source",
+ "pay_type",
+ "car_status",
+ "car_use_nature",
+ "inspection_use_role",
+ ],
directives: {
- print
+ print,
+ },
+ components: {
+ InspectionCashierConfirmForm,
+ CashierConfirmForm,
+ DictTag,
+ FileUpload,
},
- components: {InspectionCashierConfirmForm, CashierConfirmForm, DictTag, FileUpload},
data() {
return {
+ batchSettleVisible: false,
+ batchType: "",
+ settleDialogVisible: false,
+ batchSelectedOrders: [],
+ batchSelectedMoney: [],
+ batchQueryParams: {
+ pageNum: 1,
+ pageSize: 100,
+ payStatus: this.batchType == "cn" ? 0 : 2,
+ datetimeRange: [],
+ },
+ cashierConfirmOption: [
+ {
+ value: '0',
+ label: '未到账'
+ },
+ {
+ value: '1',
+ label: '已到账'
+ },
+ ],
+ batchOrderList: [],
+ settleForm: {},
+ batchTotal: 0,
moneyData: {
payMoneySum: 0,
- goodsPriceSum: 0
+ goodsPriceSum: 0,
},
projectList: [],
skuNames: [
@@ -439,35 +967,41 @@ export default {
},
],
isPass: 1,
- isRetrial: '',
- remark: '',
- optionss: [{
- value: '1',
- label: '合格'
- }, {
- value: '0',
- label: '不合格'
- }],
- optionsss: [{
- value: '1',
- label: '重审'
- }, {
- value: '0',
- label: '退办理'
- }],
+ isRetrial: "",
+ remark: "",
+ optionss: [
+ {
+ value: "1",
+ label: "合格",
+ },
+ {
+ value: "0",
+ label: "不合格",
+ },
+ ],
+ optionsss: [
+ {
+ value: "1",
+ label: "重审",
+ },
+ {
+ value: "0",
+ label: "退办理",
+ },
+ ],
goodsPrice: 0,
- reduceMoney: '',
- payMoney: '',
- payType: '',
- receivablesAccount: '',
- payRemark: '',
- fileUrls: '',
- inspectionId: '',
- size: '',
- workId: '',
+ reduceMoney: "",
+ payMoney: "",
+ payType: "",
+ receivablesAccount: "",
+ payRemark: "",
+ fileUrls: "",
+ inspectionId: "",
+ size: "",
+ workId: "",
// workerList:[],
- value: '',
+ value: "",
options: [],
// 遮罩层
loading: true,
@@ -522,41 +1056,65 @@ export default {
// 表单校验
rules: {
connectionName: [
- {required: true, message: "联系人名称不能为空", trigger: "blur"}
+ { required: true, message: "联系人名称不能为空", trigger: "blur" },
],
connectionPhone: [
- {required: true, message: "联系人手机号不能为空", trigger: "blur"}
+ { required: true, message: "联系人手机号不能为空", trigger: "blur" },
],
licenseNum: [
- {required: true, message: "车牌号不能为空", trigger: "blur"}
+ { required: true, message: "车牌号不能为空", trigger: "blur" },
],
isAppointment: [
- {required: true, message: "是否为预约单不能为空", trigger: "change"}
+ {
+ required: true,
+ message: "是否为预约单不能为空",
+ trigger: "change",
+ },
],
rescueType: [
- {required: true, message: "救援类型 1拖车2送油3搭电4换台5扣车不能为空", trigger: "change"}
+ {
+ required: true,
+ message: "救援类型 1拖车2送油3搭电4换台5扣车不能为空",
+ trigger: "change",
+ },
],
carType: [
- {required: true, message: "车辆类型 大中小不能为空", trigger: "change"}
+ {
+ required: true,
+ message: "车辆类型 大中小不能为空",
+ trigger: "change",
+ },
],
rescuePosition: [
- {required: true, message: "救援地点 详细描述不能为空", trigger: "blur"}
+ {
+ required: true,
+ message: "救援地点 详细描述不能为空",
+ trigger: "blur",
+ },
],
feeType: [
- {required: true, message: "收费类型不能为空", trigger: "change"}
+ { required: true, message: "收费类型不能为空", trigger: "change" },
],
- }
+ },
+ settleRules: {
+ payType: [
+ { required: true, message: "请选择支付方式", trigger: "change" },
+ ],
+ realPayMoney: [
+ { required: true, message: "请输入实付金额", trigger: "blur" },
+ ],
+ },
};
},
created() {
- this.dict = {type: {}}
+ this.dict = { type: {} };
for (let i = 0; i < this.$options.dicts.length; i++) {
request({
- url: '/rescue/dict/data/type/' + this.$options.dicts[i],
- method: 'get'
- }).then(res => {
- this.$set(this.dict.type, this.$options.dicts[i], res.data)
- })
+ url: "/rescue/dict/data/type/" + this.$options.dicts[i],
+ method: "get",
+ }).then((res) => {
+ this.$set(this.dict.type, this.$options.dicts[i], res.data);
+ });
}
// this.getpid()
this.getList();
@@ -567,90 +1125,184 @@ export default {
// 根据角色判断是否显示对应的列
showCashierColumn() {
// return this.$store.getters.roles.includes('cn')
- return ['jccn', 'tenant_admin'].some(role => this.$store.getters.roles.includes(role));
+ return ["cn", "jcnc","tenant_admin"].some((role) =>
+ this.$store.getters.roles.includes(role)
+ );
},
// 根据角色判断是否显示对应的列
showAccountingColumn() {
// return this.$store.getters.roles.includes('cn')
- return ['jckj', 'tenant_admin'].some(role => this.$store.getters.roles.includes(role));
+ return ["kj", "jckj","tenant_admin"].some((role) =>
+ this.$store.getters.roles.includes(role)
+ );
},
showCashierColumnTwo() {
- return this.$store.getters.roles.includes('jccn')
- }
+ return this.$store.getters.roles.includes("cn");
+ },
},
methods: {
+ handleBatchSettle(type) {
+ if(type == 'cn') {
+ this.batchQueryParams.payStatus = 0;
+ } else {
+ this.batchQueryParams.payStatus = 2;
+ }
+ this.batchType = type;
+ this.batchSettleVisible = true;
+ this.handleBatchQuery();
+ },
+ handleBatchQuery() {
+ const params = {
+ ...this.batchQueryParams,
+ pageNum: this.batchQueryParams.pageNum || 1,
+ pageSize: this.batchQueryParams.pageSize || 100,
+ };
+ listWorkOrder(params).then((response) => {
+ this.batchOrderList = response.data.records;
+ this.batchTotal = response.data.total;
+ });
+ },
+ handleBatchSelectionChange(selection) {
+ this.batchSelectedOrders = selection.map((item) => item.id);
+ this.batchSelectedMoney = selection;
+ },
+ handleConfirmBatchSettle() {
+ // 判断是否选中 如果没有选中则提示
+
+ if (this.batchSelectedOrders.length === 0) {
+ this.$message.warning("请选择结算工单");
+ return;
+ }
+ this.settleDialogVisible = true;
+ console.log(this.batchSelectedMoney);
+
+ this.settleForm.realPayMoney = this.batchSelectedMoney.reduce(
+ (total, item) => {
+ total += item.goodsPrice / 100;
+ return total;
+ },
+ 0
+ );
+ },
+ handleSettleSubmit() {
+ this.$refs.settleForm.validate((valid) => {
+ if (valid) {
+ const params = {
+ ids: this.batchSelectedOrders,
+ ...this.settleForm,
+ realPayMoney: this.settleForm.realPayMoney * 100, // 将元转换为分
+ type: this.batchType,
+ };
+ this.$modal.loading("正在提交结算信息...");
+ batchSettlement(params)
+ .then(() => {
+ this.$modal.msgSuccess("结算成功");
+ this.settleDialogVisible = false;
+ this.batchDialogVisible = false;
+ this.handleBatchQuery();
+ })
+ .finally(() => {
+ this.$modal.closeLoading();
+ this.settleForm = {};
+ });
+ }
+ });
+ },
+ calculateTotalAmount() {
+ return this.batchSelectedOrders.reduce(
+ (sum, item) => sum + item.goodsPrice / 100,
+ 0
+ );
+ },
+ handleExportCommand(command) {
+ if (command === "all") {
+ this.$modal.msgSuccess("导出全部功能待实现");
+ } else if (command === "selected") {
+ const ids = this.batchSelectedOrders.map((item) => item.id);
+ this.$modal.msgSuccess(`已选择${ids.length}条记录待导出`);
+ }
+ },
+ checkoutBatchSettlement(ids) {
+ const data = { ids: ids };
+ this.$modal
+ .confirm("确定要结算吗?")
+ .then(() => {
+ return batchSettlement(data);
+ })
+ .then(() => {
+ this.$modal.msgSuccess("结算成功");
+ this.getList();
+ });
+ },
jieshutij() {
let data = {
id: this.inspectionId,
isPass: this.isPass,
isRetrial: this.isRetrial,
- remark: this.remark
- }
- stopInspection(data).then(res => {
- console.log(res)
- this.$message.success("操作成功")
- this.openhe = false
- this.getList()
- })
+ remark: this.remark,
+ };
+ stopInspection(data).then((res) => {
+ console.log(res);
+ this.$message.success("操作成功");
+ this.openhe = false;
+ this.getList();
+ });
},
/** 出纳确认*/
- openCashierConfirm(data,type) {
+ openCashierConfirm(data, type) {
const dataNew = {
id: data,
- type:type
- }
+ type: type,
+ };
this.$refs["cashierConfirmRef"].open(dataNew);
},
clickProject(data) {
- let idx = this.selectInspectionProjectIds.indexOf(data.id)
+ let idx = this.selectInspectionProjectIds.indexOf(data.id);
if (idx > -1) {
// 如果元素存在于数组中,则使用splice方法来删除它
this.selectInspectionProject.splice(idx, 1);
- this.selectInspectionProjectIds.splice(idx, 1)
+ this.selectInspectionProjectIds.splice(idx, 1);
} else {
- this.selectInspectionProject.push(data)
- this.selectInspectionProjectIds.push(data.id)
+ this.selectInspectionProject.push(data);
+ this.selectInspectionProjectIds.push(data.id);
}
- console.log('已选择的检测项目', this.selectInspectionProject)
-
+ console.log("已选择的检测项目", this.selectInspectionProject);
},
jieshu(row) {
-
- this.inspectionId = row.id
- this.isPass = "",
- this.isRetrial = "",
- this.remark = "",
- this.openhe = true
+ this.inspectionId = row.id;
+ (this.isPass = ""),
+ (this.isRetrial = ""),
+ (this.remark = ""),
+ (this.openhe = true);
},
/*获取检测项目*/
getINspectionProject() {
- this.selectInspectionProject = []
- getINspectionProject().then(res => {
- console.log('检测项目', res)
- this.projectList = res.data.records
- })
+ this.selectInspectionProject = [];
+ getINspectionProject().then((res) => {
+ console.log("检测项目", res);
+ this.projectList = res.data.records;
+ });
},
zhizheng(row) {
- console.log(row)
+ console.log(row);
let data = {
- inspectionId: row.id
- }
- makeCertOk(data).then(res => {
-
- this.$message.success("操作成功")
- this.getList()
- })
+ inspectionId: row.id,
+ };
+ makeCertOk(data).then((res) => {
+ this.$message.success("操作成功");
+ this.getList();
+ });
},
jisuan() {
- if (this.reduceMoney > (this.goodsPrice / 100)) {
- this.reduceMoney = this.goodsPrice / 100
+ if (this.reduceMoney > this.goodsPrice / 100) {
+ this.reduceMoney = this.goodsPrice / 100;
}
- this.payMoney = (this.goodsPrice / 100) - this.reduceMoney
+ this.payMoney = this.goodsPrice / 100 - this.reduceMoney;
},
tijiao() {
- console.log(this.fileUrls)
+ console.log(this.fileUrls);
if (Array.isArray(this.fileUrls)) {
- this.fileUrls = '';
+ this.fileUrls = "";
}
let data = {
reduceMoney: this.reduceMoney ? this.reduceMoney * 100 : 0,
@@ -660,126 +1312,124 @@ export default {
payRemark: this.payRemark,
inspectionId: this.inspectionId,
files: this.fileUrls,
- }
- offlineCharging(data).then(res => {
- this.openxin = false
- this.$message.success("结算成功")
- this.getList()
- })
-
+ };
+ offlineCharging(data).then((res) => {
+ this.openxin = false;
+ this.$message.success("结算成功");
+ this.getList();
+ });
},
settleAccounts(id) {
- settleAccounts(id).then(res => {
+ settleAccounts(id).then((res) => {
if (res.code == 0) {
- this.$message.success("清算成功")
- this.getList()
+ this.$message.success("清算成功");
+ this.getList();
}
- })
+ });
},
customerSource() {
const data = {
- type:1
- }
- getCustomerSource(data).then(res => {
- this.customerData = res.data
- })
+ type: 1,
+ };
+ getCustomerSource(data).then((res) => {
+ this.customerData = res.data;
+ });
},
business() {
const data = {
- type:0
- }
- getCustomerSource(data).then(res => {
- this.businessList = res.data
- })
+ type: 0,
+ };
+ getCustomerSource(data).then((res) => {
+ this.businessList = res.data;
+ });
},
watchWork(row) {
- workOrderView(row.id).then(res => {
- this.htmlStr = res.data
- })
- this.open = true
- this.form = row
- this.open = true
+ workOrderView(row.id).then((res) => {
+ this.htmlStr = res.data;
+ });
+ this.open = true;
+ this.form = row;
+ this.open = true;
},
xinWork(row) {
- this.inspectionId = row.id
- this.reduceMoney = 0,
- this.payMoney = null,
- this.payType = null,
- this.receivablesAccount = null,
- this.payRemark = null,
- inspectionDetail(row.id).then(res => {
- this.offline = res.data
- this.goodsPrice = res.data.goodsPrice
- this.payMoney = res.data.payMoney ? res.data.payMoney / 100 : null
- this.payType = res.data.payType ? res.data.payType : null
- this.fileUrls = res.data.files ? res.data.files : []
- this.payRemark = res.data.payRemark ? res.data.payRemark : null
- console.log(res)
- })
- this.openxin = true
+ this.inspectionId = row.id;
+ (this.reduceMoney = 0),
+ (this.payMoney = null),
+ (this.payType = null),
+ (this.receivablesAccount = null),
+ (this.payRemark = null),
+ inspectionDetail(row.id).then((res) => {
+ this.offline = res.data;
+ this.goodsPrice = res.data.goodsPrice;
+ this.payMoney = res.data.payMoney ? res.data.payMoney / 100 : null;
+ this.payType = res.data.payType ? res.data.payType : null;
+ this.fileUrls = res.data.files ? res.data.files : [];
+ this.payRemark = res.data.payRemark ? res.data.payRemark : null;
+ console.log(res);
+ });
+ this.openxin = true;
},
detail(row) {
- console.log('点击详情', row)
+ console.log("点击详情", row);
//根据id查询详情
let params = {
- inspectionInfoId: row.id
- }
- detail(params).then(res => {
- this.detailForm = res.data.stepInfos
- console.log('详情', this.detailForm)
- })
- this.opendetail = true
+ inspectionInfoId: row.id,
+ };
+ detail(params).then((res) => {
+ this.detailForm = res.data.stepInfos;
+ console.log("详情", this.detailForm);
+ });
+ this.opendetail = true;
},
//获取pid
getpid() {
- shopInfo().then(res => {
- this.partnerId = res.data.partnerId
+ shopInfo().then((res) => {
+ this.partnerId = res.data.partnerId;
this.getList();
-
- })
+ });
},
handleChanges(e) {
-
- console.log('执行了查询', e)
+ console.log("执行了查询", e);
},
handleChange(e) {
- console.log(e)
+ console.log(e);
},
/** 查询道路救援模块列表 */
getList() {
this.loading = true;
- console.log(this.queryParams.jcTime)
+ console.log(this.queryParams.jcTime);
if (this.queryParams.jcTime) {
- this.queryParams.startTime = this.queryParams.jcTime[0]
- this.queryParams.endTime = this.queryParams.jcTime[1]
+ this.queryParams.startTime = this.queryParams.jcTime[0];
+ this.queryParams.endTime = this.queryParams.jcTime[1];
}
- listWorkOrder(this.queryParams).then(response => {
+ listWorkOrder(this.queryParams).then((response) => {
this.infoList = response.data.records;
this.total = response.data.total;
this.loading = false;
});
- workOrderData(this.queryParams).then(response => {
- this.moneyData = response.data
+ workOrderData(this.queryParams).then((response) => {
+ this.moneyData = response.data;
});
let data = {
partnerId: this.partnerId,
workName: this.value,
pageNum: 1,
pageSize: 100,
- }
+ };
// getWorker(data).then(res =>{
// console.log(res)
// this.workerList = res.rows
// })
- getBankAccountList().then(res => {
- res.data.forEach(it => {
- let temp = {}
- temp.key = it.remark + it.dictLabel
- this.BankAccountList.push(temp)
- })
- })
+ getBankAccountList().then((res) => {
+ this.BankAccountList = res.data
+ // res.data.forEach((it) => {
+ // let temp = {};
+ // temp.key = it.remark + it.label;
+ // this.BankAccountList.push(temp);
+ // });
+ });
this.loading = false;
},
// 取消按钮
@@ -787,7 +1437,7 @@ export default {
this.open = false;
this.addOpen = false;
this.reset();
- this.selectInspectionProjectIds = []
+ this.selectInspectionProjectIds = [];
},
// 表单重置
reset() {
@@ -817,11 +1467,10 @@ export default {
updateBy: null,
otherPhone: null,
};
- this.selectInspectionProject = []
+ this.selectInspectionProject = [];
this.resetForm("form");
},
-
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
@@ -829,120 +1478,121 @@ export default {
},
/** 重置按钮操作 */
resetQuery() {
- this.queryParams.jcTime = null
+ this.queryParams.jcTime = null;
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
- this.ids = selection.map(item => item.id)
- this.single = selection.length !== 1
- this.multiple = !selection.length
+ this.ids = selection.map((item) => item.id);
+ this.single = selection.length !== 1;
+ this.multiple = !selection.length;
},
/** 新增按钮操作 */
handleAdd() {
- this.getINspectionProject()
- this.isInsert = true
+ this.getINspectionProject();
+ this.isInsert = true;
this.getLeadeMan();
this.getMeetMan();
- listGoods().then(res => {
- res.data.forEach(it => {
- let temp = {}
+ listGoods().then((res) => {
+ res.data.forEach((it) => {
+ let temp = {};
temp.value = it.id;
temp.label = it.title;
- let temp1 = []
- it.skuList.forEach(item => {
- let temp2 = {}
+ let temp1 = [];
+ it.skuList.forEach((item) => {
+ let temp2 = {};
temp2.value = item.id;
temp2.label = item.skuName;
- temp1.push(temp2)
- })
- temp.children = temp1
- this.options.push(temp)
- })
- console.log(this.options)
- })
+ temp1.push(temp2);
+ });
+ temp.children = temp1;
+ this.options.push(temp);
+ });
+ console.log(this.options);
+ });
this.reset();
this.addOpen = true;
this.title = "工单";
},
/** 修改按钮操作 */
handleUpdate(row) {
- this.isInsert = false
+ this.isInsert = false;
this.reset();
this.getLeadeMan();
this.getMeetMan();
- this.form = row
- let skuId = parseInt(row.skuId)
- this.form.skuId = [row.goodsId, skuId]
- console.log(this.form)
- listGoods().then(res => {
- res.data.forEach(it => {
- let temp = {}
+ this.form = row;
+ let skuId = parseInt(row.skuId);
+ this.form.skuId = [row.goodsId, skuId];
+ console.log(this.form);
+ listGoods().then((res) => {
+ res.data.forEach((it) => {
+ let temp = {};
temp.value = it.id;
temp.label = it.title;
- let temp1 = []
- it.skuList.forEach(item => {
- let temp2 = {}
+ let temp1 = [];
+ it.skuList.forEach((item) => {
+ let temp2 = {};
temp2.value = item.id;
temp2.label = item.skuName;
- temp1.push(temp2)
- })
- temp.children = temp1
- this.options.push(temp)
- })
- console.log(this.options)
- })
+ temp1.push(temp2);
+ });
+ temp.children = temp1;
+ this.options.push(temp);
+ });
+ console.log(this.options);
+ });
this.addOpen = true;
this.title = "工单";
},
/** 获取引车员信息*/
getLeadeMan() {
request({
- url: '/system/role/getUsersByRoleCode',
- method: 'get',
+ url: "/system/role/getUsersByRoleCode",
+ method: "get",
params: {
- code: "jcycy"
- }
- }).then(res => {
- this.leadManList = res.data
- })
+ code: "jcycy",
+ },
+ }).then((res) => {
+ this.leadManList = res.data;
+ });
},
/** 获取引车员信息*/
getMeetMan() {
request({
- url: '/system/role/getUsersByRoleCode',
- method: 'get',
+ url: "/system/role/getUsersByRoleCode",
+ method: "get",
params: {
- code: "jcjchc"
- }
- }).then(res => {
- this.meetManList = res.data
- })
+ code: "jcjchc",
+ },
+ }).then((res) => {
+ this.meetManList = res.data;
+ });
},
/** 提交按钮 */
submitForm() {
- console.log('事件', this.form.carRegisterDate);
+ console.log("事件", this.form.carRegisterDate);
if (this.form.id) {
- this.updateForm()
+ this.updateForm();
} else {
if (this.selectInspectionProject.length == 0) {
- this.$modal.msgError("请选择项目")
+ this.$modal.msgError("请选择项目");
}
for (var i = 0; i < this.selectInspectionProject.length; i++) {
- this.selectInspectionProject[i].orderNum = i + 1
- this.selectInspectionProject[i].projectId = this.selectInspectionProject[i].id
- this.selectInspectionProject[i].id = undefined
+ this.selectInspectionProject[i].orderNum = i + 1;
+ this.selectInspectionProject[i].projectId =
+ this.selectInspectionProject[i].id;
+ this.selectInspectionProject[i].id = undefined;
}
- console.log('项目', this.selectInspectionProject)
- this.form.inspectionWorkNodes = this.selectInspectionProject
- console.log('最终提交的项目', this.form)
+ console.log("项目", this.selectInspectionProject);
+ this.form.inspectionWorkNodes = this.selectInspectionProject;
+ console.log("最终提交的项目", this.form);
- this.$refs["form"].validate(valid => {
+ this.$refs["form"].validate((valid) => {
if (valid) {
- console.log(this.form.skuId[1])
- this.form.skuId = this.form.skuId[1]
- addWorkInfo(this.form).then(response => {
+ console.log(this.form.skuId[1]);
+ this.form.skuId = this.form.skuId[1];
+ addWorkInfo(this.form).then((response) => {
this.$modal.msgSuccess("新增成功");
this.addOpen = false;
this.getList();
@@ -950,24 +1600,25 @@ export default {
}
});
}
-
},
getWeorkNodesById(id) {
const params = {
- inspectionId: id
- }
- getWeorkNodesById(params).then(res => {
- console.log('根据工单id获取流程', res)
- this.selectInspectionProject = res.data
- this.selectInspectionProjectIds = this.selectInspectionProject.map(it => it.projectId)
- })
+ inspectionId: id,
+ };
+ getWeorkNodesById(params).then((res) => {
+ console.log("根据工单id获取流程", res);
+ this.selectInspectionProject = res.data;
+ this.selectInspectionProjectIds = this.selectInspectionProject.map(
+ (it) => it.projectId
+ );
+ });
},
updateForm() {
- this.$refs["form"].validate(valid => {
+ this.$refs["form"].validate((valid) => {
if (valid) {
- console.log(this.form.skuId[1])
- this.form.skuId = this.form.skuId[1]
- updateWorkInfo(this.form).then(response => {
+ console.log(this.form.skuId[1]);
+ this.form.skuId = this.form.skuId[1];
+ updateWorkInfo(this.form).then((response) => {
this.$modal.msgSuccess("成功");
this.addOpen = false;
this.getList();
@@ -978,21 +1629,28 @@ export default {
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
- this.$modal.confirm('是否确认删除?').then(function () {
- return delWorkInfo(ids);
- }).then(() => {
- this.getList();
- this.$modal.msgSuccess("删除成功");
- }).catch(() => {
- });
+ this.$modal
+ .confirm("是否确认删除?")
+ .then(function () {
+ return delWorkInfo(ids);
+ })
+ .then(() => {
+ this.getList();
+ this.$modal.msgSuccess("删除成功");
+ })
+ .catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
- this.download('/system/inspectionMallPartners/exportWorkOrder', {
- ...this.queryParams
- }, `info_${new Date().getTime()}.xls`)
- }
- }
+ this.download(
+ "/system/inspectionMallPartners/exportWorkOrder",
+ {
+ ...this.queryParams,
+ },
+ `info_${new Date().getTime()}.xls`
+ );
+ },
+ },
};