Browse Source

修改客户历史记录

test
caoyizhong 2 years ago
parent
commit
508cb5758c
  1. 8
      src/api/basicdata/basicClient.js
  2. 6
      src/option/basicdata/basicClient.js
  3. 67
      src/views/basicdata/brand/basicClient.vue
  4. 16
      src/views/basicdata/brand/basicHistoricalContract.vue

8
src/api/basicdata/basicClient.js

@ -48,6 +48,14 @@ export const update = (row) => {
})
}
export const updateCargoControl = (row) => {
return request({
url: '/api/logpm-basicdata/basicdataClient/update',
method: 'post',
data: row
})
}
export const selectName = (current, size, params) => {
return request({
url: '/api/logpm-basicdata/basicdataClient/page',

6
src/option/basicdata/basicClient.js

@ -115,7 +115,11 @@ export default {
// },
{
label: "合同附件",
prop: "leaseAccessories",
prop: "fileName",
},
{
label: "控货",
prop: "cargoControl",
},
{
label: "合同开始时间",

67
src/views/basicdata/brand/basicClient.vue

@ -99,6 +99,20 @@
:width="item.width"
show-overflow-tooltip
:key="index" align="center">
<!-- <template slot-scope="{item}" v-if="item.prop === 'fileName'">-->
<template #default="{row,$index}" v-if="item.prop === 'fileName'">
<el-link target="_blank" @click="downloadLink(row)">{{row.fileName}}</el-link>
</template>
<!-- <el-link href="https://element.eleme.io" target="_blank" v-if="item.prop === 'fileName'">{{scope}}</el-link>-->
<template #default="{row,$index}" v-if="item.prop === 'cargoControl'" >
<el-switch
v-model="row.cargoControl"
active-text="开"
inactive-text="关"
@click="makeCargo(row)"
>
</el-switch>
</template>
</el-table-column>
</template>
<!-- 操作栏模块 -->
@ -261,7 +275,7 @@
</template>
<script >
import {getList, getDetail, add, update, remove} from "@/api/basicdata/basicClient";
import {getList, getDetail, add, update, updateCargoControl} from "@/api/basicdata/basicClient";
import option from "@/option/basicdata/basicClient";
import {mapGetters} from "vuex";
import BasicShopSub from "@/views/basicdata/brand/basicShopSub.vue";
@ -410,8 +424,57 @@ export default {
}
},
methods: {
//
downloadLink(row){
console.log(">>>>>",row);
},
//
makeCargo(row){
console.log("控货操作!!",row);
let r = {
id : row.id,
cargoControl: row.cargoControl
}
this.$confirm(`确定要修改${row.clientName}的控货状态吗?`, {
type: "warning",
//beforeClose
beforeClose: async (action, instance, done) => {
//
if (action === "confirm") {
//
updateCargoControl(r).then(res => {
console.log(res);
if(res.statusText == 'OK' ){
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
done();
}else{
this.$message({
type: "warning",
message: "操作失败!"
});
}
});
}else {
//false
//done
done();
}
}
});
},
uploadSuccess(fileList) {
console.log("123123123",fileList);
// this.form.fileName =
// this.$set(row, 'imageCos', fileList);
if(this.title == '编辑'){
this.bianji = true;
@ -493,6 +556,7 @@ export default {
let li = [];
this.fileList.forEach(it => {
li.push( it.url);
})
this.form.leaseAccessories = li.length > 0 ? li.join(",") : null ;
}else{
@ -503,6 +567,7 @@ export default {
let li = [];
this.fileList.forEach(it => {
li.push( it.response.data.link);
this.form.fileName = it.response.data.originalName;
})
this.form.leaseAccessories = li.length > 0 ? li.join(",") : null ;
}else{

16
src/views/basicdata/brand/basicHistoricalContract.vue

@ -5,7 +5,7 @@
<!-- 查询模块 -->
<el-form :inline="true" :model="query">
<el-form-item label="客户名称:">
<el-input v-model="query.clientId" placeholder="请输入客户名称"></el-input>
<el-input v-model="query.clientName" placeholder="请输入客户名称"></el-input>
</el-form-item>
<el-form-item label="合同时间:">
<!-- <el-input v-model="query.contractStartTime" placeholder="请输入合同开始时间"></el-input>-->
@ -215,8 +215,21 @@ export default {
]
}
},
watch:{
// '$route.query.id': {
// handler: function(val, oldVal){
// console.log(val);
//
// console.log(" this.$route.query.id", this.$route.query.id);
// },
// //
// deep: true
// }
},
mounted () {
this.init();
console.log(" this.$route.query.id", this.$route.query.id);
this.onLoad(this.page);
},
computed: {
@ -352,6 +365,7 @@ export default {
this.query.contractStartTime = this.dataShi[0];
this.query.contractEntTime = this.dataShi[1];
}
this.query.clientId = this.$route.query.id;
getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
const data = res.data.data;
this.page.total = data.total;

Loading…
Cancel
Save