更新检测相关功能

This commit is contained in:
许允枞 2024-11-05 18:02:58 +08:00
parent b96157f2c5
commit ba90e8c90d
2 changed files with 654 additions and 556 deletions

View File

@ -136,3 +136,10 @@ export function delWorkInfo(id) {
method: 'post' method: 'post'
}) })
} }
export function detail(params) {
return request({
url: '/partnerOwn/partner/inspectionDetail',
method: 'get',
params: params
})
}

View File

@ -82,7 +82,8 @@
icon="el-icon-plus" icon="el-icon-plus"
size="mini" size="mini"
@click="handleAdd" @click="handleAdd"
>录入</el-button> >录入
</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
@ -91,14 +92,15 @@
icon="el-icon-download" icon="el-icon-download"
size="mini" size="mini"
@click="handleExport" @click="handleExport"
>导出</el-button> >导出
</el-button>
</el-col> </el-col>
<div style="margin-left: 72%;font-weight: bold"> <div style="margin-left: 72%;font-weight: bold">
<span> <span>
公示价格汇总{{moneyData.goodsPriceSum/100}} 公示价格汇总{{ moneyData.goodsPriceSum / 100 }}
</span> </span>
<span style="margin-left: 3%"> <span style="margin-left: 3%">
实付金额汇总{{moneyData.payMoneySum/100}} 实付金额汇总{{ moneyData.payMoneySum / 100 }}
</span> </span>
</div> </div>
@ -106,24 +108,24 @@
<el-table v-loading="loading" :data="infoList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="infoList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center"/>
<el-table-column label="车牌号" align="center" prop="carNum" /> <el-table-column label="车牌号" align="center" prop="carNum"/>
<el-table-column label="检测类型" align="center" prop="goodsTitle" /> <el-table-column label="检测类型" align="center" prop="goodsTitle"/>
<el-table-column label="检测项目" align="center" prop="skuName" /> <el-table-column label="检测项目" align="center" prop="skuName"/>
<el-table-column label="公示价格" align="center" prop="realPayMoney"> <el-table-column label="公示价格" align="center" prop="realPayMoney">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{scope.row.goodsPrice/100}}</span> <span>{{ scope.row.goodsPrice / 100 }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="实收金额" align="center" prop="realPayMoney"> <el-table-column label="实收金额" align="center" prop="realPayMoney">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{scope.row.realPayMoney/100}}</span> <span>{{ scope.row.realPayMoney / 100 }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="收款时间" align="center" prop="payTime"/> <el-table-column label="收款时间" align="center" prop="payTime"/>
<!-- <el-table-column label="客户" align="center" prop="buyName" />--> <!-- <el-table-column label="客户" align="center" prop="buyName" />-->
<el-table-column label="客户手机号" align="center" prop="buyPhone" /> <el-table-column label="客户手机号" align="center" prop="buyPhone"/>
<!-- <el-table-column label="接待员" align="center" prop="workerName"/>--> <!-- <el-table-column label="接待员" align="center" prop="workerName"/>-->
<el-table-column label="接待员手机号" align="center" prop="workerPhone"/> <el-table-column label="接待员手机号" align="center" prop="workerPhone"/>
<el-table-column label="客户来源" align="center" prop="customerSource"> <el-table-column label="客户来源" align="center" prop="customerSource">
</el-table-column> </el-table-column>
@ -149,13 +151,15 @@
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
@click="watchWork(scope.row)" @click="watchWork(scope.row)"
>打印</el-button> >打印
</el-button>
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
@click="xinWork(scope.row)" @click="xinWork(scope.row)"
>结算</el-button> >结算
</el-button>
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
@ -163,26 +167,38 @@
v-if="scope.row.status&&scope.row.status == 1&&scope.row.isPass&&scope.row.isPass ==1&&scope.row.makeCert!=1" v-if="scope.row.status&&scope.row.status == 1&&scope.row.isPass&&scope.row.isPass ==1&&scope.row.makeCert!=1"
@click="zhizheng(scope.row)" @click="zhizheng(scope.row)"
>制证</el-button> >制证
</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="detail(scope.row)"
>详情
</el-button>
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
v-if="scope.row.status&&scope.row.status == 0" v-if="scope.row.status&&scope.row.status == 0"
@click="jieshu(scope.row)" @click="jieshu(scope.row)"
>完工</el-button> >完工
</el-button>
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
@click="handleUpdate(scope.row)" @click="handleUpdate(scope.row)"
>修改</el-button> >修改
</el-button>
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
@click="handleDelete(scope.row)" @click="handleDelete(scope.row)"
>删除</el-button> >删除
</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -198,12 +214,13 @@
<!-- 添加或修改道路救援模块对话框 --> <!-- 添加或修改道路救援模块对话框 -->
<el-dialog :title="title" :visible.sync="open" width="900px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="900px" append-to-body>
<div v-html="htmlStr" id ="printMe"> </div> <div v-html="htmlStr" id="printMe"></div>
<el-button type="primary" style="margin-left: 90%;margin-top:20px " v-print="'#printMe'" size="small">打印</el-button> <el-button type="primary" style="margin-left: 90%;margin-top:20px " v-print="'#printMe'" size="small">打印
</el-button>
</el-dialog> </el-dialog>
<!-- 弹窗 --> <!-- 弹窗 -->
<el-dialog :title="title" :visible.sync="openhe" width="600px" append-to-body> <el-dialog :title="title" :visible.sync="openhe" width="600px" append-to-body>
<el-form ref="form" :model="offline" :rules="rules" label-width="120px"> <el-form ref="form" :model="offline" :rules="rules" label-width="120px">
@ -230,7 +247,7 @@
<div style="margin-top: 10px"> <div style="margin-top: 10px">
<el-form-item label="说明" > <el-form-item label="说明">
<el-input type="text" v-model="remark"></el-input> <el-input type="text" v-model="remark"></el-input>
</el-form-item> </el-form-item>
</div> </div>
@ -240,17 +257,18 @@
<el-dialog :title="title" :visible.sync="openxin" width="800px" append-to-body> <el-dialog :title="title" :visible.sync="openxin" width="800px" append-to-body>
<el-form ref="form" :model="offline" :rules="rules" label-width="120px"> <el-form ref="form" :model="offline" :rules="rules" label-width="120px">
<el-form-item label="商品价格" > <el-form-item label="商品价格">
<span>{{goodsPrice/100}}</span> <span>{{ goodsPrice / 100 }}</span>
</el-form-item> </el-form-item>
<el-form-item label="优惠金额" > <el-form-item label="优惠金额">
<el-input-number :min="0" @input="jisuan" :max="goodsPrice/100" type="text" v-model="reduceMoney"></el-input-number> <el-input-number :min="0" @input="jisuan" :max="goodsPrice/100" type="text"
v-model="reduceMoney"></el-input-number>
</el-form-item> </el-form-item>
<el-form-item label="实付金额" > <el-form-item label="实付金额">
<el-input-number type="text" v-model="payMoney"></el-input-number> <el-input-number type="text" v-model="payMoney"></el-input-number>
</el-form-item> </el-form-item>
<el-form-item label="付款方式" > <el-form-item label="付款方式">
<!-- <el-input type="text" v-model="receivablesAccount"></el-input>--> <!-- <el-input type="text" v-model="receivablesAccount"></el-input>-->
<el-select v-model="payType" placeholder="请选择付款方式"> <el-select v-model="payType" placeholder="请选择付款方式">
<el-option <el-option
v-for="dict in dict.type.pay_type" v-for="dict in dict.type.pay_type"
@ -260,7 +278,7 @@
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="收款账号" > <el-form-item label="收款账号">
<el-select v-model="receivablesAccount" placeholder="请选择收款账号"> <el-select v-model="receivablesAccount" placeholder="请选择收款账号">
<el-option <el-option
v-for="item in BankAccountList" v-for="item in BankAccountList"
@ -270,37 +288,48 @@
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="备注" > <el-form-item label="备注">
<el-input type="text" v-model="payRemark"></el-input> <el-input type="text" v-model="payRemark"></el-input>
</el-form-item> </el-form-item>
<el-button type="primary" @click="tijiao()"> </el-button> <el-button type="primary" @click="tijiao()"> </el-button>
</el-form> </el-form>
</el-dialog> </el-dialog>
<el-dialog :title="title" :visible.sync="opendetail" width="800px" append-to-body class="custom-dialog">
<div v-for="(item, index) in detailForm" :key="index" class="dialog-item">
<div class="item-header">
<span class="item-title">{{ item.title }}</span>
<span class="item-create-time">{{ item.createTime }}</span>
</div>
<div class="item-content">
<span>{{ item.content }}</span>
</div>
</div>
</el-dialog>
<el-dialog :title="title" :visible.sync="addOpen" width="600px" append-to-body> <el-dialog :title="title" :visible.sync="addOpen" width="600px" append-to-body>
<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="客户姓名" > <el-form-item label="客户姓名">
<el-input type="text" v-model="form.buyName"></el-input> <el-input type="text" v-model="form.buyName"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="联系方式" > <el-form-item label="联系方式">
<el-input type="text" v-model="form.buyPhone"></el-input> <el-input type="text" v-model="form.buyPhone"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="号牌号码" > <el-form-item label="号牌号码">
<el-input type="text" v-model="form.carNum"></el-input> <el-input type="text" v-model="form.carNum"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="品牌型号" > <el-form-item label="品牌型号">
<el-input type="text" v-model="form.carModel"></el-input> <el-input type="text" v-model="form.carModel"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="车辆识别代号" > <el-form-item label="车辆识别代号">
<el-input type="text" v-model="form.carIdNo"></el-input> <el-input type="text" v-model="form.carIdNo"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="住址" > <el-form-item label="住址">
<el-input type="text" v-model="form.userAddress"></el-input> <el-input type="text" v-model="form.userAddress"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="单位" > <el-form-item label="单位">
<el-input type="text" v-model="form.unitName"></el-input> <el-input type="text" v-model="form.unitName"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="使用性质" > <el-form-item label="使用性质">
<el-select v-model="form.carNature" placeholder="请选择使用性质"> <el-select v-model="form.carNature" placeholder="请选择使用性质">
<el-option <el-option
@ -311,7 +340,7 @@
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="请选择客户来源" > <el-form-item label="请选择客户来源">
<el-select v-model="form.customerSource" placeholder="请选择客户来源"> <el-select v-model="form.customerSource" placeholder="请选择客户来源">
<el-option <el-option
v-for="dict in customerData" v-for="dict in customerData"
@ -322,13 +351,13 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="选择商品" > <el-form-item label="选择商品">
<el-cascader <el-cascader
v-model="form.skuId" v-model="form.skuId"
:options="options" :options="options"
@change="handleChange"></el-cascader> @change="handleChange"></el-cascader>
</el-form-item> </el-form-item>
<el-form-item label="新旧车" > <el-form-item label="新旧车">
<el-select v-model="form.carStatus" placeholder="请选择客户来源"> <el-select v-model="form.carStatus" placeholder="请选择客户来源">
<el-option <el-option
v-for="dict in dict.type.car_status" v-for="dict in dict.type.car_status"
@ -350,31 +379,33 @@
</template> </template>
<script> <script>
import { listWorkOrder,workOrderData,listGoods,addWorkInfo,getWorker,shopInfo,settleAccounts, import {
workOrderView,inspectionDetail,offlineCharging, listWorkOrder, workOrderData, listGoods, addWorkInfo, getWorker, shopInfo, settleAccounts,
getBankAccountList,makeCertOk,stopInspection,updateWorkInfo,delWorkInfo} from "./api/workOrder"; workOrderView, inspectionDetail, offlineCharging,
import { getCustomerSource } from "./api/index"; getBankAccountList, makeCertOk, stopInspection, updateWorkInfo, delWorkInfo, detail
import print from 'vue-print-nb' } from "./api/workOrder";
import moment from 'moment'; import {getCustomerSource} from "./api/index";
import request from "@/utils/request"; import print from 'vue-print-nb'
import DictTag from "@/components/DictTagOld/index.vue"; import moment from 'moment';
import request from "@/utils/request";
import DictTag from "@/components/DictTagOld/index.vue";
export default { export default {
name: "Info", 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: { directives: {
print print
}, },
components:{DictTag}, components: {DictTag},
data() { data() {
return { return {
moneyData:{ moneyData: {
payMoneySum:0, payMoneySum: 0,
goodsPriceSum:0 goodsPriceSum: 0
}, },
isPass:1, isPass: 1,
isRetrial:'', isRetrial: '',
remark:'', remark: '',
optionss: [{ optionss: [{
value: '1', value: '1',
label: '合格' label: '合格'
@ -390,18 +421,18 @@
label: '退办理' label: '退办理'
}], }],
goodsPrice:0, goodsPrice: 0,
reduceMoney:'', reduceMoney: '',
payMoney:'', payMoney: '',
payType:'', payType: '',
receivablesAccount:'', receivablesAccount: '',
payRemark:'', payRemark: '',
inspectionId:'', inspectionId: '',
size:'', size: '',
workId:'', workId: '',
// workerList:[], // workerList:[],
value: '', value: '',
options:[], options: [],
// //
loading: true, loading: true,
// //
@ -412,20 +443,22 @@
multiple: true, multiple: true,
// //
showSearch: true, showSearch: true,
customerData:[], customerData: [],
BankAccountList:[], BankAccountList: [],
// //
total: 0, total: 0,
// //
infoList: [], infoList: [],
// //
title: "", title: "",
addOpen:false, addOpen: false,
// //
open: false, open: false,
openxin:false, openxin: false,
openhe:false, opendetail: false,
htmlStr:null, openhe: false,
htmlStr: null,
detailForm: [],
// //
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
@ -441,99 +474,99 @@
}, },
// //
form: {}, form: {},
offline:{}, offline: {},
// //
rules: { rules: {
connectionName: [ connectionName: [
{ required: true, message: "联系人名称不能为空", trigger: "blur" } {required: true, message: "联系人名称不能为空", trigger: "blur"}
], ],
connectionPhone: [ connectionPhone: [
{ required: true, message: "联系人手机号不能为空", trigger: "blur" } {required: true, message: "联系人手机号不能为空", trigger: "blur"}
], ],
licenseNum: [ licenseNum: [
{ required: true, message: "车牌号不能为空", trigger: "blur" } {required: true, message: "车牌号不能为空", trigger: "blur"}
], ],
isAppointment: [ isAppointment: [
{ required: true, message: "是否为预约单不能为空", trigger: "change" } {required: true, message: "是否为预约单不能为空", trigger: "change"}
], ],
rescueType: [ rescueType: [
{ required: true, message: "救援类型 1拖车2送油3搭电4换台5扣车不能为空", trigger: "change" } {required: true, message: "救援类型 1拖车2送油3搭电4换台5扣车不能为空", trigger: "change"}
], ],
carType: [ carType: [
{ required: true, message: "车辆类型 大中小不能为空", trigger: "change" } {required: true, message: "车辆类型 大中小不能为空", trigger: "change"}
], ],
rescuePosition: [ rescuePosition: [
{ required: true, message: "救援地点 详细描述不能为空", trigger: "blur" } {required: true, message: "救援地点 详细描述不能为空", trigger: "blur"}
], ],
feeType: [ feeType: [
{ required: true, message: "收费类型不能为空", trigger: "change" } {required: true, message: "收费类型不能为空", trigger: "change"}
], ],
} }
}; };
}, },
created() { created() {
this.dict = {type:{}} this.dict = {type: {}}
for (let i = 0; i < this.$options.dicts.length; i++) { for (let i = 0; i < this.$options.dicts.length; i++) {
request({ request({
url: '/rescue/dict/data/type/'+this.$options.dicts[i], url: '/rescue/dict/data/type/' + this.$options.dicts[i],
method: 'get' method: 'get'
}).then(res=>{ }).then(res => {
this.$set(this.dict.type,this.$options.dicts[i],res.data) this.$set(this.dict.type, this.$options.dicts[i], res.data)
}) })
} }
this.getpid() this.getpid()
this.customerSource(); this.customerSource();
}, },
methods: { methods: {
jieshutij(){ jieshutij() {
let data = { let data = {
id:this.inspectionId, id: this.inspectionId,
isPass:this.isPass, isPass: this.isPass,
isRetrial:this.isRetrial, isRetrial: this.isRetrial,
remark:this.remark remark: this.remark
} }
stopInspection(data).then(res=>{ stopInspection(data).then(res => {
console.log(res) console.log(res)
this.$message.success("操作成功") this.$message.success("操作成功")
this.openhe = false this.openhe = false
this.getList() this.getList()
}) })
}, },
jieshu(row){ jieshu(row) {
this.inspectionId = row.id this.inspectionId = row.id
this.isPass="", this.isPass = "",
this.isRetrial="", this.isRetrial = "",
this.remark="", this.remark = "",
this.openhe = true this.openhe = true
}, },
zhizheng(row){ zhizheng(row) {
console.log(row) console.log(row)
let data = { let data = {
inspectionId: row.id inspectionId: row.id
} }
makeCertOk(data).then(res=>{ makeCertOk(data).then(res => {
this.$message.success("操作成功") this.$message.success("操作成功")
this.getList() this.getList()
}) })
}, },
jisuan(){ jisuan() {
if(this.reduceMoney>(this.goodsPrice/100)){ if (this.reduceMoney > (this.goodsPrice / 100)) {
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(){ tijiao() {
let data = { let data = {
reduceMoney:this.reduceMoney?this.reduceMoney*100:0, reduceMoney: this.reduceMoney ? this.reduceMoney * 100 : 0,
payMoney:this.payMoney*100, payMoney: this.payMoney * 100,
payType:this.payType, payType: this.payType,
receivablesAccount:this.receivablesAccount, receivablesAccount: this.receivablesAccount,
payRemark:this.payRemark, payRemark: this.payRemark,
inspectionId:this.inspectionId, inspectionId: this.inspectionId,
} }
offlineCharging(data).then(res=>{ offlineCharging(data).then(res => {
this.openxin = false this.openxin = false
this.$message.success("结算成功") this.$message.success("结算成功")
this.getList() this.getList()
@ -541,62 +574,74 @@
}, },
settleAccounts(id){ settleAccounts(id) {
settleAccounts(id).then(res=>{ settleAccounts(id).then(res => {
if (res.code == 0){ if (res.code == 0) {
this.$message.success("清算成功") this.$message.success("清算成功")
this.getList() this.getList()
} }
}) })
}, },
customerSource(){ customerSource() {
getCustomerSource().then(res=>{ getCustomerSource().then(res => {
this.customerData = res.data this.customerData = res.data
}) })
}, },
watchWork(row){ watchWork(row) {
workOrderView(row.id).then(res=>{ workOrderView(row.id).then(res => {
this.htmlStr = res.data this.htmlStr = res.data
}) })
this.open = true this.open = true
this.form = row this.form = row
this.open = true this.open = true
}, },
xinWork(row){ xinWork(row) {
this.inspectionId = row.id this.inspectionId = row.id
this.reduceMoney=0, this.reduceMoney = 0,
this.payMoney=null, this.payMoney = null,
this.payType=null, this.payType = null,
this.receivablesAccount=null, this.receivablesAccount = null,
this.payRemark=null, this.payRemark = null,
inspectionDetail(row.id).then(res=>{ inspectionDetail(row.id).then(res => {
this.offline = res.data this.offline = res.data
this.goodsPrice = res.data.goodsPrice this.goodsPrice = res.data.goodsPrice
console.log(res) console.log(res)
}) })
this.openxin = true this.openxin = true
}, },
detail(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
},
//pid //pid
getpid(){ getpid() {
shopInfo().then(res=>{ shopInfo().then(res => {
this.partnerId = res.data.partnerId this.partnerId = res.data.partnerId
this.getList(); this.getList();
}) })
}, },
handleChanges(e){ handleChanges(e) {
console.log('执行了查询',e) console.log('执行了查询', e)
}, },
handleChange(e){ handleChange(e) {
console.log(e) console.log(e)
}, },
/** 查询道路救援模块列表 */ /** 查询道路救援模块列表 */
getList() { getList() {
this.loading = true; this.loading = true;
console.log(this.queryParams.jcTime) console.log(this.queryParams.jcTime)
if (this.queryParams.jcTime){ if (this.queryParams.jcTime) {
this.queryParams.startTime = this.queryParams.jcTime[0] this.queryParams.startTime = this.queryParams.jcTime[0]
this.queryParams.endTime = this.queryParams.jcTime[1] this.queryParams.endTime = this.queryParams.jcTime[1]
} }
@ -609,19 +654,19 @@
this.moneyData = response.data this.moneyData = response.data
}); });
let data = { let data = {
partnerId:this.partnerId, partnerId: this.partnerId,
workName:this.value, workName: this.value,
pageNum:1, pageNum: 1,
pageSize:100, pageSize: 100,
} }
// getWorker(data).then(res =>{ // getWorker(data).then(res =>{
// console.log(res) // console.log(res)
// this.workerList = res.rows // this.workerList = res.rows
// }) // })
getBankAccountList().then(res=>{ getBankAccountList().then(res => {
res.data.forEach(it=>{ res.data.forEach(it => {
let temp={} let temp = {}
temp.key = it.remark+it.dictLabel temp.key = it.remark + it.dictLabel
this.BankAccountList.push(temp) this.BankAccountList.push(temp)
}) })
}) })
@ -677,19 +722,19 @@
// //
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map(item => item.id) this.ids = selection.map(item => item.id)
this.single = selection.length!==1 this.single = selection.length !== 1
this.multiple = !selection.length this.multiple = !selection.length
}, },
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
listGoods().then(res=>{ listGoods().then(res => {
res.data.forEach(it=>{ res.data.forEach(it => {
let temp={} let temp = {}
temp.value = it.id; temp.value = it.id;
temp.label = it.title; temp.label = it.title;
let temp1=[] let temp1 = []
it.skuList.forEach(item=>{ it.skuList.forEach(item => {
let temp2={} let temp2 = {}
temp2.value = item.id; temp2.value = item.id;
temp2.label = item.skuName; temp2.label = item.skuName;
temp1.push(temp2) temp1.push(temp2)
@ -708,16 +753,16 @@
this.reset(); this.reset();
this.form = row this.form = row
let skuId = parseInt(row.skuId) let skuId = parseInt(row.skuId)
this.form.skuId = [row.goodsId,skuId] this.form.skuId = [row.goodsId, skuId]
console.log( this.form) console.log(this.form)
listGoods().then(res=>{ listGoods().then(res => {
res.data.forEach(it=>{ res.data.forEach(it => {
let temp={} let temp = {}
temp.value = it.id; temp.value = it.id;
temp.label = it.title; temp.label = it.title;
let temp1=[] let temp1 = []
it.skuList.forEach(item=>{ it.skuList.forEach(item => {
let temp2={} let temp2 = {}
temp2.value = item.id; temp2.value = item.id;
temp2.label = item.skuName; temp2.label = item.skuName;
temp1.push(temp2) temp1.push(temp2)
@ -733,9 +778,9 @@
}, },
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm() {
if ( this.form.id){ if (this.form.id) {
this.updateForm() this.updateForm()
}else { } else {
this.$refs["form"].validate(valid => { this.$refs["form"].validate(valid => {
if (valid) { if (valid) {
console.log(this.form.skuId[1]) console.log(this.form.skuId[1])
@ -766,12 +811,13 @@
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const ids = row.id || this.ids; const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除?').then(function() { this.$modal.confirm('是否确认删除?').then(function () {
return delWorkInfo(ids); return delWorkInfo(ids);
}).then(() => { }).then(() => {
this.getList(); this.getList();
this.$modal.msgSuccess("删除成功"); this.$modal.msgSuccess("删除成功");
}).catch(() => {}); }).catch(() => {
});
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
@ -780,42 +826,87 @@
}, `info_${new Date().getTime()}.xlsx`) }, `info_${new Date().getTime()}.xlsx`)
} }
} }
}; };
</script> </script>
<style media="print"> <style media="print">
@page {size: auto; /* auto is the initial value */margin: 3mm; /* this affects the margin in the printer settings */ @page {
} size: auto; /* auto is the initial value */
.w-box{ margin: 3mm; /* this affects the margin in the printer settings */
}
.w-box {
width: 750px; width: 750px;
margin: 10px auto; margin: 10px auto;
border: 2px solid #8799a3; border: 2px solid #8799a3;
border-radius:4px; border-radius: 4px;
box-sizing: border-box; box-sizing: border-box;
padding: 10px; padding: 10px;
font-size: 22px; font-size: 22px;
font-weight: bold; font-weight: bold;
} }
.box-dis{
.box-dis {
width: 100%; width: 100%;
display: flex; display: flex;
margin: 25px 0px; margin: 25px 0px;
justify-content: space-between; justify-content: space-between;
} }
.ws-box{
.ws-box {
width: 50%; width: 50%;
display: flex; display: flex;
align-items: center; align-items: center;
} }
.w-left{
.w-left {
width: 40%; width: 40%;
} }
.w-rghit{
.w-rghit {
width: 60%; width: 60%;
} }
.dazi{
.dazi {
font-size: 22px; font-size: 22px;
font-weight: bold; font-weight: bold;
} }
* 对话框整体样式 */
.custom-dialog {
border-radius: 8px;
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}
/* 每个对话框项的样式 */
.dialog-item {
margin-bottom: 20px;
padding: 10px;
border-bottom: 1px solid #e4e7ed;
}
/* 标题和创建时间的容器 */
.item-header {
display: flex;
justify-content: space-between;
font-size: 16px;
color: #333;
}
/* 标题样式 */
.item-title {
font-weight: bold;
}
/* 创建时间样式 */
.item-create-time {
color: #999;
}
/* 内容样式 */
.item-content {
margin-top: 10px;
font-size: 14px;
color: #666;
}
</style> </style>