This commit is contained in:
JIAL 2024-07-04 14:10:57 +08:00
parent dca953fb82
commit bfefb13158
8 changed files with 1326 additions and 33 deletions

View File

@ -1,11 +0,0 @@
#for tests only !
#Tue Jun 25 11:00:35 CST 2024
jco.destination.pool_capacity=10
jco.client.lang=ZH
jco.client.ashost=172.19.0.125
jco.client.saprouter=
jco.client.user=RFC
jco.client.sysnr=00
jco.destination.peak_limit=10
jco.client.passwd=654321
jco.client.client=800

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

View File

@ -22,6 +22,9 @@ import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels,
import { Splitpanes, Pane } from 'splitpanes'
import 'splitpanes/dist/splitpanes.css'
import Vant from 'vant';
import 'vant/lib/index.css';
// 分页组件
import Pagination from "@/components/Pagination";
// 自定义表格工具组件
@ -66,6 +69,7 @@ Vue.component('ImagePreview', ImagePreview)
Vue.component('Splitpanes', Splitpanes)
Vue.component('Pane', Pane)
Vue.use(Vant);
Vue.use(directive)
Vue.use(plugins)
Vue.use(VueMeta)

View File

@ -126,6 +126,19 @@ export const constantRoutes = [
}
]
},
{
path: '/customerMobile/index',
component: Layout,
hidden: true,
children: [
{
path: '',
component: () => import('@/views/mobile/customerMobile/index'),
name: 'customerMobile',
meta: { title: '客户管理', activeMenu: '/mobile/customerMobile' }
}
]
},
{
path: '/quoteMobile/add',
component: Layout,
@ -152,6 +165,32 @@ export const constantRoutes = [
}
]
},
{
path: '/customerMobile/addCustomer',
component: Layout,
hidden: true,
children: [
{
path: '',
component: () => import('@/views/mobile/customerMobile/addCustomer'),
name: 'addCustomer',
meta: { title: '新建客户', activeMenu: '/mobile/customerMobile/addCustomer' }
}
]
},
{
path: '/customerMobile/editCustomer',
component: Layout,
hidden: true,
children: [
{
path: '',
component: () => import('@/views/mobile/customerMobile/addCustomer'),
name: 'editCustomer',
meta: { title: '修改客户', activeMenu: '/mobile/customerMobile/addCustomer' }
}
]
},
{
path: '/mobile/index',
component: Layout,

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,222 @@
<template>
<div>
<van-cell-group>
<van-search style="padding: 20px 12px 5px 12px" shape="round" v-model="queryParams.cusCode" clearable placeholder="客户编码" ></van-search >
<van-search style="padding: 5px 12px" shape="round" v-model="queryParams.cusName" clearable placeholder="客户名称" ></van-search >
<van-search style="padding: 5px 12px" shape="round" v-model="queryParams.cusSapCode" clearable placeholder="SAP客户编码" ></van-search >
<van-field
readonly
clickable
name="picker"
:value="cusApprovalStatusText"
label="审批状态"
placeholder="点击选择审批状态"
@click="cusApprovalStatusShowPicker = true"
/>
<van-popup v-model="cusApprovalStatusShowPicker" position="bottom">
<van-picker
show-toolbar
:columns="cusApprovalStatusColumns"
@confirm="cusApprovalStatusOnConfirm"
@cancel="cusApprovalStatusShowPicker = false"
/>
</van-popup>
<div style="margin: 16px; display: flex">
<div style="width: 50%; padding: 0px 20px"><van-button style="width: 100%" size="small" round plain type="info" native-type="submit" @click="handleQuery">搜索</van-button></div>
<div style="width: 50%; padding: 0px 20px"><van-button style="width: 100%" size="small" round plain type="primary" native-type="submit" @click="handleAdd">新增</van-button></div>
</div>
</van-cell-group>
<van-list
v-model="loading"
:finished="finished"
finished-text="没有更多了"
@load="onLoad"
>
<div v-for="(customer, index) in customerList" :key="index">
<van-swipe-cell style="margin: 10px 0px">
<van-card
class="goods-card custom-card"
@click="handleCheck(customer.cusId)"
>
<template #title>
<div style="font-size: 15px; margin-top: 10px">客户编码: {{ customer.cusCode }}</div>
</template>
<template #desc>
<div>
<div style="font-size: 15px; margin-top: 5px">客户名称: {{ customer.cusName }}</div>
<div style="font-size: 15px; margin-top: 5px">创建时间: {{ customer.createTime }}</div>
</div>
</template>
<template #tags>
<div style="margin-top: 5px">
<span style="font-size: 15px">提交状态: </span>
<van-tag style="margin-right: 20px" plain size="large" :type="getTagType(customer.cusApprovalStatus)">{{customer.cusApprovalStatus === '0' ? '待提交' :
(customer.cusApprovalStatus === '1' ? '审批中' :
(customer.cusApprovalStatus === '2' ? '审批通过' : '已驳回'))}}</van-tag>
</div>
</template>
</van-card>
<template #right>
<van-button square text="删除" @click="handleDelete(customer)" v-hasPermi="['customer:customer:remove']" type="danger" class="delete-button" />
</template>
</van-swipe-cell>
</div>
</van-list>
</div>
</template>
<script>
import { listCustomer, getCustomer, delCustomer,changCusStatus, addCustomer, updateCustomer,getReturnUpdateCustomer, commitCustomer,returnCustomer, commitSAPCustomer, checkQccCount, qccListCustomer, getIndustryCodeQcc } from "@/api/customer/customer";
import { checkPermi, checkRole } from "@/utils/permission"; //
import { bankCodeList,getCountrys,getIndustryCode,getLanguage,getPaymentTerms,getSalesOrganization,getDistributionChannel,getSalesTerritory,getSaleOffice,getTax,getReconciliationAccount, getAccountAllocationGroup } from "@/api/common/sapRfc";// sap-rfc
import {Dialog, Notify, Toast} from 'vant';
let testNum = 0
export default {
name: "index",
data() {
return {
queryParams: {
pageNum: 1,
pageSize: 8,
cusCode: null,
cusName: null,
cusSapCode: null,
cusState: null,
cusApprovalStatus: null
},
cusApprovalStatusText: '',
cusApprovalStatusColumns: [
{ text: '待提交', value: '0' },
{ text: '审批中', value: '1' },
{ text: '审批通过', value: '2' },
{ text: '已驳回', value: '3' },
],
cusApprovalStatusShowPicker: false,
total: 0,
loading: false,
customerList: [],
finished: false,
}
},
mounted() {
this.$store.dispatch('app/toggleSideBarHide', true);
document.querySelector('.navbar').style.display = "none";
document.querySelector('.tags-view-container').style.display = "none";
},
created() {
const roles = this.$store.state.user.roles;
if(roles && roles.indexOf('ITZX_SJZ') !== -1 ){//
this.queryParams.cusApprovalStatus = '1';
}
this.getList();
},
methods: {
/**-------------计算审批状态的tag类型-----------**/
getTagType(status) {
switch (status) {
case '0':
return 'warning';
case '1':
return 'primary';
case '2':
return 'success';
default:
return 'danger'; // Assuming '' is the default case.
}
},
/**-------------选择器确认按钮---------**/
cusApprovalStatusOnConfirm(columns) {
this.cusApprovalStatusText = columns.text;
this.queryParams.cusApprovalStatus = columns.value
this.cusApprovalStatusShowPicker = false;
},
/**-------------搜索按钮---------**/
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/**--------------新增按钮--------------**/
handleAdd() {
console.log("触发新增跳转函数")
this.$router.push('/customerMobile/addCustomer');
},
/**-------------查询客户管理列表---------**/
getList() {
listCustomer(this.queryParams).then(response => {
this.customerList = response.rows;
this.total = response.total;
if (this.customerList.length >= this.total) {
this.finished = true;
}
});
},
/** 删除按钮操作 */
handleDelete(customer) {
const cusIds = customer.cusId || this.ids;
Dialog.confirm({
title: '确认删除',
message: '您确认要删除这个客户吗?',
})
.then(function () {
return delCustomer(cusIds);
}) .then(() => {
this.queryParams.pageNum = 1;
this.getList();
Notify({ type: 'success', message: '删除成功' })
})
.catch(() => {
// on cancel
});
// this.$modal.confirm('').then(function() {
// return delCustomer(cusIds);
// }).then(() => {
// this.getList();
// this.$modal.msgSuccess("");
// }).catch(() => {});
},
/**----------懒加载函数----------**/
onLoad() {
console.log('触发了' + testNum++ + '次')
this.queryParams.pageNum++;
console.log(this.queryParams.pageNum)
listCustomer(this.queryParams).then(response => {
this.customerList = [...this.customerList, ...response.rows];
this.total = response.total;
this.loading = false;
if (this.customerList.length >= this.total) {
this.finished = true;
}
});
},
/**------------点击跳转-----------**/
handleCheck(cusId) {
console.log("触发跳转函数")
console.log(cusId)
const info = {cusId : cusId}
this.$router.push({ path: '/customerMobile/editCustomer', query: info});
}
},
}
</script>
<style>
.custom-card .van-card__content .van-card__desc {
margin-top: 15px; /* 根据需要调整间距 */
font-size: 15px; /* 根据需要调整字体大小 */
}
.custom-card .van-card__content .van-card__title {
margin-top: 5px;
font-size: 15px; /* 根据需要调整字体大小 */
}
.goods-card {
margin: 0;
}
.delete-button {
height: 100%;
}
</style>

View File

@ -25,17 +25,17 @@
</div>
<!-- Section 2 -->
<!-- <div class="app-card">-->
<!-- <h2 class="app-title">Section 2</h2>-->
<!-- <el-row :gutter="10">-->
<!-- <el-col :span="8" class="app-icon-container">-->
<!-- <el-card shadow="always" class="app-icon-card" @click="handleClick('App10')">-->
<!-- <div class="app-icon">-->
<!-- <img src="https://via.placeholder.com/50" alt="App10">-->
<!-- </div>-->
<!-- <div class="app-name">App10</div>-->
<!-- </el-card>-->
<!-- </el-col>-->
<div class="app-card">
<p class="app-title">客户</p>
<el-row :gutter="10">
<el-col :span="8" class="app-icon-container">
<el-card shadow="always" class="app-icon-card" >
<div class="app-icon" @click="handleClick('customerMobile')">
<img src="@/assets/logo/103.png" alt="报价单">
</div>
<div class="app-name">客户管理</div>
</el-card>
</el-col>
<!-- <el-col :span="8" class="app-icon-container">-->
<!-- <el-card shadow="always" class="app-icon-card" @click="handleClick('App11')">-->
<!-- <div class="app-icon">-->
@ -44,9 +44,9 @@
<!-- <div class="app-name">App11</div>-->
<!-- </el-card>-->
<!-- </el-col>-->
<!-- &lt;!&ndash; Add more icons as needed for Section 2 &ndash;&gt;-->
<!-- </el-row>-->
<!-- </div>-->
<!-- Add more icons as needed for Section 2 -->
</el-row>
</div>
<!-- &lt;!&ndash; Section 3 &ndash;&gt;-->
<!-- <div class="app-card">-->
@ -114,8 +114,8 @@ export default {
.app-title {
margin-bottom: 10px;
font-size: 18px;
color: #333;
font-size: 20px;
color: gray;
text-align: left;
}

View File

@ -314,11 +314,6 @@ export default {
this.formData.quotSalesmanCode = this.$store.state.user.name;
this.formData.quotSalesmanDeptId = this.$store.state.user.deptId;
this.formData.quotSalesmanDeptName = this.$store.state.user.deptName;
console.log( this.formData.quotSalesmanName);
console.log( this.formData.quotSalesmanBm);
console.log( this.formData.quotSalesmanCode);
console.log( this.formData.quotSalesmanDeptId);
console.log( this.formData.quotSalesmanDeptName);
const param = this.$route.query;
if (param.quotId !== undefined && param.quotId !== null) {