This commit is contained in:
weipengfei 2024-03-22 15:53:59 +08:00
parent 40960d0855
commit efc2a0655f

View File

@ -43,19 +43,17 @@
<el-table-column prop="extra.sale_target" label="销售目标金额" min-width="120" />
<el-table-column prop="extra.official_purchase_target" label="里海云仓采购目标金额" min-width="150" />
<el-table-column prop="extra.purchase_target" label="其他店铺采购目标金额" min-width="150" />
<!-- <el-table-column prop="extra.purchase_target" label="春耕采购余额" min-width="150" /> -->
<el-table-column prop="create_time" label="创建时间" min-width="150" sortable />
<el-table-column label="操作" min-width="150" fixed="right">
<template slot-scope="scope">
<el-button
v-if="scope.row.send_status == 0"
type="text"
size="small"
@click="handleStatus(scope.row.id, scope.$index)"
>审核</el-button>
</template>
<template slot-scope="scope">
<router-link v-if="scope.row.send_status == 0" :to=" { path:`${roterPre}` + '/order/list?order_sn='+scope.row.order_sn } ">
<el-button type="text" size="small" class="mr10">修改</el-button>
</router-link>
<el-button type="text" size="small" class="mr10" @click="showDialog(scope.row)">修改</el-button>
</template>
</el-table-column>
</el-table>
@ -71,6 +69,53 @@
/>
</div>
</el-card>
<el-dialog title="修改数据" :visible.sync="dialogVisible">
<el-form ref="editForm" :model="formData" label-width="160px" :rules="rules">
<el-form-item label="销售目标金额">
<el-input
type="number"
readonly
v-model="formData.extra.sale_target"
placeholder="销售目标金额"
/>
</el-form-item>
<el-form-item label="里海云仓采购目标金额">
<el-input
type="number"
readonly
v-model="formData.extra.official_purchase_target"
placeholder="里海云仓采购目标金额"
/>
</el-form-item>
<el-form-item label="其他店铺采购目标金额">
<el-input
type="number"
readonly
v-model="formData.extra.purchase_target"
placeholder="其他店铺采购目标金额"
/>
</el-form-item>
<el-form-item label="重新审核说明">
<el-input
type="number"
readonly
v-model="formData.reason"
placeholder="重新审核说明"
/>
</el-form-item>
<el-form-item label="补贴金额" prop="amount">
<el-input
type="number"
v-model="formData.amount"
placeholder="请输入补贴金额"
/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button>
<el-button @click="updateInfo" type="primary"> </el-button>
</div>
</el-dialog>
<!-- <editForm ref="editForm" @complete="fetchData"></editForm> -->
</div>
</template>
@ -94,6 +139,7 @@ export default {
data: [],
total: 0
},
dialogVisible: false,
roterPre: roterPre,
listLoading: true,
tableFrom: {
@ -106,12 +152,39 @@ export default {
fromList: fromList,
options: [],
cardLists: [],
formData: {
extra: {}
},
rules:{
amount: [{
required: true,
message: '请输入补贴金额',
tigger: 'blur'
}]
}
}
},
mounted() {
this.getList()
},
methods: {
showDialog(row){
this.formData = {...row};
this.dialogVisible = true;
},
updateInfo(){
this.$refs.editForm.validate((valid) => {
if (valid) {
subsidyUpdateApi(this.formData).then(res => {
this.$message.success(res.message);
this.dialogVisible = false;
this.getList()
}).catch(res => {
this.$message.error(res.message);
})
}
})
},
/**重置 */
searchReset(){
this.timeVal = []