This commit is contained in:
xd 2024-05-15 15:22:34 +08:00
parent f38e49bb48
commit 68e3dd3086
10 changed files with 230 additions and 163 deletions

View File

@ -1,5 +1,5 @@
#for tests only !
#Tue May 07 17:18:59 CST 2024
#Wed May 15 15:21:44 CST 2024
jco.destination.pool_capacity=10
jco.client.lang=ZH
jco.client.ashost=172.19.0.120

View File

@ -6,6 +6,7 @@ import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.alibaba.fastjson2.JSON;
import com.ruoyi.common.constant.WebsocketConst;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.core.domain.model.LoginUser;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.uuid.UUID;
@ -92,6 +93,17 @@ public class CustomerController extends BaseController
util.exportExcel(response, list, "客户管理数据");
}
/**
* 状态修改
*/
@PreAuthorize("@ss.hasPermi('customer:customer:list')")
@Log(title = "客户状态修改", businessType = BusinessType.UPDATE)
@PutMapping("/changCusStatus")
public AjaxResult changCusStatus(@RequestBody Customer customer)
{
return toAjax(customerService.changCusStatus(customer));
}
/**
* 获取客户管理详细信息
*/

View File

@ -58,4 +58,11 @@ public interface ICustomerService
* @return 结果
*/
public int deleteCustomerByCusId(String cusId);
/**
* 状态修改
* @param customer
* @return
*/
int changCusStatus(Customer customer);
}

View File

@ -112,6 +112,16 @@ public class CustomerServiceImpl implements ICustomerService
return customerMapper.deleteCustomerByCusId(cusId);
}
/**
* 状态修改
* @param customer
* @return
*/
@Override
public int changCusStatus(Customer customer) {
return customerMapper.updateCustomer(customer);
}
/**
* 新增银行信息
*

View File

@ -55,6 +55,7 @@
"quill": "1.3.7",
"screenfull": "5.0.2",
"sortablejs": "1.10.2",
"splitpanes": "^2.4.1",
"vant": "^2.13.2",
"vue": "2.6.12",
"vue-count-to": "1.0.13",

View File

@ -17,6 +17,19 @@ export function getCustomer(cusId) {
})
}
// 客户状态修改
export function changCusStatus(cusId, cusState) {
const data = {
cusId,
cusState
}
return request({
url: '/customer/customer/changCusStatus',
method: 'put',
data: data
})
}
// 新增客户管理
export function addCustomer(data) {
return request({

View File

@ -19,6 +19,9 @@ import './permission' // permission control
import { getDicts } from "@/api/system/dict/data";
import { getConfigKey } from "@/api/system/config";
import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, handleTree } from "@/utils/ruoyi";
import { Splitpanes, Pane } from 'splitpanes'
import 'splitpanes/dist/splitpanes.css'
// 分页组件
import Pagination from "@/components/Pagination";
// 自定义表格工具组件
@ -60,6 +63,8 @@ Vue.component('Editor', Editor)
Vue.component('FileUpload', FileUpload)
Vue.component('ImageUpload', ImageUpload)
Vue.component('ImagePreview', ImagePreview)
Vue.component('Splitpanes', Splitpanes)
Vue.component('Pane', Pane)
Vue.use(directive)
Vue.use(plugins)

View File

@ -131,7 +131,13 @@
</el-table-column>
<el-table-column label="状态" align="center" prop="cusState">
<template slot-scope="scope">
<dict-tag :options="dict.type.common_state" :value="scope.row.cusState"/>
<el-switch
v-model="scope.row.cusState"
active-value="0"
inactive-value="1"
@change="handleStatusChange(scope.row)"
:disabled="!checkRole(['ITZX'])"
></el-switch>
</template>
</el-table-column>
</el-table>
@ -544,7 +550,7 @@
}
</style>
<script>
import { listCustomer, getCustomer, delCustomer, addCustomer, updateCustomer, commitCustomer,returnCustomer, commitSAPCustomer, qccListCustomer } from "@/api/customer/customer";
import { listCustomer, getCustomer, delCustomer,changCusStatus, addCustomer, updateCustomer, commitCustomer,returnCustomer, commitSAPCustomer, qccListCustomer } from "@/api/customer/customer";
import { checkPermi, checkRole } from "@/utils/permission"; //
import { bankCodeList,getCountrys,getIndustryCode,getLanguage,getPaymentTerms,getSalesOrganization,getDistributionChannel,getSalesTerritory,getSaleOffice,getTax,getReconciliationAccount } from "@/api/common/sapRfc";// sap-rfc
@ -835,6 +841,17 @@ export default {
this.single = selection.length!==1
this.multiple = !selection.length
},
//
handleStatusChange(row) {
let text = row.cusState === "0" ? "启用" : "停用";
this.$modal.confirm('确认要"' + text + '""' + row.cusName + '"吗?').then(function() {
return changCusStatus(row.cusId, row.cusState);
}).then(() => {
this.$modal.msgSuccess(text + "成功");
}).catch(function() {
row.cusState = row.cusState === "0" ? "1" : "0";
});
},
/** 新增按钮操作 */
handleAdd() {
this.reset();

View File

@ -14,7 +14,8 @@
</el-col>
</el-row>
<el-row :gutter="5" class="mt5">
<el-col :span="10">
<splitpanes class="default-theme" split="vertical">
<pane>
<el-card id="scroll" class="box-card scrollable" :style="{'overflow': 'auto','max-height': scrollableHeight,'height': scrollableHeight}">
<el-form-item label="目录:">
<el-link :underline="false" class="block" :type="selectedModelTag==item.name_0?'warning':'primary'" @click="selModelTag(item)" v-for="(item, index) in modelList" :key="index">{{item.name_0}}</el-link>
@ -52,9 +53,9 @@
<el-table width="100%" v-loading="searchResultLoading" ref="searchResultTable" :data="searchResultPagedData" @row-dblclick="handleRowDblclick">
<el-table-column label="版本uid" align="center" prop="uid_0" v-if="false"/>
<el-table-column label="产品型号" align="center" prop="name_0" width="180"/>
<el-table-column label="型号" align="center" prop="model" width="180" v-if="false"/>
<el-table-column label="规格" align="center" prop="spec" width="180" v-if="false"/>
<el-table-column label="产品型号" align="center" prop="name_0"/>
<el-table-column label="型号" align="center" prop="model" v-if="false"/>
<el-table-column label="规格" align="center" prop="spec" v-if="false"/>
<el-table-column label="电压" align="center" prop="voltage"/>
<el-table-column label="红本价(元)" align="center" prop="price"/>
<el-table-column label="单位" align="center" prop="stu"/>
@ -69,8 +70,8 @@
:layout="'total, prev, pager, next'"
/>
</el-card>
</el-col>
<el-col :span="14">
</pane>
<pane>
<el-card id="scroll" class="box-card scrollable" :style="{'overflow': 'auto','max-height': scrollableHeight,'height': scrollableHeight}">
<el-row :gutter="8">
<el-col :span="12">
@ -131,11 +132,11 @@
</el-table-column>
<el-table-column label="版本uid" align="center" prop="uid_0" v-if="false"/>
<el-table-column fixed="left" label="产品型号" align="center" prop="name_0" width="180" />
<el-table-column label="型号" align="center" prop="name_1" width="180" v-if="false"/>
<el-table-column label="规格" align="center" prop="spec" width="180" v-if="false"/>
<el-table-column label="电压" align="center" prop="voltage" width="100"/>
<el-table-column label="红本价(元)" align="center" prop="price" width="120"/>
<el-table-column label="单位" align="center" prop="stu" width="90">
<el-table-column label="型号" align="center" prop="name_1" v-if="false"/>
<el-table-column label="规格" align="center" prop="spec" v-if="false"/>
<el-table-column label="电压" align="center" prop="voltage"/>
<el-table-column label="红本价(元)" align="center" prop="price"/>
<el-table-column label="单位" align="center" prop="stu">
<template slot-scope="scope">
<el-select v-model="scope.row.stu" @change="selectTypeChange(scope.row)">
<el-option label="KM" value="KM"/>
@ -143,23 +144,23 @@
</el-select>
</template>
</el-table-column>
<el-table-column label="一次折扣" align="center" prop="per" width="80">
<el-table-column label="一次折扣" align="center" prop="per">
<template slot-scope="scope">
<el-input v-model="scope.row.per" @blur="changeRowData" @keyup.enter.native="changeRowData"/>
</template>
</el-table-column>
<el-table-column label="二次折扣" align="center" prop="per2" width="80">
<el-table-column label="二次折扣" align="center" prop="per2">
<template slot-scope="scope">
<el-input v-model="scope.row.per2" @blur="changeRowData" @keyup.enter.native="changeRowData"/>
</template>
</el-table-column>
<el-table-column label="单价" align="center" prop="setPrice" width="120"/>
<el-table-column label="数量调整" align="center" prop="count" width="100">
<el-table-column label="单价" align="center" prop="setPrice"/>
<el-table-column label="数量调整" align="center" prop="count">
<template slot-scope="scope">
<el-input v-model="scope.row.count" @blur="changeRowData" @keyup.enter.native="changeRowData"/>
</template>
</el-table-column>
<el-table-column label="总价" align="center" prop="allPrice" width="120"/>
<el-table-column label="总价" align="center" prop="allPrice"/>
</el-table>
<!--<pagination
v-show="selectedResultTotal>0"
@ -171,7 +172,8 @@
@current-change="handleSelectedResultCurrentChange"
/>-->
</el-card>
</el-col>
</pane>
</splitpanes>
</el-row>
</el-form>
</div>

View File

@ -39,11 +39,11 @@
<el-link :underline="false" type="primary" @click="handleDetail(scope.row)">{{scope.row.quotCode}}</el-link>
</template>
</el-table-column>
<el-table-column label="报价客户" width="200" align="center" prop="quotCustomer" />
<el-table-column label="报价项目" width="200" align="center" prop="quotProject" />
<el-table-column label="报价客户" width="250" align="center" prop="quotCustomer" />
<el-table-column label="报价项目" width="250" align="center" prop="quotProject" />
<el-table-column label="总价" width="100" align="center" prop="totalPrice" />
<el-table-column label="联系人" width="100" align="center" prop="quotLxr" />
<el-table-column label="联系人电话" width="150" align="center" prop="quotLxrdh" />
<el-table-column label="联系人" align="center" prop="quotLxr" />
<el-table-column label="联系人电话" width="100" align="center" prop="quotLxrdh" />
<el-table-column label="创建日期" width="180" align="center" prop="createTime" />
<el-table-column label="更新日期" width="180" align="center" prop="updateTime" />
</el-table>
@ -86,8 +86,8 @@
<el-input v-model="form.totalPrice"/>
</el-form-item>
<el-form-item label="设置折扣率" label-width="100px">
<el-input style="width:65px" v-model="perc" size="small" @blur="changeData"></el-input>
<el-input style="width:65px;margin-left: 5px" v-model="perc2" size="small" @blur="changeData"></el-input>
<el-input style="width:65px" v-model="perc" size="small" @blur="changeData" @keyup.enter.native="changeData"></el-input>
<el-input style="width:65px;margin-left: 5px" v-model="perc2" size="small" @blur="changeData" @keyup.enter.native="changeData"></el-input>
<!--总价:<span style="color:red;font-size: 15px">{{sumSelectedResultData}} </span>-->
<el-select v-model="form.rbDateUid" style="margin-left: 20px;width: 235px;" :disabled="selectedResultData.length==0">
<el-option
@ -114,18 +114,18 @@
<el-table-column label="单位" align="center" prop="stu"/>
<el-table-column label="一次折扣" align="center" prop="per">
<template slot-scope="scope">
<el-input v-model="scope.row.per" @blur="changeRowData"/>
<el-input v-model="scope.row.per" @blur="changeRowData" @keyup.enter.native="changeRowData"/>
</template>
</el-table-column>
<el-table-column label="二次折扣" align="center" prop="per2">
<template slot-scope="scope">
<el-input v-model="scope.row.per2" @blur="changeRowData"/>
<el-input v-model="scope.row.per2" @blur="changeRowData" @keyup.enter.native="changeRowData"/>
</template>
</el-table-column>
<el-table-column label="单价" align="center" prop="setPrice"/>
<el-table-column label="数量调整" align="center" prop="count">
<template slot-scope="scope">
<el-input v-model="scope.row.count" @blur="changeRowData"/>
<el-input v-model="scope.row.count" @blur="changeRowData" @keyup.enter.native="changeRowData"/>
</template>
</el-table-column>
<el-table-column label="总价" align="center" prop="allPrice"/>