beyond 10.15

This commit is contained in:
beyond 2019-10-15 09:46:28 +08:00
parent 1f83938d33
commit 4bfd611b69
23 changed files with 6979 additions and 66 deletions

View file

@ -791,3 +791,51 @@ export function giftDetailList(query) {
data: params
})
}
export function shouldPayCount(query) {
var params = new URLSearchParams()
if (query.repositoryId !== '' && query.repositoryId !== null && query.repositoryId !== undefined) {
params.append('repositoryId', query.repositoryId) // 你要传给后台的参数值 key/value
}
if (query.beginTime !== '' && query.beginTime !== null && query.beginTime !== undefined) {
params.append('beginTime', query.beginTime) // 你要传给后台的参数值 key/value
}
if (query.endTime !== '' && query.endTime !== null && query.endTime !== undefined) {
params.append('endTime', query.endTime) // 你要传给后台的参数值 key/value
}
if (query.pageNum !== '' && query.pageNum !== null && query.pageNum !== undefined) {
params.append('pageNum', query.pageNum) // 你要传给后台的参数值 key/value
}
if (query.pageSize !== '' && query.pageSize !== null && query.pageSize !== undefined) {
params.append('pageSize', query.pageSize) // 你要传给后台的参数值 key/value
}
return request({
url: '/financecount/shouldPayCount',
method: 'post',
data: params
})
}
export function shouldPayDetail(query) {
var params = new URLSearchParams()
if (query.repositoryId !== '' && query.repositoryId !== null && query.repositoryId !== undefined) {
params.append('repositoryId', query.repositoryId) // 你要传给后台的参数值 key/value
}
if (query.beginTime !== '' && query.beginTime !== null && query.beginTime !== undefined) {
params.append('beginTime', query.beginTime) // 你要传给后台的参数值 key/value
}
if (query.endTime !== '' && query.endTime !== null && query.endTime !== undefined) {
params.append('endTime', query.endTime) // 你要传给后台的参数值 key/value
}
if (query.pageNum !== '' && query.pageNum !== null && query.pageNum !== undefined) {
params.append('pageNum', query.pageNum) // 你要传给后台的参数值 key/value
}
if (query.pageSize !== '' && query.pageSize !== null && query.pageSize !== undefined) {
params.append('pageSize', query.pageSize) // 你要传给后台的参数值 key/value
}
return request({
url: '/financecount/shouldPayDetail',
method: 'post',
data: params
})
}

View file

@ -356,7 +356,14 @@ export default {
supplierSale: '供应商销售分析',
saleFluid: '商品销售流水账',
saleGiftList: '赠品汇总表',
giftDetailList: '赠品统计明细表'
giftDetailList: '赠品统计明细表',
Financecount: '财务统计',
shouldPayCount: '应付款汇总表',
shouldPayDetail: '应付款明细表'
},
shouldPayCount: {
startMonth: '开始月份',
endMonth: '结束月份'
},
searchSaleReport: {
saleOut: '销售出库',

View file

@ -2911,60 +2911,87 @@ export const asyncRouterMap = [
component: () => import('@/views/SaleReport/saleBillList'),
name: 'saleBillList',
meta: { title: 'saleBillList', noCache: true }
}
// ,
// {
// path: 'saleBillDay',
// component: () => import('@/views/SaleReport/saleBillDay'),
// name: 'saleBillDay',
// meta: { title: 'saleBillDay', noCache: true }
// },
// {
// path: 'saleReceipt',
// component: () => import('@/views/SaleReport/saleReceipt'),
// name: 'saleReceipt',
// meta: { title: 'saleReceipt', noCache: true }
// },
// {
// path: 'saleFlow',
// component: () => import('@/views/SaleReport/saleFlow'),
// name: 'saleFlow',
// meta: { title: 'saleFlow', noCache: true }
// },
// {
// path: 'unsalableProduct',
// component: () => import('@/views/SaleReport/unsalableProduct'),
// name: 'unsalableProduct',
// meta: { title: 'unsalableProduct', noCache: true }
// },
// {
// path: 'empCommission',
// component: () => import('@/views/SaleReport/empCommission'),
// name: 'empCommission',
// meta: { title: 'empCommission', noCache: true }
// },
// {
// path: 'supplierSale',
// component: () => import('@/views/SaleReport/supplierSale'),
// name: 'supplierSale',
// meta: { title: 'supplierSale', noCache: true }
// },
// {
// path: 'saleFluid',
// component: () => import('@/views/SaleReport/saleFluid'),
// name: 'saleFluid',
// meta: { title: 'saleFluid', noCache: true }
// },
// {
// path: 'saleGiftList',
// component: () => import('@/views/SaleReport/saleGiftList'),
// name: 'saleGiftList',
// meta: { title: 'saleGiftList', noCache: true }
// },
// {
// path: 'giftDetailList',
// component: () => import('@/views/SaleReport/giftDetailList'),
// name: 'giftDetailList',
// meta: { title: 'giftDetailList', noCache: true }
// }
]
},
{
path: '/Financecount',
component: Layout,
redirect: 'noredirect',
name: 'Financecount',
alwaysShow: true,
meta: {
title: 'Financecount',
icon: 'shuxing',
type: 12
},
children: [
{
path: 'shouldPayCount',
component: () => import('@/views/Financecount/shouldPayCount'),
name: 'shouldPayCount',
meta: { title: 'shouldPayCount', noCache: true }
},
{
path: 'saleBillDay',
component: () => import('@/views/SaleReport/saleBillDay'),
name: 'saleBillDay',
meta: { title: 'saleBillDay', noCache: true }
},
{
path: 'saleReceipt',
component: () => import('@/views/SaleReport/saleReceipt'),
name: 'saleReceipt',
meta: { title: 'saleReceipt', noCache: true }
},
{
path: 'saleFlow',
component: () => import('@/views/SaleReport/saleFlow'),
name: 'saleFlow',
meta: { title: 'saleFlow', noCache: true }
},
{
path: 'unsalableProduct',
component: () => import('@/views/SaleReport/unsalableProduct'),
name: 'unsalableProduct',
meta: { title: 'unsalableProduct', noCache: true }
},
{
path: 'empCommission',
component: () => import('@/views/SaleReport/empCommission'),
name: 'empCommission',
meta: { title: 'empCommission', noCache: true }
},
{
path: 'supplierSale',
component: () => import('@/views/SaleReport/supplierSale'),
name: 'supplierSale',
meta: { title: 'supplierSale', noCache: true }
},
{
path: 'saleFluid',
component: () => import('@/views/SaleReport/saleFluid'),
name: 'saleFluid',
meta: { title: 'saleFluid', noCache: true }
},
{
path: 'saleGiftList',
component: () => import('@/views/SaleReport/saleGiftList'),
name: 'saleGiftList',
meta: { title: 'saleGiftList', noCache: true }
},
{
path: 'giftDetailList',
component: () => import('@/views/SaleReport/giftDetailList'),
name: 'giftDetailList',
meta: { title: 'giftDetailList', noCache: true }
path: 'shouldPayDetail',
component: () => import('@/views/Financecount/shouldPayDetail'),
name: 'shouldPayDetail',
meta: { title: 'shouldPayDetail', noCache: true }
}
]
},

View file

@ -40,7 +40,8 @@ export default {
},
methods: {
beforeUpload(file) {
const isLt1M = file.size / 1024 / 1024 < 1
// const isLt1M = file.size / 1024 / 1024 < 1
const isLt1M = true
if (isLt1M) {
return true
@ -54,20 +55,28 @@ export default {
},
handleSuccess({ results, header }) {
this.tableData = results
this.tableHeader = ['编号', '客户姓名', '客户类型', '客户优质级别', '生日', '客户来源', '新老客户', '客户电话', '性别', '详细地址', '积分']
this.tableHeader = ['id', '账号', '名 (必填)', '中间名', '姓氏(必填)', '客户电话(必填)', '性别 (1男2女)', '客户优质级别id', '客户来源id', '新老客户 (1老2新)', '国家id必填', '省id', '市id', '详细地址', '生日', '所属门店id', '邮箱', '密码', '创建时间']
this.uploadHead = results.map(function(item) {
return {
id: item.编号,
customerName: item.客户姓名,
customerTypeWZ: item.客户类型,
customerLevel: item.客户优质级别,
birthday: item.生日,
source: item.客户来源,
newOrOld: item.新老客户,
phoneNumber: item.客户电话,
gender: item.性别,
address: item.详细地址,
point: item.积分
id: item['id'],
account: item['账号'],
lastName: item['名 (必填)'],
middleName: item['中间名'],
firstName: item['姓氏(必填)'],
phoneNumber: item['客户电话(必填)'],
gender: item['性别 (1男2女)'],
level: item['客户优质级别id'],
source: item['客户来源id'],
newOrOld: item['新老客户 (1老2新)'],
countryId: item['国家id必填'],
provinceId: item['省id'],
cityId: item['市id'],
address: item['详细地址'],
birthday: item['生日'],
repositoryId: item['所属门店id'],
email: item['邮箱'],
password: item['密码'],
createTime: item['创建时间']
}
})
console.log(header)

View file

@ -0,0 +1,643 @@
<template>
<el-dialog :visible.sync="editVisible" :detailcontrol="detailcontrol" :detaildata="detaildata" :close-on-press-escape="false" :title="personalForm.number +' 详情'" append-to-body width="1010px" class="edit" top="-10px" @close="$emit('update:detailcontrol', false)">
<!--基本信息-->
<el-card class="box-card" style="margin-top: 63px" shadow="never">
<h2 ref="geren" class="form-name" style="font-size: 16px;color: #606266;margin-top: -5px;">基本信息</h2>
<div class="container" style="margin-top: 37px">
<el-form :model="personalForm" :inline="true" status-icon class="demo-ruleForm" label-width="130px">
<el-row>
<el-col :span="12">
<el-form-item :label="$t('SaleOrder.title')" style="width: 100%;">
<span>{{ personalForm.title }}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('SaleOrder.customerType')" prop="customerType" style="width: 100%;">
<span>{{ personalForm.customerType | customerTypeFliter }}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('SaleOrder.customerName')" prop="customerId" style="width: 100%;">
<span>{{ personalForm.customerName }}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('SaleOrder.customerPhone')" style="width: 100%;">
<span>{{ personalForm.customerPhone }}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('SaleOrder.invoiceType')" style="width: 100%;">
<span>{{ personalForm.invoiceType | invoiceTypeFilter }}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('SaleOrder.payMode')" style="width: 100%;">
<span>{{ personalForm.payMode | payModeFilter }}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('SaleOrder.transDate')" prop="transDate" style="width: 100%;">
<span>{{ personalForm.transDate }}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('SaleOrder.salePersonId')" prop="salePersonId" style="width: 100%;">
<span>{{ personalForm.salePersonName }}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('SaleOrder.saleRepositoryId')" style="width: 100%;">
<span>{{ personalForm.saleRepositoryName }}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('SaleOrder.roleId')" style="width: 100%;">
<span>{{ personalForm.roleName }}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('SaleOrder.saleType')" style="width: 100%;">
<span>{{ personalForm.saleTypeName }}</span>
</el-form-item>
</el-col>
<!-- <el-col :span="12">-->
<!-- <el-form-item :label="$t('SaleOrder.payType')" style="width: 100%;">-->
<!-- <span>{{ personalForm.payTypeName }}</span>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="12">
<el-form-item :label="$t('SaleOrder.currency')" style="width: 100%;">
<span>{{ personalForm.currency | currencyFilter }}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('SaleOrder.transAddress')" style="width: 100%;">
<span>{{ personalForm.transAddress }}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('SaleOrder.receiveMoney')" style="width: 100%;">
<span>{{ personalForm.receiveMoney }}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('SaleOrder.colseType')" style="width: 100%;">
<span>{{ personalForm.settleModeName }}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('Supplier.deliveryMode')" style="width: 100%;">
<span>{{ personalForm.deliveryModeName }}</span>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
</el-card>
<!--子件信息-->
<el-card class="box-card" style="margin-top: 15px" shadow="never">
<h2 ref="fuzhu" class="form-name" style="font-size: 16px;color: #606266;margin-top: -5px;">订单明细</h2>
<div class="container">
<el-editable
ref="editable"
:data.sync="list2"
:edit-config="{ showIcon: true, showStatus: true}"
class="click-table1"
stripe
border
size="medium"
style="width: 100%">
<el-editable-column label="序号" min-width="55" align="center" type="index"/>
<el-editable-column prop="productCode" align="center" label="物品编号" min-width="150px"/>
<el-editable-column prop="productName" align="center" label="物品名称" min-width="150px"/>
<el-editable-column prop="Categoryid" align="center" label="物品分类" min-width="150px"/>
<el-editable-column prop="unit" align="center" label="基本单位" min-width="150px"/>
<el-editable-column prop="typeId" align="center" label="规格型号" min-width="150px"/>
<el-editable-column prop="color" align="center" label="颜色" min-width="150px"/>
<el-editable-column prop="performanceScore" align="center" label="绩效分" min-width="150px"/>
<el-editable-column prop="productScore" align="center" label="商品积分" min-width="150px"/>
<el-editable-column prop="quantity" align="center" label="订单数量" min-width="150px"/>
<el-editable-column prop="salePrice" align="center" label="零售价" min-width="150px"/>
<el-editable-column prop="costPrice" align="center" label="成本价" min-width="150px"/>
<el-editable-column prop="taxprice" align="center" label="含税价" min-width="150px"/>
<el-editable-column prop="costMoney" align="center" label="成本金额" min-width="150px"/>
<el-editable-column prop="includeTaxMoney" align="center" label="含税金额" min-width="150px"/>
<el-editable-column prop="taxRate" align="center" label="税率(%)" min-width="170px"/>
<el-editable-column prop="taxMoney" align="center" label="税额" min-width="170px"/>
<el-editable-column prop="money" align="center" label="金额" min-width="150px"/>
<el-editable-column prop="includeTaxCostMoney" align="center" label="含税成本金额" min-width="170px"/>
<el-editable-column prop="discountRate" align="center" label="折扣(%)" min-width="170px"/>
<el-editable-column prop="discountMoney" align="center" label="折扣额" min-width="170px"/>
<el-editable-column prop="alreadyApplicationQuantity" align="center" label="已下达采购数量" min-width="150px"/>
<el-editable-column prop="deliveryDate" align="center" label="需求日期" min-width="180px"/>
<el-editable-column prop="alreadyProduceQuantity" align="center" label="已下达生产数量" min-width="150px"/>
</el-editable>
</div>
</el-card>
<!--<el-card class="box-card" style="margin-top: 15px" shadow="never">-->
<!--<h2 ref="fuzhu" class="form-name" style="font-size: 16px;color: #606266;margin-top: -5px;">销售费用明细</h2>-->
<!--<div class="container">-->
<!--<el-editable-->
<!--ref="editable2"-->
<!--:data.sync="list3"-->
<!--:edit-config="{ showIcon: true, showStatus: true}"-->
<!--:summary-method="getSummaries"-->
<!--show-summary-->
<!--class="click-table1"-->
<!--stripe-->
<!--border-->
<!--size="medium"-->
<!--style="width: 100%">-->
<!--<el-editable-column type="selection" min-width="55" align="center"/>-->
<!--<el-editable-column label="序号" width="60" align="center" type="index"/>-->
<!--<el-editable-column prop="costName" align="center" label="费用名称" min-width="150px"/>-->
<!--<el-editable-column prop="money" align="center" label="金额" min-width="150px"/>-->
<!--<el-editable-column prop="remark" align="center" label="备注" min-width="150px"/>-->
<!--</el-editable>-->
<!--</div>-->
<!--</el-card>-->
<!--审核状态-->
<el-card class="box-card" shadow="never" style="margin-top: 10px">
<h2 ref="geren" class="form-name" style="font-size: 16px;color: #606266;margin-top: -5px;">合计信息</h2>
<div class="container" style="margin-top: 37px">
<el-form ref="personalForm2" :model="personalForm" :inline="true" status-icon class="demo-ruleForm" label-width="130px">
<el-row>
<el-col :span="12">
<el-form-item :label="$t('SaleOrder.heji1')" style="width: 100%;">
<span>{{ personalForm.allQuantity }}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('SaleOrder.heji2')" style="width: 100%;">
<span>{{ personalForm.allMoney }}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('SaleOrder.heji3')" style="width: 100%;">
<span>{{ personalForm.allIncludeTaxMoney }}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('SaleOrder.heji4')" style="width: 100%;">
<span>{{ personalForm.allTaxMoney }}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('SaleOrder.heji5')" style="width: 100%;">
<span>{{ personalForm.allDiscountMoney }}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('SaleOrder.heji6')" style="width: 100%;">
<span>{{ personalForm.allIncludeTaxDiscountMoney }}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('SaleOrder.heji7')" style="width: 100%;">
<span>{{ personalForm.allIncludeTaxCostMoney }}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('SaleOrder.heji8')" style="width: 100%;">
<span>{{ personalForm.allCostMoney }}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('SaleOrder.heji9')" style="width: 100%;">
<span>{{ personalForm.otherMoney }}</span>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
</el-card>
<el-card class="box-card" style="margin-top: 15px" shadow="never">
<h2 ref="fuzhu" class="form-name" style="font-size: 16px;color: #606266;margin-top: -5px;">审批记录</h2>
<div class="container" style="margin-top: 37px">
<el-table
:data="reviewList"
border
style="width: 100%">
<el-table-column
prop="step"
align="center"
label="当前步骤"
min-width="150"/>
<el-table-column
prop="stepHandlerName"
align="center"
label="当前审批人"
min-width="150"/>
<el-table-column
prop="handleTime"
align="center"
label="审批时间"
min-width="150"/>
<el-table-column
prop="stat"
align="center"
label="审批意见"
min-width="150">
<template slot-scope="scope">
<span>{{ scope.row.stat | statfilter }}</span>
</template>
</el-table-column>
</el-table>
</div>
</el-card>
<el-card class="box-card" style="margin-top: 15px" shadow="never">
<h2 ref="geren" class="form-name" style="font-size: 16px;color: #606266;margin-top: -5px;">备注信息</h2>
<div class="container" style="margin-top: 37px">
<el-form :model="personalForm" :inline="true" status-icon class="demo-ruleForm" label-width="130px">
<el-row>
<el-col :span="12">
<el-form-item :label="$t('public.createPersonName2')" prop="stockType" style="width: 100%;">
{{ personalForm.createPersonName }}
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('public.createDate2')" style="width: 100%;">
{{ personalForm.createDate }}
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('public.endPersonName')" prop="applyDate" style="width: 100%;">
{{ personalForm.endPersonName }}
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('public.endDate')" prop="applyDate" style="width: 100%;">
{{ personalForm.endDate }}
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('public.modifyPersonName')" prop="applyDate" style="width: 100%;">
{{ personalForm.modifyPersonName }}
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('public.modifyDate')" prop="applyDate" style="width: 100%;">
{{ personalForm.modifyDate }}
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
</el-card>
<el-card class="box-card" style="margin-top: 15px" shadow="never">
<h2 ref="fuzhu" class="form-name" style="font-size: 16px;color: #606266;margin-top: -5px;">预收款记录</h2>
<div class="container" style="margin-top: 37px">
<el-table
:data="tableData2"
border
style="width: 100%">
<el-table-column
prop="receiptMoney"
align="center"
label="预收款金额"
min-width="150"/>
<el-table-column
prop="receiptDate"
align="center"
label="收款时间"
min-width="150"/>
<el-table-column
prop="closeTypeName"
align="center"
label="收款方式"
min-width="150"/>
<el-table-column
prop="receiptPersonName"
align="center"
label="收款人"
min-width="150"/>
</el-table>
</div>
</el-card>
<el-card class="box-card" style="margin-top: 15px" shadow="never">
<h2 ref="fuzhu" class="form-name" style="font-size: 16px;color: #606266;margin-top: -5px;">出库明细</h2>
<div class="container" style="margin-top: 37px">
<el-table
:data="tableData3"
border
style="width: 100%">
<el-table-column
prop="outDate"
align="center"
label="出库日期"
min-width="150"/>
<el-table-column
prop="saleRepositoryName"
align="center"
label="仓库"
min-width="150"/>
<el-table-column
prop="quantity"
align="center"
label="出库数量"
min-width="150"/>
<el-table-column
prop="outPersonName"
align="center"
label="出库人"
min-width="150"/>
<el-table-column
prop="receiptPersonName"
align="center"
label="状态"
min-width="150"/>
</el-table>
</div>
</el-card>
<el-card class="box-card" shadow="never" style="margin-top: 10px">
<h2 ref="geren" class="form-name" style="font-size: 16px;color: #606266;margin-top: -5px;">利润明细</h2>
<div class="container" style="margin-top: 37px">
<el-form ref="personalForm2" :model="personalForm" :inline="true" status-icon class="demo-ruleForm" label-width="130px">
<el-row>
<el-col :span="12">
<el-form-item :label="$t('SaleOut.heji2')" style="width: 100%;">
<span>{{ personalForm.allMoney }}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('SaleOut.heji11')" style="width: 100%;">
<span>{{ personalForm.otherMoney }}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('SaleOut.heji8')" style="width: 100%;">
<span>{{ personalForm.allCostMoney }}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('SaleOut.profit')" style="width: 100%;">
<span>{{ personalForm.allMoney - personalForm.allCostMoney }}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('SaleOut.ProfitMargin')" style="width: 100%;">
<span>{{ (personalForm.allMoney - personalForm.allCostMoney) / personalForm.allCostMoney }}</span>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
</el-card>
</el-dialog>
</template>
<script>
import { productlist } from '@/api/public'
import { searchprepReceipt } from '@/api/PrepReceipt'
import { searchsaleOut } from '@/api/SaleOut'
export default {
filters: {
currencyFilter(status) {
const statusMap = {
1: 'RMB',
2: 'USD'
}
return statusMap[status]
},
payTypeFilter(status) {
const statusMap = {
1: '方式1',
2: '方式2'
}
return statusMap[status]
},
payModeFilter(status) {
const statusMap = {
1: '货到付款',
2: '当场支付'
}
return statusMap[status]
},
invoiceTypeFilter(status) {
const statusMap = {
1: '无',
2: '增值税'
}
return statusMap[status]
},
customerTypeFliter(status) {
const statusMap = {
1: '经销商',
2: '零售商'
}
return statusMap[status]
},
statfilter(status) {
const statusMap = {
1: '审核中',
2: '审核通过',
3: '审核不通过'
}
return statusMap[status]
},
sourceTypeFilter(status) {
const statusMap = {
1: '采购申请',
2: '采购需求',
3: '无来源'
}
return statusMap[status]
},
receiptStatFilter(status) {
const statusMap = {
1: '制单',
2: '执行',
3: '结单'
}
return statusMap[status]
}
},
props: {
detailcontrol: {
type: Boolean,
default: false
},
detaildata: {
type: Object,
default: null
}
},
data() {
return {
//
tableData3: [],
saleOutparms: {
pageNum: 1,
pageSize: 9999,
sourceNumber: this.detaildata.number,
repositoryId: 0
},
//
tableData2: [],
//
heji1: '',
heji2: '',
//
reviewList: [],
//
list2: [],
list3: [],
//
editVisible: this.detailcontrol,
//
personalForm: this.detaildata,
//
prepReceiptData: {
pageNum: 1,
pageSize: 9999,
sourceNumber: this.detaildata.number,
repositoryId: 0
}
}
},
watch: {
detailcontrol() {
this.editVisible = this.detailcontrol
},
detaildata() {
this.personalForm = this.detaildata
this.list2 = this.personalForm.saleOrderDetailVos
this.list3 = this.personalForm.saleOrderCostDetails
this.reviewList = []
const review = this.personalForm.approvalUseVos
for (const i in review) {
if (review[i].actualStepHandler !== null) {
this.reviewList.push(review[i])
}
}
this.prepReceiptData.sourceNumber = this.personalForm.number
this.getprepReceipt()
this.saleOutparms.sourceNumber = this.personalForm.number
this.getsaleOutLis()
}
},
methods: {
getsaleOutLis() {
searchsaleOut(this.saleOutparms).then(res => {
if (res.data.ret === 200) {
this.tableData3 = res.data.data.content.list.map(function(item) {
const needata = item.saleOutDetailVos.map(function(elem) {
return {
outDate: item.outDate,
saleRepositoryName: item.saleRepositoryName,
quantity: elem.quantity,
outPersonName: item.outPersonName
}
})
return needata
}).flat()
}
})
},
//
getprepReceipt() {
searchprepReceipt(this.prepReceiptData).then(res => {
if (res.data.ret === 200) {
this.tableData2 = res.data.data.content.list
}
})
},
//
planMoney(row) {
row.planMoney = row.basicPrice * row.planQuantity
return row.planMoney
},
//
basicPrice(row) {
productlist(row.productCode).then(res => {
if (res.data.ret === 200) {
row.basicPrice = res.data.data.content.list[0].purchasePrice
}
})
return row.basicPrice
},
//
getSummaries(param) {
const { columns, data } = param
const sums = []
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '总计'
return
}
const values = data.map(item => Number(item[column.property]))
if (!values.every(value => isNaN(value))) {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] += ''
} else {
sums[index] = ''
}
})
this.heji1 = sums[8]
this.heji2 = sums[7]
sums[1] = ''
sums[2] = ''
sums[3] = ''
sums[4] = ''
sums[6] = ''
sums[9] = ''
sums[10] = ''
sums[11] = ''
sums[12] = ''
return sums
},
handlecancel() {
this.editVisible = false
}
}
}
</script>
<style scoped>
.edit >>> .el-dialog{
-webkit-transform: none;
transform: none;
position: absolute;
right: 0;
left: auto;
height: auto;
}
.edit >>> .el-dialog__header{
background: #fff;
position: fixed;
top: 0;
display: block;
width: 1010px;
z-index: 100;
border-bottom: 1px solid #f1f1f1;
}
.edit >>> .el-dialog__body{
padding-left: 0;
padding-right: 0;
padding-top: 10px;
}
.edit >>> .el-dialog {
background:#f1f1f1 ;
left: 0;
}
.container >>> .el-form-item.is-required:not(.is-no-asterisk)>.el-form-item__label:before{
margin-left: -10px;
}
.container >>> .el-form-item__label{
text-align: left;
}
.container >>> .el-form-item__label{
color: #60626696;
}
.el-col-12{
width: 49%;
}
</style>

View file

@ -0,0 +1,355 @@
<template>
<el-dialog :visible.sync="employeeVisible" :agentcontrol="agentcontrol" :close-on-press-escape="false" top="10px" title="选择经销商" append-to-body width="1100px" @close="$emit('update:agentcontrol', false)">
<el-card class="box-card" style="margin-top: 15px;height: 60px;padding-left:0 " shadow="never">
<el-row>
<el-form ref="getemplist" :model="getemplist" style="margin-top: -9px">
<el-col :span="4">
<el-form-item>
<el-input v-model="getemplist.agentname" :placeholder="$t('Customer.agentname')" clearable @keyup.enter.native="handleFilter"/>
</el-form-item>
</el-col>
<el-col :span="3" style="margin-left: 5px">
<el-form-item>
<el-input v-model="getemplist.phone" :placeholder="$t('Customer.phone')" clearable @keyup.enter.native="handleFilter"/>
</el-form-item>
</el-col>
<el-col :span="3" style="margin-left: 20px">
<el-form-item>
<el-date-picker
v-model="getemplist.createtime"
type="date"
class="filter-item"
placeholder="选择日期"
value-format="yyyy-MM-dd"/>
</el-form-item>
</el-col>
<!--更多搜索条件-->
<el-col :span="3" style="margin-left: 30px">
<el-popover
v-model="visible2"
placement="bottom"
width="500"
trigger="click">
<el-select v-model="getemplist.type" :value="getemplist.type" :placeholder="$t('Customer.customertype')" clearable style="width: 40%;float: left;margin-left: 20px;">
<el-option
v-for="(item, index) in customertypes"
:key="index"
:value="item.id"
:label="item.categoryName"/>
</el-select>
<el-select v-model="getemplist.source" :value="getemplist.source" :placeholder="$t('Customer.source')" clearable style="width: 40%;float: right;margin-right: 20px">
<el-option
v-for="(item, index) in sources"
:key="index"
:value="item.id"
:label="item.categoryName"/>
</el-select>
<el-select v-model="getemplist.level" :value="getemplist.level" :placeholder="$t('Customer.level')" style="width: 40%;float: left;margin-left: 20px;margin-top: 20px" clearable>
<el-option
v-for="(item, index) in levels"
:key="index"
:value="item.id"
:label="item.categoryName"/>
</el-select>
<el-select v-model="getemplist.source" :value="getemplist.source" :placeholder="$t('Customer.source')" clearable style="width: 40%;float: right;margin-right: 20px;margin-top: 20px">
<el-option
v-for="(item, index) in sources"
:key="index"
:value="item.id"
:label="item.categoryName"/>
</el-select>
<el-input v-model="getemplist.contactname" :placeholder="$t('Customer.contactname')" style="width: 40%;float: left;margin-left: 20px;margin-top: 20px" clearable />
<el-input v-model="getemplist.pinyin" :placeholder="$t('Customer.pinyin')" style="width: 40%;float: right;margin-right: 20px;margin-top: 20px" clearable />
<div class="seachbutton" style="width: 100%;float: right;margin-top: 20px">
<el-button v-waves class="filter-item" type="primary" style="float: right" round @click="handleFilter">{{ $t('public.search') }}</el-button>
</div>
<el-button v-waves slot="reference" type="primary" class="filter-item" style="width: 130px" @click="visible2 = !visible2">{{ $t('public.filter') }}<svg-icon icon-class="shaixuan" style="margin-left: 4px"/></el-button>
</el-popover>
</el-col>
<el-col :span="3" style="margin-left: 20px">
<!-- 搜索按钮 -->
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search" style="width: 86px" round @click="handleFilter">{{ $t('public.search') }}</el-button>
</el-col>
<el-col :span="3">
<el-button v-waves class="filter-item" icon="el-icon-plus" type="success" style="width: 86px" @click="handleAdd">{{ $t('public.add') }}</el-button>
</el-col>
</el-form>
</el-row>
</el-card>
<el-card class="box-card" style="margin-top: 15px" shadow="never">
<!-- 列表开始 -->
<el-table
v-loading="listLoading"
:key="tableKey"
:data="list"
border
fit
highlight-current-row
style="width: 100%;"
@current-change="handleCurrentChange">
<el-table-column :label="$t('public.id')" :resizable="false" align="center" min-width="150">
<template slot-scope="scope">
<span>{{ scope.row.id }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('Customer.agentname')" :resizable="false" prop="agentName" align="center" width="200">
<template slot-scope="scope">
<span>{{ scope.row.agentName }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('Customer.customertype')" :resizable="false" prop="agentType" align="center" width="100">
<template slot-scope="scope">
<span>{{ scope.row.agentType }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('Customer.level')" :resizable="false" prop="agentLevel" align="center" width="200">
<template slot-scope="scope">
<span>{{ scope.row.agentLevel }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('Customer.traderid')" :resizable="false" prop="traderName" align="center" width="100">
<template slot-scope="scope">
<span>{{ scope.row.traderName }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('Customer.contactname')" :resizable="false" prop="contactName" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.contactName }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('Customer.phone')" :resizable="false" prop="phone" align="center" width="200">
<template slot-scope="scope">
<span>{{ scope.row.phone }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('Customer.createName')" :resizable="false" prop="createName" align="center" width="100">
<template slot-scope="scope">
<span>{{ scope.row.createName }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('Customer.createTime')" :resizable="false" prop="createTime" align="center" width="100">
<template slot-scope="scope">
<span>{{ scope.row.createTime }}</span>
</template>
</el-table-column>
</el-table>
<!-- 列表结束 -->
<pagination v-show="total>0" :total="total" :page.sync="getemplist.pagenum" :limit.sync="getemplist.pagesize" @pagination="getlist" />
<!--修改开始=================================================-->
<el-button v-waves class="filter-item" type="success" style="width: 100px;float: left;margin-bottom: 10px" @click="handleConfirm">确认添加</el-button>
</el-card>
</el-dialog>
</template>
<script>
import { searchCusCategory, agentlist } from '@/api/Customer'
import waves from '@/directive/waves' // Waves directive
import Pagination from '@/components/Pagination' // Secondary package based on el-pagination
export default {
directives: { waves },
components: { Pagination },
filters: {
genderFilter(status) {
const statusMap = {
1: '男',
2: '女'
}
return statusMap[status]
},
filterno(status) {
const statusMap = {
1: '老客户',
2: '新客户'
}
return statusMap[status]
}
},
props: {
agentcontrol: {
type: Boolean,
default: false
}
},
data() {
return {
//
employeeVisible: this.agentcontrol,
//
visible2: false,
//
customertypes: [],
customertyp: 1,
//
//
levels: [],
levelstype: 2,
//
//
sources: [],
sourcestype: 3,
//
downloadLoading: false,
//
list: [],
//
total: 0,
//
tableKey: 0,
//
listLoading: true,
//
getemplist: {
agentname: '',
phone: '',
type: '',
pinyin: '',
level: '',
pagenum: 1,
pagesize: 10,
contactname: '',
source: '',
createtime: ''
},
//
customerForm: {
agentname: '',
phone: '',
type: '',
pinyin: '',
level: '',
source: '',
discount: '',
countryid: '',
provinceid: '',
cityid: '',
introduce: '',
address: '',
contactname: '',
traderid: '',
transmode: '',
deliverymode: '',
createid: '',
newold: ''
}
}
},
watch: {
agentcontrol() {
this.employeeVisible = this.agentcontrol
this.getlist()
this.getCategory()
}
},
methods: {
//
getCategory() {
//
searchCusCategory(this.customertyp).then(res => {
if (res.data.ret === 200) {
this.customertypes = res.data.data.content.list
} else {
this.$notify.error({
title: '错误',
message: '出错了',
offset: 100
})
}
})
//
searchCusCategory(this.levelstype).then(res => {
if (res.data.ret === 200) {
this.levels = res.data.data.content.list
} else {
this.$notify.error({
title: '错误',
message: '出错了',
offset: 100
})
}
})
//
searchCusCategory(this.sourcestype).then(res => {
if (res.data.ret === 200) {
this.sources = res.data.data.content.list
} else {
this.$notify.error({
title: '错误',
message: '出错了',
offset: 100
})
}
})
},
getlist() {
//
this.listLoading = true
agentlist(this.getemplist).then(res => {
if (res.data.ret === 200) {
this.list = res.data.data.content.list
this.total = res.data.data.content.totalCount
} else {
this.$notify.error({
title: '错误',
message: '出错了',
offset: 100
})
}
setTimeout(() => {
this.listLoading = false
}, 0.5 * 100)
})
},
//
handleFilter() {
this.getemplist.pagenum = 1
agentlist(this.getemplist).then(res => {
if (res.data.ret === 200) {
this.list = res.data.data.content.list
this.total = res.data.data.content.totalCount
} else {
this.$notify.error({
title: '错误',
message: '出错了',
offset: 100
})
}
})
},
//
handleAdd() {
this.$router.push('/Customer/NewAgent')
},
//
handleCurrentChange(val) {
this.choosedata = val
},
//
handleConfirm() {
this.employeeVisible = false
console.log(this.choosedata)
this.$emit('agentdata', this.choosedata)
}
//
}
}
</script>
<style scoped>
.ERP-container {
margin: 50px 30px;
}
.filter-item{
width: 140px;
}
.form-name{
font-size: 18px;
color: #373e4f;
margin-bottom: -20px;
margin-top: 30px;
}
.container{
margin-top: 2%;
border: 1px solid #eceff6;
}
</style>

View file

@ -0,0 +1,371 @@
<template>
<el-dialog :visible.sync="employeeVisible" :applycontrol="applycontrol" :close-on-press-escape="false" top="10px" title="选择采购申请单" append-to-body width="1100px" @close="$emit('update:applycontrol', false)">
<el-card class="box-card" style="margin-top: 15px;height: 60px;padding-left:0 " shadow="never">
<el-row>
<el-form ref="getemplist" :model="getemplist" style="margin-top: -9px">
<el-col :span="4">
<el-form-item>
<el-input v-model="getemplist.title" :placeholder="$t('StockApply.title')" class="filter-item" clearable @keyup.enter.native="handleFilter"/>
</el-form-item>
</el-col>
<el-col :span="3" style="margin-left: 5px">
<el-form-item>
<el-input v-model="getemplist.applyNumber" placeholder="单据编号" class="filter-item" clearable @keyup.enter.native="handleFilter"/>
</el-form-item>
</el-col>
<el-col :span="3" style="margin-left: 20px">
<el-form-item>
<el-input v-model="applyPersonId" :placeholder="$t('StockApply.applyPersonId')" class="filter-item" clearable @keyup.enter.native="handleFilter" @focus="handlechooseStock"/>
</el-form-item>
<my-emp :control.sync="stockControl" @stockName="stockName"/>
</el-col>
<!--更多搜索条件-->
<el-col :span="3" style="margin-left: 30px">
<el-popover
v-model="visible2"
placement="bottom"
width="500"
trigger="click">
<el-select v-model="getemplist.applyDeptId" placeholder="申请部门" clearable style="width: 40%;float: left;margin-left: 20px">
<el-option
v-for="(item, index) in depts"
:key="index"
:value="item.id"
:label="item.deptName"/>
</el-select>
<el-select v-model="getemplist.stockType" style="width: 40%;float: right;margin-right: 20px" clearable @focus="updatecountry">
<el-option
v-for="(item, index) in types"
:key="index"
:label="item.categoryName"
:value="item.id"/>
</el-select>
<el-select v-model="getemplist.judgeStat" :value="getemplist.judgeStat" placeholder="审批状态" clearable style="width: 40%;float: left;margin-left: 20px;margin-top: 20px">
<el-option value="0" label="未审核"/>
<el-option value="1" label="审核中"/>
<el-option value="2" label="审核通过"/>
<el-option value="3" label="审核不通过"/>
</el-select>
<el-select v-model="getemplist.receiptStat" :value="getemplist.receiptStat" placeholder="单据状态" clearable style="width: 40%;float: right;margin-right: 20px;margin-top: 20px">
<el-option value="1" label="制单"/>
<el-option value="2" label="执行"/>
<el-option value="3" label="结单"/>
</el-select>
<el-date-picker
v-model="date"
type="daterange"
range-separator="-"
unlink-panels
start-placeholder="Start"
end-placeholder="End"
value-format="yyyy-MM-dd"
style="margin-top: 20px;margin-left: 20px"/>
<div class="seachbutton" style="width: 100%;float: right;margin-top: 20px">
<el-button v-waves class="filter-item" type="primary" style="float: right" round @click="handleFilter">{{ $t('public.search') }}</el-button>
</div>
<el-button v-waves slot="reference" type="primary" class="filter-item" style="width: 130px" @click="visible2 = !visible2">{{ $t('public.filter') }}<svg-icon icon-class="shaixuan" style="margin-left: 4px"/></el-button>
</el-popover>
</el-col>
<el-col :span="3" style="margin-left: 20px">
<!-- 搜索按钮 -->
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search" style="width: 86px" round @click="handleFilter">{{ $t('public.search') }}</el-button>
</el-col>
<el-col :span="3">
<el-button v-waves class="filter-item" icon="el-icon-plus" type="success" style="width: 86px" @click="handleAdd">{{ $t('public.add') }}</el-button>
</el-col>
</el-form>
</el-row>
</el-card>
<el-card class="box-card" style="margin-top: 15px" shadow="never">
<!-- 列表开始 -->
<el-table
v-loading="listLoading"
:key="tableKey"
:data="list"
border
fit
highlight-current-row
style="width: 100%;"
@current-change="handleCurrentChange">
<el-table-column :label="$t('public.id')" :resizable="false" align="center" min-width="150">
<template slot-scope="scope">
<span>{{ scope.row.applyNumber }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('StockApply.title')" :resizable="false" align="center" min-width="150">
<template slot-scope="scope">
<span>{{ scope.row.title }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('StockApply.stockType')" :resizable="false" align="center" min-width="150">
<template slot-scope="scope">
<span>{{ scope.row.stockType | stockTypeFilter }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('StockApply.sourceType')" :resizable="false" align="center" min-width="150">
<template slot-scope="scope">
<span>{{ scope.row.sourceType | sourceTypeFilter }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('StockApply.applyPersonId')" :resizable="false" align="center" min-width="150">
<template slot-scope="scope">
<span>{{ scope.row.applyPersonName }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('StockApply.applyDeptId')" :resizable="false" align="center" min-width="150">
<template slot-scope="scope">
<span>{{ scope.row.applyDeptName }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('StockApply.applyDate')" :resizable="false" align="center" min-width="150">
<template slot-scope="scope">
<span>{{ scope.row.applyDate }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('public.judgeStat')" :resizable="false" prop="judgeStat" align="center" min-width="150">
<template slot-scope="scope">
<span>{{ scope.row.judgeStat | judgeStatFilter }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('public.receiptStat')" :resizable="false" align="center" min-width="150">
<template slot-scope="scope">
<span>{{ scope.row.receiptStat | receiptStatFilter }}</span>
</template>
</el-table-column>
</el-table>
<!-- 列表结束 -->
<pagination v-show="total>0" :total="total" :page.sync="getemplist.pagenum" :limit.sync="getemplist.pagesize" @pagination="getlist" />
<!--修改开始=================================================-->
<el-button v-waves class="filter-item" type="success" style="width: 100px;float: left;margin-bottom: 10px" @click="handleConfirm">确认添加</el-button>
</el-card>
</el-dialog>
</template>
<script>
import { stocapplylist } from '@/api/StockApply'
import { getdeptlist } from '@/api/BasicSettings'
import { searchStockCategory } from '@/api/StockCategory'
import waves from '@/directive/waves' // Waves directive
import Pagination from '@/components/Pagination'
import MyEmp from '../../StockApply/components/MyEmp'
export default {
directives: { waves },
components: { MyEmp, Pagination },
filters: {
judgeStatFilter(status) {
const statusMap = {
0: '未审核',
1: '审核中',
2: '审核通过',
3: '审核不通过'
}
return statusMap[status]
},
receiptStatFilter(status) {
const statusMap = {
1: '制单',
2: '执行',
3: '结单'
}
return statusMap[status]
},
stockTypeFilter(status) {
const statusMap = {
1: '采购1'
}
return statusMap[status]
},
sourceTypeFilter(status) {
const statusMap = {
1: '无来源'
}
return statusMap[status]
}
},
props: {
applycontrol: {
type: Boolean,
default: false
}
},
data() {
return {
//
employeeVisible: this.applycontrol,
//
typeparms: {
pagenum: 1,
pagesize: 99999
},
//
types: [],
//
depts: [],
//
reviewParms: {
id: '',
judgePersonId: '',
judgeStat: ''
},
//
detailvisible: false,
//
visible2: false,
//
applyPersonId: '',
//
stockControl: false,
//
moreaction: '',
//
downloadLoading: false,
//
list: [],
//
total: 0,
//
tableKey: 0,
//
listLoading: true,
//
getemplist: {
pageNum: 1,
pageSize: 10,
judgeStat: 2, receiptStat: 2,
repositoryId: this.$store.getters.repositoryId,
regionIds: this.$store.getters.regionId,
isActive: 1
},
//
personalForm: {},
//
editVisible: false,
//
date: []
}
},
watch: {
applycontrol() {
this.employeeVisible = this.applycontrol
this.getlist()
}
},
methods: {
//
updatecountry() {
this.getlist()
},
getlist() {
//
this.listLoading = true
stocapplylist(this.getemplist).then(res => {
if (res.data.ret === 200) {
this.list = res.data.data.content.list
this.total = res.data.data.content.totalCount
}
setTimeout(() => {
this.listLoading = false
}, 0.5 * 100)
})
//
getdeptlist().then(res => {
if (res.data.ret === 200) {
this.depts = res.data.data.content
}
})
//
searchStockCategory(this.typeparms).then(res => {
if (res.data.ret === 200) {
this.types = res.data.data.content.list
}
})
},
//
restFilter() {
this.applyPersonId = ''
this.getemplist.applyPersonId = ''
},
//
handleFilter() {
this.getemplist.pageNum = 1
stocapplylist(this.getemplist).then(res => {
if (res.data.ret === 200) {
this.list = res.data.data.content.list
this.total = res.data.data.content.totalCount
this.restFilter()
} else {
this.restFilter()
}
})
},
// focus
handlechooseStock() {
this.stockControl = true
},
//
stockName(val) {
this.applyPersonId = val.personName
this.getemplist.applyPersonId = val.id
},
//
handleAdd() {
this.$router.push('/StockApply/AddStockApply')
},
//
handleCurrentChange(val) {
this.choosedata = val
},
//
handleConfirm() {
this.employeeVisible = false
console.log(this.choosedata)
const applydata = this.choosedata.stockApplyDetailVos
const number = this.choosedata.applyNumber
const applyDetail = applydata.map(function(item) {
return {
productCode: item.productCode,
productName: item.productName,
productType: item.productType,
typeId: item.typeId,
unit: item.unit,
color: item.color,
basicQuantity: item.applyQuantity,
planDeliveryDate: item.requireDate,
applyReason: item.applyReason,
sourceNumber: number,
supplierId: '',
supplierName: '',
basicPrice: '0.00',
requireQuantity: item.requireQuantity,
planQuantity: item.requireQuantity,
requireDate: item.requireDate,
planMoney: '0.00'
}
})
this.$emit('apply', applyDetail)
this.$emit('apply2', applyDetail)
this.$emit('allinfo', this.choosedata)
}
//
}
}
</script>
<style scoped>
.ERP-container {
margin: 50px 30px;
}
.filter-item{
width: 140px;
}
.form-name{
font-size: 18px;
color: #373e4f;
margin-bottom: -20px;
margin-top: 30px;
}
.container{
margin-top: 2%;
border: 1px solid #eceff6;
}
</style>

View file

@ -0,0 +1,363 @@
<template>
<el-dialog :visible.sync="employeeVisible" :customercontrol="customercontrol" :close-on-press-escape="false" top="10px" title="选择客户" append-to-body width="1100px" @close="$emit('update:customercontrol', false)">
<el-card class="box-card" style="margin-top: 15px;height: 60px;padding-left:0 " shadow="never">
<el-row>
<el-form ref="getemplist" :model="getemplist" style="margin-top: -9px">
<el-col :span="4">
<el-form-item>
<el-input v-model="getemplist.customername" :placeholder="$t('Customer.customername')" clearable @keyup.enter.native="handleFilter"/>
</el-form-item>
</el-col>
<el-col :span="3" style="margin-left: 5px">
<el-form-item>
<el-input v-model="getemplist.customerphone" :placeholder="$t('Customer.phone')" clearable @keyup.enter.native="handleFilter"/>
</el-form-item>
</el-col>
<el-col :span="3" style="margin-left: 20px">
<el-form-item>
<el-select v-model="getemplist.type" :value="getemplist.type" :placeholder="$t('Customer.customertype')" clearable>
<el-option
v-for="(item, index) in customertypes"
:key="index"
:value="item.id"
:label="item.categoryName"/>
</el-select>
</el-form-item>
</el-col>
<!--更多搜索条件-->
<el-col :span="3" style="margin-left: 30px">
<el-popover
v-model="visible2"
placement="bottom"
width="500"
trigger="click">
<el-select v-model="getemplist.source" :value="getemplist.source" :placeholder="$t('Customer.source')" clearable style="width: 40%;float: left;margin-left: 20px;">
<el-option
v-for="(item, index) in sources"
:key="index"
:value="item.id"
:label="item.categoryName"/>
</el-select>
<el-select v-model="getemplist.repositoryid" placeholder="请选择门店" filterable clearable style="width: 40%;float: right;margin-right: 20px">
<el-option
v-for="(item, index) in repositories"
:key="index"
:label="item.repositoryName"
:value="item.id"/>
</el-select>
<el-select v-model="getemplist.level" :placeholder="$t('Customer.level')" clearable style="width: 40%;float: left;margin-left: 20px;margin-top: 20px">
<el-option
v-for="(item, index) in levels"
:key="index"
:value="item.id"
:label="item.categoryName"/>
</el-select>
<div class="seachbutton" style="width: 100%;float: right;margin-top: 20px">
<el-button v-waves class="filter-item" type="primary" style="float: right" round @click="handleFilter">{{ $t('public.search') }}</el-button>
</div>
<el-button v-waves slot="reference" type="primary" class="filter-item" style="width: 130px" @click="visible2 = !visible2">{{ $t('public.filter') }}<svg-icon icon-class="shaixuan" style="margin-left: 4px"/></el-button>
</el-popover>
</el-col>
<el-col :span="3" style="margin-left: 20px">
<!-- 搜索按钮 -->
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search" style="width: 86px" round @click="handleFilter">{{ $t('public.search') }}</el-button>
</el-col>
<el-col :span="3">
<el-button v-waves class="filter-item" icon="el-icon-plus" type="success" style="width: 86px" @click="handleAdd">{{ $t('public.add') }}</el-button>
</el-col>
</el-form>
</el-row>
</el-card>
<el-card class="box-card" style="margin-top: 15px" shadow="never">
<!-- 列表开始 -->
<el-table
v-loading="listLoading"
:key="tableKey"
:data="list"
border
fit
highlight-current-row
style="width: 100%;"
@current-change="handleCurrentChange">
<el-table-column :label="$t('public.id')" :resizable="false" align="center" min-width="150">
<template slot-scope="scope">
<span>{{ scope.row.id }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('Customer.customername')" :resizable="false" align="center" width="80">
<template slot-scope="scope">
<span>{{ scope.row.customerName }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('Customer.customertype')" :resizable="false" align="center" width="100">
<template slot-scope="scope">
<span>{{ scope.row.customerTypeWZ }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('Customer.level')" :resizable="false" align="center" width="200">
<template slot-scope="scope">
<span>{{ scope.row.customerLevel }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('Customer.birthday')" :resizable="false" align="center" width="100">
<template slot-scope="scope">
<span>{{ scope.row.birthday }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('Customer.source')" :resizable="false" align="center" width="100">
<template slot-scope="scope">
<span>{{ scope.row.source }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('Customer.newold')" :resizable="false" align="center" width="100">
<template slot-scope="scope">
<span>{{ scope.row.newOrOld | filterno }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('Customer.phone')" :resizable="false" align="center" width="100">
<template slot-scope="scope">
<span>{{ scope.row.phoneNumber }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('Customer.gender')" :resizable="false" align="center" width="100">
<template slot-scope="scope">
<span>{{ scope.row.gender | genderFilter }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('Customer.address')" :resizable="true" align="center" width="100">
<template slot-scope="scope">
<span>{{ scope.row.address }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('Customer.point')" :resizable="false" align="center" width="100">
<template slot-scope="scope">
<span>{{ scope.row.point }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('Customer.createTime')" :resizable="false" align="center" width="100">
<template slot-scope="scope">
<span>{{ scope.row.createTime }}</span>
</template>
</el-table-column>
</el-table>
<!-- 列表结束 -->
<pagination v-show="total>0" :total="total" :page.sync="getemplist.pagenum" :limit.sync="getemplist.pagesize" @pagination="getlist" />
<!--修改开始=================================================-->
<el-button v-waves class="filter-item" type="success" style="width: 100px;float: left;margin-bottom: 10px" @click="handleConfirm">确认添加</el-button>
</el-card>
</el-dialog>
</template>
<script>
import { searchRepository } from '@/api/public'
import { searchCusCategory, customerlist } from '@/api/Customer'
import waves from '@/directive/waves' // Waves directive
import Pagination from '@/components/Pagination' // Secondary package based on el-pagination
export default {
directives: { waves },
components: { Pagination },
filters: {
genderFilter(status) {
const statusMap = {
1: '男',
2: '女'
}
return statusMap[status]
},
filterno(status) {
const statusMap = {
1: '老客户',
2: '新客户'
}
return statusMap[status]
}
},
props: {
customercontrol: {
type: Boolean,
default: false
}
},
data() {
return {
//
employeeVisible: this.customercontrol,
//
visible2: false,
//
//
customertypes: [],
customertyp: 1,
//
//
levels: [],
levelstype: 2,
//
//
sources: [],
sourcestype: 3,
//
downloadLoading: false,
//
list: [],
//
total: 0,
//
tableKey: 0,
//
listLoading: true,
//
getemplist: {
customername: '',
customerphone: '',
level: '',
createtime: '',
type: '',
pagenum: 1,
pagesize: 10,
repositoryid: '',
source: ''
},
//
depts: [],
//
props: {
value: 'id',
label: 'regionName',
children: 'regionListVos'
},
//
regions: [],
getemplistregions: [],
//
repositories: []
}
},
watch: {
customercontrol() {
this.employeeVisible = this.customercontrol
this.getlist()
this.getCategory()
}
},
methods: {
//
getCategory() {
//
searchCusCategory(this.customertyp).then(res => {
if (res.data.ret === 200) {
this.customertypes = res.data.data.content.list
} else {
console.log('客户类型出错')
}
})
//
searchCusCategory(this.levelstype).then(res => {
if (res.data.ret === 200) {
this.levels = res.data.data.content.list
} else {
console.log('客户优质级别出错')
}
})
//
searchCusCategory(this.sourcestype).then(res => {
if (res.data.ret === 200) {
this.sources = res.data.data.content.list
} else {
console.log('客户来源出错')
}
})
//
searchRepository().then(res => {
if (res.data.ret === 200) {
this.repositories = res.data.data.content.list
} else {
console.log('门店出错')
}
})
},
getlist() {
//
this.listLoading = true
customerlist(this.getemplist).then(res => {
if (res.data.ret === 200) {
this.list = res.data.data.content.list
this.total = res.data.data.content.totalCount
} else {
console.log('员工列表出错')
}
setTimeout(() => {
this.listLoading = false
}, 0.5 * 100)
})
},
//
handleFilter() {
this.getemplist.pagenum = 1
customerlist(this.getemplist).then(res => {
if (res.data.ret === 200) {
this.list = res.data.data.content.list
this.total = res.data.data.content.totalCount
} else {
console.log('搜索出错')
}
})
},
//
tranKTree(arr) {
if (!arr || !arr.length) return
return arr.map(item => ({
id: item.id,
regionName: item.regionName,
regionListVos: this.tranKTree(item.regionListVos)
}))
},
//
handlechange4(val) {
const finalid = val[val.length - 1]
searchRepository(finalid).then(res => {
if (res.data.ret === 200) {
this.repositories = res.data.data.content
} else {
this.$message.error('出错了')
}
})
},
//
handleAdd() {
this.$router.push('/Customer/NewCustomer')
},
//
handleCurrentChange(val) {
this.choosedata = val
},
//
handleConfirm() {
this.employeeVisible = false
console.log(this.choosedata)
this.$emit('customerdata', this.choosedata)
}
//
}
}
</script>
<style scoped>
.ERP-container {
margin: 50px 30px;
}
.filter-item{
width: 140px;
}
.form-name{
font-size: 18px;
color: #373e4f;
margin-bottom: -20px;
margin-top: 30px;
}
.container{
margin-top: 2%;
border: 1px solid #eceff6;
}
</style>

View file

@ -0,0 +1,324 @@
<template>
<el-dialog :visible.sync="employeeVisible" :deliverycontrol="deliverycontrol" :close-on-press-escape="false" top="10px" title="选择员工" append-to-body @close="$emit('update:deliverycontrol', false)">
<div class="filter-container">
<el-input v-model="getemplist.employeename" :placeholder="$t('NewEmployeeInformation.employeename')" class="filter-item" clearable @keyup.enter.native="handleFilter"/>
<el-input v-model="getemplist.jobnumber" :placeholder="$t('NewEmployeeInformation.jobnumber2')" class="filter-item" clearable @keyup.enter.native="handleFilter"/>
<el-date-picker
v-model="getemplist.time"
type="date"
class="filter-item"
placeholder="选择日期"
value-format="yyyy-MM-dd"/>
<el-popover
placement="bottom"
width="500"
trigger="click">
<el-cascader
:options="regions2"
:props="props2"
v-model="getemplistregions"
:show-all-levels="false"
placeholder="请选择区域"
change-on-select
filterable
clearable
style="width: 40%;float: left;margin-left: 20px"
@change="handlechange4"
/>
<el-select v-model="getemplist.repositoryid" placeholder="请选择门店" clearable filterable style="width: 40%;float: right;margin-right: 20px">
<el-option
v-for="(item, index) in repositories"
:key="index"
:label="item.repositoryName"
:value="item.id"/>
</el-select>
<el-select v-model="getemplist.postid" :value="getemplist.postid" :placeholder="$t('NewEmployeeInformation.postid2')" class="filter-item" clearable style="width: 40%;float: left;margin-top: 10px;margin-left: 20px">
<el-option
v-for="(item, index) in jobs"
:key="index"
:label="item.categoryName"
:value="item.id"/>
</el-select>
<el-select v-model="getemplist.deptid" :placeholder="$t('NewEmployeeInformation.deptid2')" class="filter-item" clearable style="width: 40%;float: right;margin-top: 10px;margin-right: 20px">
<el-option
v-for="(item, index) in depts"
:key="index"
:label="item.deptName"
:value="item.id"/>
</el-select>
<div class="seachbutton" style="width: 100%;float: right;margin-top: 20px">
<el-button v-waves class="filter-item" type="primary" style="float: right" @click="handleFilter">{{ $t('public.search') }}</el-button>
</div>
<el-button v-waves slot="reference" type="primary" class="filter-item" style="width: 130px">{{ $t('public.filter') }}<svg-icon icon-class="shaixuan" style="margin-left: 4px"/></el-button>
</el-popover>
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search" style="width: 86px" @click="handleFilter">{{ $t('public.search') }}</el-button>
<el-button v-waves class="filter-item" icon="el-icon-plus" type="success" style="width: 86px;" @click="handleAdd">{{ $t('public.add') }}</el-button>
</div>
<el-table
v-loading="listLoading"
:data="list"
:key="tableKey"
border
fit
highlight-current-row
style="width: 100%"
@current-change="handleCurrentChange">
<el-table-column
:label="$t('NewEmployeeInformation.id')"
:resizable="false"
property="id"
align="center"
width="50"/>
<el-table-column
:label="$t('NewEmployeeInformation.jobNumber')"
:resizable="false"
property="jobNumber"
align="center"
width="100"/>
<el-table-column
:label="$t('NewEmployeeInformation.account')"
:resizable="false"
property="account"
width="150"
align="center"/>
<el-table-column :label="$t('NewEmployeeInformation.name')" :resizable="false" align="center" width="109">
<template slot-scope="scope">
<span>{{ scope.row.firstName }} {{ scope.row.middleName }} {{ scope.row.lastName }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('NewEmployeeInformation.gender')" :resizable="false" prop="gender" align="center" width="80">
<template slot-scope="scope">
<span>{{ scope.row.gender | genderFilter }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('NewEmployeeInformation.deptName')" :resizable="false" prop="deptName" align="center" width="100">
<template slot-scope="scope">
<span>{{ scope.row.deptName }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('NewEmployeeInformation.regionName')" :resizable="false" prop="regionName" align="center" width="230">
<template slot-scope="scope">
<span>{{ scope.row.regionName }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('NewEmployeeInformation.repositoryName')" :resizable="false" prop="repositoryName" align="center" width="100">
<template slot-scope="scope">
<span>{{ scope.row.repositoryName }}</span>
</template>
</el-table-column>
</el-table>
<el-button v-waves class="filter-item" type="success" style="width: 100px;float: left;margin-top: 10px" @click="handleConfirm">确认添加</el-button>
<pagination v-show="total>0" :total="total" :page.sync="getemplist.pagenum" :limit.sync="getemplist.pagesize" @pagination="gitemplist" />
</el-dialog>
</template>
<script>
import { regionlist, searchRepository } from '@/api/public'
import { getemplist, getdeptlist, searchEmpCategory } from '@/api/EmployeeInformation'
import waves from '@/directive/waves' // Waves directive
import Pagination from '@/components/Pagination' // Secondary package based on el-pagination
export default {
directives: { waves },
components: { Pagination },
filters: {
genderFilter(status) {
const statusMap = {
1: '男',
2: '女'
}
return statusMap[status]
}
},
props: {
deliverycontrol: {
type: Boolean,
default: false
}
},
data() {
return {
//
jobCat: {
type: 2,
pagenum: 1,
pagesize: 9999
},
//
jobs: [],
//
choosedata: '',
//
managerPeople: '',
//
regionManagerId: '',
// /
//
currentRow: null,
//
list: [],
//
total: 0,
//
tableKey: 0,
//
listLoading: true,
//
getemplist: {
repositoryid: '',
regionid: '',
postid: '',
deptid: '',
employeename: '',
pagenum: 1,
pagesize: 10,
stat: 1, loginRepositoryId: this.$store.getters.repositoryId, regionIds: this.$store.getters.regionId,
time: '',
jobnumber: ''
},
//
depts: [],
//
props2: {
value: 'id',
label: 'regionName',
children: 'regionListVos'
},
//
regions2: [],
getemplistregions: [],
//
repositories: [],
//
employeeVisible: this.deliverycontrol,
//
regionManagerVisible: false
}
},
watch: {
deliverycontrol() {
this.employeeVisible = this.deliverycontrol
this.gitemplist()
}
},
methods: {
//
gitemplist() {
//
this.listLoading = true
console.log(this.getemplist)
getemplist(this.getemplist).then(res => {
if (res.data.ret === 200) {
this.list = res.data.data.content.list
this.total = res.data.data.content.totalCount
}
setTimeout(() => {
this.listLoading = false
}, 0.5 * 100)
})
//
getdeptlist().then(res => {
if (res.data.ret === 200) {
this.depts = res.data.data.content
}
})
//
regionlist().then(res => {
if (res.data.ret === 200) {
this.regions2 = this.tranKTree(res.data.data.content)
}
})
//
searchEmpCategory(this.jobCat).then(res => {
if (res.data.ret === 200) {
this.jobs = res.data.data.content.list
} else {
console.log('职位列表出错')
}
})
},
//
tranKTree(arr) {
if (!arr || !arr.length) return
return arr.map(item => ({
id: item.id,
regionName: item.regionName,
regionListVos: this.tranKTree(item.regionListVos)
}))
},
//
handleFilter() {
this.getemplist.regionid = this.getemplistregions[this.getemplistregions.length - 1]
getemplist(this.getemplist).then(res => {
if (res.data.ret === 200) {
this.list = res.data.data.content.list
this.total = res.data.data.content.totalCount
}
})
},
//
handleAdd() {
this.employeeVisible = false
this.$router.push('/EmployeeInformation/NewEmployeeInformation')
},
//
handlechange4(val) {
console.log(val)
const finalid = val[val.length - 1]
searchRepository(finalid).then(res => {
if (res.data.ret === 200) {
console.log(res)
this.repositories = res.data.data.content.list
} else {
this.$message.error('出错了')
}
})
},
//
restemplist() {
this.getemplist = {
repositoryid: '',
regionid: '',
postid: '',
deptid: '',
employeename: '',
pagenum: 1,
pagesize: 10,
stat: 1, loginRepositoryId: this.$store.getters.repositoryId, regionIds: this.$store.getters.regionId,
time: '',
jobnumber: ''
}
this.getemplistregions = []
},
//
handleCurrentChange(val) {
this.choosedata = val
},
//
handleConfirm() {
this.employeeVisible = false
this.$emit('deliveryName', this.choosedata)
}
//
}
}
</script>
<style scoped>
.ERP-container {
margin: 50px 30px;
}
.filter-item{
width: 140px;
margin-left: 20px;
}
.form-name{
font-size: 18px;
color: #373e4f;
margin-bottom: -20px;
margin-top: 30px;
}
.container{
margin-top: 2%;
border: 1px solid #eceff6;
}
</style>

View file

@ -0,0 +1,315 @@
<template>
<el-dialog :visible.sync="productVisible" :control="control" :close-on-press-escape="false" top="10px" title="选择商品" append-to-body @close="$emit('update:control', false)">
<div class="filter-container">
<!-- 搜索条件栏目 -->
<el-input v-model="getemplist.code" :placeholder="$t('Product.code')" class="filter-item" clearable @keyup.enter.native="handleFilter"/>
<el-input v-model="getemplist.productname" :placeholder="$t('Product.productname')" class="filter-item" clearable @keyup.enter.native="handleFilter"/>
<el-input v-model="supplierid" :placeholder="$t('Product.supplierid')" class="filter-item" clearable @keyup.enter.native="handleFilter" @focus="handlechoose"/>
<my-supplier :control.sync="empcontrol" @supplierName="supplierName"/>
<el-input v-model="categoryid" placeholder="物品分类" class="filter-item" clearable @focus="treechoose"/>
<my-tree :treecontrol.sync="treecontrol" @tree="tree"/>
<!-- 更多搜索条件下拉栏 -->
<el-popover
v-model="visible2"
placement="bottom"
width="500"
trigger="click">
<el-select v-model="getemplist.typeid" placeholder="请选择规格型号" clearable style="width: 40%;float: left;margin-left: 20px">
<el-option
v-for="(item, index) in types"
:key="index"
:label="item.categoryName"
:value="item.id"
/>
</el-select>
<el-select v-model="getemplist.isactive" placeholder="请选择上下架" clearable style="width: 40%;float: right;margin-right: 20px">
<el-option value="1" label="上1"/>
<el-option value="2" label="下2"/>
</el-select>
<div class="seachbutton" style="width: 100%;float: right;margin-top: 20px">
<el-button v-waves class="filter-item" type="primary" style="float: right" @click="handleFilter">{{ $t('public.search') }}</el-button>
</div>
<el-button v-waves slot="reference" type="primary" class="filter-item" style="width: 130px" @click="visible2 = !visible2">{{ $t('public.filter') }}<svg-icon icon-class="shaixuan" style="margin-left: 4px"/></el-button>
</el-popover>
<!-- 搜索按钮 -->
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search" style="width: 86px" @click="handleFilter">{{ $t('public.search') }}</el-button>
<!-- 新建操作 -->
<el-button v-waves class="filter-item" icon="el-icon-plus" type="success" style="width: 86px" @click="handleAdd">{{ $t('public.add') }}</el-button>
</div>
<!-- 列表开始 -->
<el-table
v-loading="listLoading"
:key="tableKey"
:data="list"
border
fit
highlight-current-row
style="width: 100%;"
@selection-change="handleSelectionChange">
<el-table-column
type="selection"
width="55"
align="center"/>
<el-table-column :label="$t('Product.code')" :resizable="false" prop="code" align="center" width="120">
<template slot-scope="scope">
<span>{{ scope.row.code }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('Product.productname')" :resizable="false" prop="ProductName" align="center" width="100">
<template slot-scope="scope">
<span>{{ scope.row.productName }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('Product.categoryid')" :resizable="false" prop="category" align="center" width="100">
<template slot-scope="scope">
<span>{{ scope.row.category }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('Product.typeid')" :resizable="false" align="center" width="100">
<template slot-scope="scope">
<span>{{ scope.row.productType }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('Product.color')" :resizable="false" prop="color" align="center" width="100">
<template slot-scope="scope">
<span>{{ scope.row.color }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('Product.kpigrade')" :resizable="false" prop="kpiGrade" align="center" width="100">
<template slot-scope="scope">
<span>{{ scope.row.kpiGrade }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('Product.point')" :resizable="false" prop="point" align="center" width="100">
<template slot-scope="scope">
<span>{{ scope.row.point }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('Product.costprice')" :resizable="false" prop="costPrice" align="center" width="100">
<template slot-scope="scope">
<span>{{ scope.row.costPrice }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('Product.purchaseprice')" :resizable="false" prop="purchasePrice" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.purchasePrice }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('Product.createid')" :resizable="false" prop="createName" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.createName }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('Product.createTime')" :resizable="false" prop="createTime" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.createTime }}</span>
</template>
</el-table-column>
</el-table>
<!-- 列表结束 -->
<pagination v-show="total>0" :total="total" :page.sync="getemplist.pagenum" :limit.sync="getemplist.pagesize" style="padding: 0" @pagination="getlist" />
<span slot="footer" class="dialog-footer">
<el-button v-waves type="success" style="text-align: center;" @click="handleAddTo">确认添加</el-button>
</span>
</el-dialog>
</template>
<script>
import { productlist, searchEmpCategory2 } from '@/api/Product'
import waves from '@/directive/waves' // Waves directive
import Pagination from '@/components/Pagination'
import MySupplier from '../../Product/components/MySupplier'
import MyTree from '../../Product/components/MyTree' // Secondary package based on el-pagination
export default {
directives: { waves },
components: { MyTree, MySupplier, Pagination },
filters: {
genderFilter(status) {
const statusMap = {
1: '男',
2: '女'
}
return statusMap[status]
}
},
props: {
control: {
type: Boolean,
default: false
}
},
data() {
return {
//
supplierid: '',
//
empcontrol: false,
//
types: [],
//
treecontrol: false,
//
categoryid: '',
//
productVisible: this.control,
//
visible2: false,
//
moreaction: '',
//
list: [],
//
total: 0,
//
tableKey: 0,
//
listLoading: true,
//
getemplist: {
productid: '',
code: '',
productname: '',
categoryid: '',
typeid: '',
isactive: '',
Productid: '',
pagenum: 1,
pagesize: 10
}
}
},
watch: {
control() {
this.productVisible = this.control
console.log(this.control)
this.getlist()
}
},
created() {
this.getlist()
},
methods: {
getlist() {
//
this.listLoading = true
productlist(this.getemplist).then(res => {
if (res.data.ret === 200) {
this.list = res.data.data.content.list
this.total = res.data.data.content.totalCount
}
setTimeout(() => {
this.listLoading = false
}, 0.5 * 100)
})
//
searchEmpCategory2(2).then(res => {
if (res.data.ret === 200) {
this.types = res.data.data.content.list
}
})
},
restFilter() {
this.categoryid = ''
this.getemplist.categoryid = ''
this.supplierid = ''
this.getemplist.supplierid = ''
},
//
handleFilter() {
this.getemplist.pagenum = 1
productlist(this.getemplist).then(res => {
if (res.data.ret === 200) {
this.list = res.data.data.content.list
this.total = res.data.data.content.totalCount
this.restFilter()
} else {
this.restFilter()
}
})
},
//
handleSelectionChange(val) {
this.moreaction = val
},
// focus
handlechoose() {
this.empcontrol = true
},
//
supplierName(val) {
console.log(val)
this.supplierid = val.supplierName
this.getemplist.supplierid = val.id
},
// focus
treechoose() {
this.treecontrol = true
},
//
tree(val) {
this.categoryid = val.categoryName
this.getemplist.categoryid = val.id
},
//
handleAdd() {
this.$router.push('/Product/NewProduct')
this.productVisible = false
},
//
handleAddTo() {
this.productVisible = false
console.log(this.moreaction)
const productDetail = this.moreaction.map(function(item) {
return {
productCode: item.code,
productName: item.productName,
Categoryid: item.category,
productCategory: item.categoryId,
productType: item.typeId,
typeId: item.productType,
color: item.color,
unit: item.purMeasu,
performanceScore: item.kpiGrade,
productScore: item.point,
quantity: 0,
salePrice: (item.salePrice).toFixed(2),
costPrice: (item.costPrice).toFixed(2),
costMoney: 0,
includeTaxMoney: 0,
taxRate: 0,
taxMoney: 0,
money: 0,
includeTaxCostMoney: '0.00',
discount: 0,
discountMoney: 0,
taxprice: '0.00',
alreadyApplicationQuantity: 0,
alreadyProduceQuantity: 0
}
})
console.log(productDetail)
this.$emit('product', productDetail)
}
}
}
</script>
<style scoped>
.ERP-container {
margin: 50px 30px;
}
.filter-item{
width: 150px;
margin-left: 20px;
}
.form-name{
font-size: 18px;
color: #373e4f;
margin-bottom: -20px;
margin-top: 30px;
}
.container{
margin-top: 2%;
border: 1px solid #eceff6;
}
</style>

View file

@ -0,0 +1,916 @@
<template>
<el-dialog :visible.sync="editVisible" :editcontrol="editcontrol" :editdata="editdata" :close-on-press-escape="false" :title="修改" width="1010px" class="edit" top="-10px" @close="$emit('update:editcontrol', false)">
<!--基本信息-->
<el-card class="box-card" style="margin-top: 63px" shadow="never">
<h2 ref="geren" class="form-name" style="font-size: 16px;color: #606266;margin-top: -5px;">基本信息</h2>
<div class="container" style="margin-top: 37px">
<el-form ref="personalForm" :model="personalForm" :rules="personalrules" :inline="true" status-icon class="demo-ruleForm" label-width="130px">
<el-row>
<el-col :span="12">
<el-form-item :label="$t('AccessTools.title')" prop="title" style="width: 100%;">
<el-input v-model="personalForm.title" style="margin-left: 18px;width: 200px" clearable/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('AccessTools.applyDate')" prop="applyDate" style="width: 100%;">
<el-date-picker
v-model="personalForm.applyDate"
type="date"
value-format="yyyy-MM-dd"
style="margin-left: 18px;width: 200px"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('AccessTools.accessDate')" prop="accessDate" style="width: 100%;">
<el-date-picker
v-model="personalForm.accessDate"
type="date"
value-format="yyyy-MM-dd"
style="margin-left: 18px;width: 200px"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('AccessTools.applyPersonId')" prop="applyPersonId" style="width: 100%;">
<el-input v-model="applyPersonId" style="margin-left: 18px;width: 200px" @focus="handlechooseStock"/>
<my-emp :control.sync="stockControl" @stockName="stockName"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('AccessTools.deptId')" prop="deptId" style="width: 100%;">
<el-select v-model="personalForm.deptId" clearable style="margin-left: 18px;width: 200px">
<el-option
v-for="(item, index) in depts"
:key="index"
:value="item.id"
:label="item.deptName"/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('AccessTools.useType')" style="width: 100%;">
<el-select v-model="personalForm.useType" style="margin-left: 18px;width: 200px">
<el-option value="1" label="维修" />
<el-option value="2" label="其他" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('AccessTools.emergencyLevel')" prop="emergencyLevel" style="width: 100%;">
<el-select v-model="personalForm.emergencyLevel" style="margin-left: 18px;width: 200px">
<el-option value="1" label="紧急" />
<el-option value="2" label="不紧急" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('AccessTools.reason')" prop="applyReason" style="width: 100%;">
<el-input v-model="personalForm.applyReason" style="margin-left: 18px;width: 200px" clearable/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('AccessTools.accessRepositoryId')" prop="accessRepositoryId" style="width: 100%;">
<el-input v-model="accessRepositoryId" style="margin-left: 18px;width: 200px" @focus="handlechooseRep"/>
<my-repository :repositorycontrol.sync="repositorycontrol" @repositoryname="repositoryname"/>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
</el-card>
<!--子件信息-->
<el-card class="box-card" style="margin-top: 15px" shadow="never">
<h2 ref="fuzhu" class="form-name" >工具明细</h2>
<div class="buttons" style="margin-top: 35px;margin-bottom: 10px;">
<el-button @click="handleAddproduct">添加商品</el-button>
<my-detail :control.sync="control" @product="productdetail"/>
<el-button type="danger" @click="$refs.editable.removeSelecteds()">删除</el-button>
</div>
<div class="container">
<el-editable
ref="editable"
:data.sync="list2"
:edit-config="{ showIcon: true, showStatus: true}"
:edit-rules="validRules"
class="click-table1"
stripe
border
size="medium"
style="width: 100%">
<el-editable-column type="selection" min-width="55" align="center"/>
<el-editable-column label="序号" min-width="55" align="center" type="index"/>
<el-editable-column prop="toolsCode" align="center" label="工具编号" min-width="150px"/>
<el-editable-column prop="toolsName" align="center" label="工具名称" min-width="150px"/>
<!-- <el-editable-column prop="productCategory" align="center" label="物品分类" min-width="150px"/>-->
<el-editable-column prop="unit" align="center" label="基本单位" min-width="150px"/>
<!-- <el-editable-column prop="productType" align="center" label="规格型号" min-width="150px"/>-->
<!-- <el-editable-column prop="color" align="center" label="颜色" min-width="150px"/>-->
<!-- <el-editable-column :edit-render="{type: 'default'}" prop="locationId" align="center" label="货位" width="200px">-->
<!-- <template slot-scope="scope">-->
<!-- <el-select v-model="scope.row.locationId" :value="scope.row.locationId" placeholder="请选择货位" filterable clearable style="width: 100%;" @visible-change="updatebatch($event,scope)">-->
<!-- <el-option-->
<!-- v-for="(item, index) in locationlist"-->
<!-- :key="index"-->
<!-- :value="item.id"-->
<!-- :label="item.locationCode"/>-->
<!-- </el-select>-->
<!-- </template>-->
<!-- </el-editable-column>-->
<el-editable-column :edit-render="{name: 'ElInputNumber', type: 'visible'}" prop="quantity" align="center" label="数量" width="150px"/>
<el-editable-column prop="stat" align="center" label="状态" min-width="150px">
<template slot-scope="scope">
<p>{{ scope.row.stat | statFilter }}</p>
</template>
</el-editable-column>
</el-editable>
</div>
</el-card>
<el-card class="box-card" style="position: fixed;width: 1010px;z-index: 100;height: 74px;bottom: 0;" shadow="never">
<div class="buttons" style="float: right;padding-bottom: 10px">
<el-button @click="handlecancel()">取消</el-button>
<el-button type="primary" @click="handleEditok()">保存</el-button>
</div>
</el-card>
</el-dialog>
</template>
<script>
import { updateAccessTools } from '@/api/AccessTools'
import { getdeptlist } from '@/api/BasicSettings'
import { searchStockCategory } from '@/api/StockCategory'
import { searchSaleCategory } from '@/api/SaleCategory'
import { searchCategory } from '@/api/Supplier'
import { ratelist } from '@/api/Installmentrate'
import { getlocation6 } from '@/api/public'
import MyEmp from './MyEmp'
import MyDetail from './MyDetail'
import MyApply from './MyApply'
import MyDelivery from './MyDelivery'
import MyRepository from './MyRepository'
import MyOpportunity from './MyOpportunity'
import MyAgent from './MyAgent'
import MyCustomer from '../../SaleOpportunity/components/MyCustomer'
export default {
components: { MyCustomer, MyOpportunity, MyDelivery, MyApply, MyDetail, MyEmp, MyAgent, MyRepository },
filters: {
statFilter(status) {
const statusMap = {
1: '借出',
2: '归还'
}
return statusMap[status]
}
},
props: {
editcontrol: {
type: Boolean,
default: false
},
editdata: {
type: Object,
default: null
}
},
data() {
const validatePass4 = (rule, value, callback) => {
if (this.customerId === undefined || this.customerId === null || this.customerId === '') {
callback(new Error('请选择客户'))
} else {
callback()
}
}
const validatePass = (rule, value, callback) => {
console.log(this.accessRepositoryId)
if (this.accessRepositoryId === undefined || this.accessRepositoryId === null || this.accessRepositoryId === '') {
callback(new Error('请选择仓库'))
} else {
callback()
}
}
const validatePass2 = (rule, value, callback) => {
console.log(this.inquiryPersonId)
if (this.inquiryPersonId === undefined || this.inquiryPersonId === null || this.inquiryPersonId === '') {
callback(new Error('请选择我方签约人'))
} else {
callback()
}
}
const validatePass3 = (rule, value, callback) => {
console.log(this.applyPersonId)
if (this.applyPersonId === undefined || this.applyPersonId === null || this.applyPersonId === '') {
callback(new Error('请选择申请员'))
} else {
callback()
}
}
return {
pickerOptions0: {
disabledDate: (time) => {
if (this.personalForm.installmentEndtime !== null) {
return time.getTime() < new Date().getTime() - 8.64e7
} else if (this.personalForm.installmentEndtime === null) {
return time.getTime() < new Date().getTime() - 8.64e7
}
}
},
pickerOptions1: {
disabledDate: (time) => {
return time.getTime() < new Date(this.personalForm.installmentBegintime).getTime() - 8.64e7
}
},
pickerOptions3: {
disabledDate: (time) => {
return time.getTime() < new Date().getTime() - 8.64e7
}
},
//
installmentCounts: [],
//
ratelistData: {
stat: 1,
pagenum: 1,
pagesize: 9999
},
//
isinstallappley: false,
//
customerId: '',
//
customercontrol: false,
accessRepositoryId: '',
//
installappleycontrol: false,
//
saleRepositoryId: this.$store.getters.repositoryName,
//
salePersonId: this.$store.getters.name,
//
choosedata: [],
//
editVisible: this.editcontrol,
//
personalForm: this.editdata,
//
agentcontrol: false,
//
invoiceTypes: [],
//
invoicetypeparms: {
type: 4,
pagenum: 1,
pagesize: 99999
},
//
colseTypes: [],
//
colseTypeparms: {
type: 3,
pagenum: 1,
pagesize: 99999
},
//
allNumber: '',
allMoney: '',
allTaxMoney: '',
allIncludeTaxMoney: '',
allDiscountMoney: '',
allMoneyMoveDiscount: '',
applyPersonId: '',
//
repositorycontrol: false,
//
giveIds: [],
//
transportIds: [],
//
paymentIds: [],
//
ourContractorId: '',
//
deliverycontrol: false,
//
opportunitycontrol: false,
//
addpro: true,
//
addsouce: true,
//
supplierId: '',
//
locationlist: [],
//
empcontrol: false,
//
depts: [],
//
stockControl: false,
//
types: [],
//
typeparms: {
pagenum: 1,
pagesize: 99999
},
//
control: false,
//
personalrules: {
emergencyLevel: [
{ required: true, message: '请选择紧急程度', trigger: 'change' }
],
accessRepositoryId: [
{ required: true, validator: validatePass, trigger: 'change' }
],
inquiryPersonId: [
{ required: true, validator: validatePass2, trigger: 'change' }
],
applyPersonId: [
{ required: true, validator: validatePass3, trigger: 'change' }
],
title: [
{ required: true, message: '请输入主题', trigger: 'change' }
],
applyDate: [
{ required: true, message: '请选择申请日期', trigger: 'change' }
],
deptId: [
{ required: true, message: '请选择部门', trigger: 'change' }
],
accessDate: [
{ required: true, message: '请选择使用日期', trigger: 'change' }
],
applyReason: [
{ required: true, message: '请输入原因', trigger: 'change' }
],
customerId: [
{ required: true, validator: validatePass4, trigger: 'change' }
]
},
//
list2: [],
//
validRules: {
}
}
},
watch: {
editcontrol() {
this.editVisible = this.editcontrol
console.log(222)
},
editdata() {
console.log(111)
this.personalForm = this.editdata
this.accessRepositoryId = this.personalForm.accessRepositoryName
this.applyPersonId = this.personalForm.applyPersonName
this.stockPersonId = this.personalForm.stockPersonName
this.salePersonId = this.personalForm.salePersonName
this.customerId = this.personalForm.customerName
this.personalForm.useType = String(this.personalForm.useType)
this.personalForm.emergencyLevel = String(this.personalForm.emergencyLevel)
this.list2 = this.personalForm.accessToolsDetails
this.getlocation6()
}
},
created() {
this.getTypes()
this.getways()
this.getratelist()
},
methods: {
getlocation6() {
// id
// locationlist(this.personalForm.accessRepositoryId).then(res => {
// if (res.data.ret === 200) {
// this.locationlist = res.data.data.content.list
// }
// })
},
updatebatch(event, scope) {
if (event === true) {
console.log(this.personalForm.accessRepositoryId)
if (this.personalForm.accessRepositoryId === undefined || this.personalForm.accessRepositoryId === '') {
this.$notify.error({
title: '错误',
message: '请先选择仓库',
offset: 100
})
return false
}
getlocation6(this.personalForm.accessRepositoryId, scope.row).then(res => {
if (res.data.ret === 200) {
if (res.data.data.content.length !== 0) {
this.locationlist = res.data.data.content
// this.updatebatch3(scope)
} else if (res.data.data.content.length === 0) {
this.$notify.error({
title: '错误',
message: '该仓库没有该商品',
offset: 100
})
this.locationlist = []
return false
}
}
})
}
},
productdetail(val) {
console.log('val', val)
const nowlistdata = this.$refs.editable.getRecords()
console.log('nowlistdata', nowlistdata)
for (let i = 0; i < val.length; i++) {
console.log(val[i].price)
for (let j = 0; j < nowlistdata.length; j++) {
if (val[i].toolsCode === nowlistdata[j].toolsCode) {
this.$notify.error({
title: '错误',
message: '物品已添加',
offset: 100
})
return false
}
}
this.$refs.editable.insert(val[i])
}
},
handlechooseRep() {
this.repositorycontrol = true
},
repositoryname(val) {
this.accessRepositoryId = val.repositoryName
this.personalForm.accessRepositoryId = val.id
},
change() {
this.$forceUpdate()
},
//
getratelist() {
ratelist(this.ratelistData).then(res => {
if (res.data.ret === 200) {
this.installmentCounts = res.data.data.content.list
}
})
},
//
clearCustomer() {
this.personalForm.customerId = ''
this.customerId = ''
},
// focus
chooseCustomer() {
this.$forceUpdate()
if (this.personalForm.customerType === '1') {
this.agentcontrol = true
this.$forceUpdate()
} else if (this.personalForm.customerType === '2') {
this.customercontrol = true
this.$forceUpdate()
}
},
customerdata(val) {
this.personalForm.customerId = val.id
this.customerId = val.customerName
this.personalForm.customerPhone = val.phoneNumber
},
agentdata(val) {
console.log(val)
this.personalForm.customerId = val.id
this.customerId = val.agentName
this.personalForm.customerPhone = val.phone
},
clearfinal() {
this.personalForm.installmentEndtime = null
},
chooseData() {
if (this.personalForm.sourceType === '1') {
this.opportunitycontrol = true
} else if (this.personalForm.sourceType === '2') {
this.installappleycontrol = true
}
},
//
getSummaries(param) {
const { columns, data } = param
const sums = []
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '总计'
return
}
const values = data.map(item => Number(item[column.property]))
if (!values.every(value => isNaN(value))) {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return (prev + curr).toFixed(2)
} else {
return (prev).toFixed(2)
}
}, 0)
sums[index] += ''
} else {
sums[index] = ''
}
})
sums[2] = ''
sums[3] = ''
sums[4] = ''
sums[5] = ''
sums[6] = ''
sums[8] = ''
sums[9] = ''
sums[10] = ''
sums[14] = ''
sums[15] = ''
sums[17] = ''
sums[18] = ''
sums[19] = ''
this.allNumber = sums[7]
this.allMoney = sums[11]
this.allTaxMoney = sums[13]
this.allIncludeTaxMoney = sums[12]
this.allDiscountMoney = sums[16]
this.allMoneyMoveDiscount = sums[12] - sums[16]
return sums
},
getways() {
//
searchCategory(2).then(res => {
if (res.data.ret === 200) {
this.giveIds = res.data.data.content.list
}
})
//
searchCategory(3).then(res => {
if (res.data.ret === 200) {
this.transportIds = res.data.data.content.list
}
})
//
searchCategory(5).then(res => {
if (res.data.ret === 200) {
this.paymentIds = res.data.data.content.list
}
})
},
//
getcostMoney(row) {
row.costMoney = (row.costPrice * row.quantity).toFixed(2)
return row.costMoney
},
//
getincludeTaxMoney(row) {
row.includeTaxMoney = (row.taxprice * row.quantity).toFixed(2)
row.discountMoney = (row.taxprice * row.quantity * (1 - row.discount / 100)).toFixed(2)
return row.includeTaxMoney
},
//
gettaxRate(row) {
if (row.taxprice !== 0) {
row.taxprice = (row.salePrice * (1 + row.taxRate / 100)).toFixed(2)
}
},
//
getTaxMoney2(row) {
row.taxMoney = (row.salePrice * row.taxRate / 100 * row.quantity).toFixed(2)
return row.taxMoney
},
//
getdiscountRate(row) {
if (row.discount === 0) {
row.discountMoney = row.taxprice * row.quantity
} else {
row.discountMoney = (row.taxprice * row.quantity * (1 - row.discount / 100)).toFixed(2)
}
},
//
getdiscountMoney(row) {
console.log(row)
if (row.taxprice !== 0 && row.quantity !== 0 && row.discountMoney !== 0) {
row.discount = ((1 - row.discountMoney / row.taxprice / row.quantity) * 100).toFixed(2)
}
},
//
getMoney(row) {
row.money = (row.quantity * row.salePrice).toFixed(2)
return row.money
},
//
gettaxprice(row) {
row.taxprice = (row.salePrice * (1 + row.taxRate / 100)).toFixed(2)
return row.taxprice
},
getincludeTaxCostMoney(row) {
row.includeTaxCostMoney = Number(row.salePrice * row.quantity) + Number(row.taxMoney)
return row.includeTaxCostMoney
},
//
chooseType() {
console.log(this.personalForm.sourceType)
if (this.personalForm.sourceType === '1') {
this.$refs.editable.clear()
this.personalForm.sourceNumber = ''
this.personalForm.installmentCount = ''
this.isinstallappley = true
} else if (this.personalForm.sourceType === '2') {
this.$refs.editable.clear()
this.personalForm.sourceNumber = ''
this.personalForm.installmentCount = ''
this.isinstallappley = false
}
},
//
handleAddSouce() {
if (this.personalForm.sourceType === '1') {
this.applycontrol = true
} else if (this.personalForm.sourceType === '2') {
this.plancontrol = true
} else if (this.personalForm.sourceType === '3') {
this.inquirycontrol = true
}
},
//
opportunityDetail(val) {
console.log(val)
this.$refs.editable.clear()
const nowlistdata = this.$refs.editable.getRecords()
for (let i = 0; i < val.length; i++) {
for (let j = 0; j < nowlistdata.length; j++) {
if (val[i].sourceNumber === nowlistdata[j].sourceNumber) {
this.$notify.error({
title: '错误',
message: '物品已添加',
offset: 100
})
return false
}
}
this.$refs.editable.insert(val[i])
}
},
opportunity(val) {
this.personalForm.sourceNumber = val.opportunityNumber
this.personalForm.salePersonId = val.handlePersonId
this.salePersonId = val.handlePersonName
},
installappleyDetail(val) {
console.log(val)
this.$refs.editable.clear()
const nowlistdata = this.$refs.editable.getRecords()
for (let i = 0; i < val.length; i++) {
for (let j = 0; j < nowlistdata.length; j++) {
if (val[i].sourceNumber === nowlistdata[j].sourceNumber) {
this.$notify.error({
title: '错误',
message: '物品已添加',
offset: 100
})
return false
}
}
this.$refs.editable.insert(val[i])
}
},
installappley(val) {
this.personalForm.sourceNumber = val.applyNumber
this.personalForm.installmentCount = val.installmentCount
},
//
updatecountry() {
this.getTypes()
},
getTypes() {
//
searchStockCategory(this.typeparms).then(res => {
if (res.data.ret === 200) {
this.types = res.data.data.content.list
}
})
//
getdeptlist().then(res => {
if (res.data.ret === 200) {
this.depts = res.data.data.content
}
})
//
searchSaleCategory(this.invoicetypeparms).then(res => {
if (res.data.ret === 200) {
this.invoiceTypes = res.data.data.content.list
}
})
//
searchSaleCategory(this.colseTypeparms).then(res => {
if (res.data.ret === 200) {
this.colseTypes = res.data.data.content.list
}
})
},
// focus
handlechoose() {
this.empcontrol = true
},
//
supplierName(val) {
console.log(val)
this.supplierId = val.supplierName
this.personalForm.supplierId = val.id
},
// focus
handlechooseStock() {
this.stockControl = true
},
//
stockName(val) {
console.log(val)
this.applyPersonId = val.personName
this.personalForm.applyPersonId = val.id
// this.personalForm.deptId = val.deptId
// this.personalForm.saleRepositoryId = val.repositoryId
// this.saleRepositoryId = val.repositoryName
},
// foucs
handlechooseDelivery() {
this.deliverycontrol = true
},
deliveryName(val) {
this.ourContractorId = val.personName
this.personalForm.ourContractorId = val.id
},
//
handleAddproduct() {
this.control = true
},
//
restAllForm() {
this.personalForm = {
createPersonId: this.$store.getters.userId,
countryId: this.$store.getters.countryId,
repositoryId: this.$store.getters.repositoryId,
regionId: this.$store.getters.regionId,
isVat: 1
}
this.supplierId = null
this.inquiryPersonId = null
this.stockPersonId = null
this.ourContractorId = null
},
//
deepClone(obj) {
const _obj = JSON.stringify(obj)
const objClone = JSON.parse(_obj)
return objClone
},
//
//
handleEditok() {
this.$refs.personalForm.validate((valid) => {
if (valid) {
this.personalForm.repositoryId = this.$store.getters.repositoryId
this.personalForm.regionId = this.$store.getters.regionId
this.personalForm.createPersonId = this.$store.getters.userId
this.personalForm.countryId = this.$store.getters.countryId
this.personalForm.modifyPersonId = this.$store.getters.userId
const EnterDetail = this.deepClone(this.$refs.editable.getRecords())
if (EnterDetail.length !== 0) {
EnterDetail.map(function(elem) {
return elem
}).forEach(function(elem) {
if (elem.productCode === null || elem.productCode === '' || elem.productCode === undefined) {
delete elem.productCode
}
if (elem.productName === null || elem.productName === '' || elem.productName === undefined) {
delete elem.productName
}
if (elem.type === null || elem.type === '' || elem.type === undefined) {
delete elem.type
}
if (elem.unit === null || elem.unit === '' || elem.unit === undefined) {
delete elem.unit
}
if (elem.price === null || elem.price === '' || elem.price === undefined) {
delete elem.price
}
if (elem.plannedQuantity === null || elem.plannedQuantity === '' || elem.plannedQuantity === undefined) {
delete elem.plannedQuantity
}
if (elem.requireDate === null || elem.requireDate === '' || elem.requireDate === undefined) {
delete elem.requireDate
}
if (elem.reason === null || elem.reason === '' || elem.reason === undefined) {
delete elem.reason
}
if (elem.sourceNumber === null || elem.sourceNumber === '' || elem.sourceNumber === undefined) {
delete elem.sourceNumber
}
if (elem.sourceSerialNumber === null || elem.sourceSerialNumber === '' || elem.sourceSerialNumber === undefined) {
delete elem.sourceSerialNumber
}
if (elem.includeTaxPrice === null || elem.includeTaxPrice === '' || elem.includeTaxPrice === undefined) {
delete elem.includeTaxPrice
}
if (elem.taxRate === null || elem.taxRate === '' || elem.taxRate === undefined) {
delete elem.taxRate
}
if (elem.taxRate !== null || elem.taxRate !== '' || elem.taxRate !== undefined) {
elem.taxRate = elem.taxRate / 100
}
if (elem.discount === null || elem.discount === '' || elem.discount === undefined) {
delete elem.discount
}
if (elem.discount !== null || elem.discount !== '' || elem.discount !== undefined) {
elem.discount = elem.discount / 100
}
if (elem.money === null || elem.money === '' || elem.money === undefined) {
delete elem.money
}
if (elem.includeTaxMoney === null || elem.includeTaxMoney === '' || elem.includeTaxMoney === undefined) {
delete elem.includeTaxMoney
}
if (elem.taxMoney === null || elem.taxMoney === '' || elem.taxMoney === undefined) {
delete elem.taxMoney
}
if (elem.discountRate === null || elem.discountRate === '' || elem.discountRate === undefined) {
delete elem.discountRate
}
if (elem.discountMoney === null || elem.discountMoney === '' || elem.discountMoney === undefined) {
delete elem.discountMoney
}
return elem
})
const parms2 = JSON.stringify(EnterDetail)
const Data = this.personalForm
for (const key in Data) {
if (Data[key] === '' || Data[key] === undefined || Data[key] === null) {
delete Data[key]
}
}
const parms = JSON.stringify(Data)
updateAccessTools(parms, parms2).then(res => {
if (res.data.ret === 200) {
this.$notify({
title: '操作成功',
message: '操作成功',
type: 'success',
duration: 1000,
offset: 100
})
this.$emit('rest', true)
this.$refs.editable.clear()
this.$refs.personalForm.clearValidate()
this.$refs.personalForm.resetFields()
this.editVisible = false
} else {
this.$notify.error({
title: '错误',
message: '出错了',
offset: 100
})
}
})
} else {
this.$notify.error({
title: '错误',
message: '明细不能为空',
offset: 100
})
return false
}
} else {
this.$notify.error({
title: '错误',
message: '信息未填完整',
offset: 100
})
return false
}
})
},
handlecancel() {
this.$refs.editable.clear()
this.$refs.personalForm.clearValidate()
this.$refs.personalForm.resetFields()
this.editVisible = false
}
// -------------------------------------------------
}
}
</script>
<style rel="stylesheet/css" scoped>
.container >>> .el-form-item.is-required:not(.is-no-asterisk)>.el-form-item__label:before{
margin-left: -10px;
}
.container >>> .el-form-item__label{
text-align: left;
}
.container >>> .el-form-item__label{
color: #60626696;
}
.edit >>> .el-dialog {
background:#f1f1f1 ;
left: 0;
}
.el-col-12{
width: 49%;
}
</style>

View file

@ -0,0 +1,330 @@
<template>
<el-dialog :visible.sync="employeeVisible" :control="control" :close-on-press-escape="false" top="10px" title="选择员工" append-to-body @close="$emit('update:control', false)">
<div class="filter-container">
<el-input v-model="getemplist.employeename" :placeholder="$t('NewEmployeeInformation.employeename')" class="filter-item" clearable @keyup.enter.native="handleFilter"/>
<el-input v-model="getemplist.jobnumber" :placeholder="$t('NewEmployeeInformation.jobnumber2')" class="filter-item" clearable @keyup.enter.native="handleFilter"/>
<el-date-picker
v-model="getemplist.time"
type="date"
class="filter-item"
placeholder="选择日期"
value-format="yyyy-MM-dd"/>
<el-popover
placement="bottom"
width="500"
trigger="click">
<el-cascader
:options="regions2"
:props="props2"
v-model="getemplistregions"
:show-all-levels="false"
placeholder="请选择区域"
change-on-select
filterable
clearable
style="width: 40%;float: left;margin-left: 20px"
@change="handlechange4"
/>
<el-select v-model="getemplist.repositoryid" placeholder="请选择门店" clearable filterable style="width: 40%;float: right;margin-right: 20px">
<el-option
v-for="(item, index) in repositories"
:key="index"
:label="item.repositoryName"
:value="item.id"/>
</el-select>
<el-select v-model="getemplist.postid" :value="getemplist.postid" :placeholder="$t('NewEmployeeInformation.postid2')" class="filter-item" clearable style="width: 40%;float: left;margin-top: 10px;margin-left: 20px">
<el-option
v-for="(item, index) in jobs"
:key="index"
:label="item.categoryName"
:value="item.id"/>
</el-select>
<el-select v-model="getemplist.deptid" :placeholder="$t('NewEmployeeInformation.deptid2')" class="filter-item" clearable style="width: 40%;float: right;margin-top: 10px;margin-right: 20px">
<el-option
v-for="(item, index) in depts"
:key="index"
:label="item.deptName"
:value="item.id"/>
</el-select>
<div class="seachbutton" style="width: 100%;float: right;margin-top: 20px">
<el-button v-waves class="filter-item" type="primary" style="float: right" @click="handleFilter">{{ $t('public.search') }}</el-button>
</div>
<el-button v-waves slot="reference" type="primary" class="filter-item" style="width: 130px">{{ $t('public.filter') }}<svg-icon icon-class="shaixuan" style="margin-left: 4px"/></el-button>
</el-popover>
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search" style="width: 86px" @click="handleFilter">{{ $t('public.search') }}</el-button>
<el-button v-waves class="filter-item" icon="el-icon-plus" type="success" style="width: 86px;" @click="handleAdd">{{ $t('public.add') }}</el-button>
</div>
<el-table
v-loading="listLoading"
:data="list"
:key="tableKey"
border
fit
highlight-current-row
style="width: 100%"
@current-change="handleCurrentChange">
<el-table-column
:label="$t('NewEmployeeInformation.id')"
:resizable="false"
property="id"
align="center"
width="50"/>
<el-table-column
:label="$t('NewEmployeeInformation.jobNumber')"
:resizable="false"
property="jobNumber"
align="center"
width="100"/>
<el-table-column
:label="$t('NewEmployeeInformation.account')"
:resizable="false"
property="account"
width="150"
align="center"/>
<el-table-column :label="$t('NewEmployeeInformation.name')" :resizable="false" align="center" width="109">
<template slot-scope="scope">
<span>{{ scope.row.firstName }} {{ scope.row.middleName }} {{ scope.row.lastName }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('NewEmployeeInformation.gender')" :resizable="false" prop="gender" align="center" width="80">
<template slot-scope="scope">
<span>{{ scope.row.gender | genderFilter }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('NewEmployeeInformation.deptName')" :resizable="false" prop="deptName" align="center" width="100">
<template slot-scope="scope">
<span>{{ scope.row.deptName }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('NewEmployeeInformation.regionName')" :resizable="false" prop="regionName" align="center" width="230">
<template slot-scope="scope">
<span>{{ scope.row.regionName }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('NewEmployeeInformation.repositoryName')" :resizable="false" prop="repositoryName" align="center" width="100">
<template slot-scope="scope">
<span>{{ scope.row.repositoryName }}</span>
</template>
</el-table-column>
</el-table>
<el-button v-waves class="filter-item" type="success" style="width: 100px;float: left;margin-top: 10px" @click="handleConfirm">确认添加</el-button>
<pagination v-show="total>0" :total="total" :page.sync="getemplist.pagenum" :limit.sync="getemplist.pagesize" @pagination="gitemplist" />
</el-dialog>
</template>
<script>
import { regionlist, searchRepository } from '@/api/public'
import { getemplist, getdeptlist, searchEmpCategory } from '@/api/EmployeeInformation'
import waves from '@/directive/waves' // Waves directive
import Pagination from '@/components/Pagination' // Secondary package based on el-pagination
export default {
directives: { waves },
components: { Pagination },
filters: {
genderFilter(status) {
const statusMap = {
1: '男',
2: '女'
}
return statusMap[status]
}
},
props: {
control: {
type: Boolean,
default: false
}
},
data() {
return {
//
jobCat: {
type: 2,
pagenum: 1,
pagesize: 9999
},
//
jobs: [],
//
choosedata: '',
//
managerPeople: '',
//
regionManagerId: '',
// /
//
currentRow: null,
//
list: [],
//
total: 0,
//
tableKey: 0,
//
listLoading: true,
//
getemplist: {
repositoryid: '',
regionid: '',
postid: '',
deptid: '',
employeename: '',
pagenum: 1,
pagesize: 10,
stat: 1, loginRepositoryId: this.$store.getters.repositoryId, regionIds: this.$store.getters.regionId,
time: '',
jobnumber: ''
},
//
depts: [],
//
props2: {
value: 'id',
label: 'regionName',
children: 'regionListVos'
},
//
regions2: [],
getemplistregions: [],
//
repositories: [],
//
employeeVisible: this.control,
//
regionManagerVisible: false
}
},
watch: {
control() {
this.employeeVisible = this.control
this.gitemplist()
}
},
methods: {
//
gitemplist() {
//
this.listLoading = true
console.log(this.getemplist)
getemplist(this.getemplist).then(res => {
if (res.data.ret === 200) {
this.list = res.data.data.content.list
this.total = res.data.data.content.totalCount
}
setTimeout(() => {
this.listLoading = false
}, 0.5 * 100)
})
//
getdeptlist().then(res => {
if (res.data.ret === 200) {
this.depts = res.data.data.content
}
})
//
regionlist().then(res => {
if (res.data.ret === 200) {
this.regions2 = this.tranKTree(res.data.data.content)
}
})
//
searchEmpCategory(this.jobCat).then(res => {
if (res.data.ret === 200) {
this.jobs = res.data.data.content.list
} else {
console.log('职位列表出错')
}
})
},
//
tranKTree(arr) {
if (!arr || !arr.length) return
return arr.map(item => ({
id: item.id,
regionName: item.regionName,
regionListVos: this.tranKTree(item.regionListVos)
}))
},
//
handleFilter() {
this.getemplist.regionid = this.getemplistregions[this.getemplistregions.length - 1]
getemplist(this.getemplist).then(res => {
if (res.data.ret === 200) {
this.list = res.data.data.content.list
this.total = res.data.data.content.totalCount
} else {
this.$notify.error({
title: '错误',
message: '出错了',
offset: 100
})
}
})
},
//
handleAdd() {
this.employeeVisible = false
this.$router.push('/EmployeeInformation/NewEmployeeInformation')
},
//
handlechange4(val) {
console.log(val)
const finalid = val[val.length - 1]
searchRepository(finalid).then(res => {
if (res.data.ret === 200) {
console.log(res)
this.repositories = res.data.data.content.list
} else {
this.$message.error('出错了')
}
})
},
//
restemplist() {
this.getemplist = {
repositoryid: '',
regionid: '',
postid: '',
deptid: '',
employeename: '',
pagenum: 1,
pagesize: 10,
stat: 1, loginRepositoryId: this.$store.getters.repositoryId, regionIds: this.$store.getters.regionId,
time: '',
jobnumber: ''
}
this.getemplistregions = []
},
//
handleCurrentChange(val) {
this.choosedata = val
},
//
handleConfirm() {
this.employeeVisible = false
this.$emit('stockName', this.choosedata)
}
//
}
}
</script>
<style scoped>
.ERP-container {
margin: 50px 30px;
}
.filter-item{
width: 140px;
margin-left: 20px;
}
.form-name{
font-size: 18px;
color: #373e4f;
margin-bottom: -20px;
margin-top: 30px;
}
.container{
margin-top: 2%;
border: 1px solid #eceff6;
}
</style>

View file

@ -0,0 +1,417 @@
<template>
<el-dialog :visible.sync="employeeVisible" :opportunitycontrol="opportunitycontrol" :close-on-press-escape="false" top="10px" title="选择销售机会单" append-to-body width="1100px" @close="$emit('update:opportunitycontrol', false)">
<el-card class="box-card" style="margin-top: 15px;height: 60px;padding-left:0 " shadow="never">
<el-row>
<el-form ref="getemplist" :model="getemplist" style="margin-top: -9px">
<el-col :span="4">
<el-form-item>
<el-input v-model="getemplist.title" :placeholder="$t('SaleOpportunity.title')" clearable @keyup.enter.native="handleFilter"/>
</el-form-item>
</el-col>
<el-col :span="3" style="margin-left: 5px">
<el-form-item>
<el-input v-model="getemplist.opportunityNumber" placeholder="机会单号" clearable @keyup.enter.native="handleFilter"/>
</el-form-item>
</el-col>
<el-col :span="3" style="margin-left: 20px">
<el-form-item>
<el-select v-model="getemplist.opportunityType" :value="getemplist.opportunityType" clearable @keyup.enter.native="handleFilter">
<el-option value="1" label="机会1"/>
</el-select>
</el-form-item>
</el-col>
<!--更多搜索条件-->
<el-col :span="3" style="margin-left: 30px">
<el-popover
v-model="visible2"
placement="bottom"
width="500"
trigger="click">
<el-select v-model="getemplist.customerType" :placeholder="$t('SaleOpportunity.customerType')" clearable style="width: 40%;float: left;margin-left: 20px">
<el-option value="1" label="经销商"/>
<el-option value="2" label="零售"/>
</el-select>
<el-input v-model="customerName" :placeholder="$t('SaleOpportunity.customerName')" style="width: 40%;float: right;margin-right: 20px;" clearable @focus="chooseCustomer"/>
<my-customer :customercontrol.sync="customercontrol" @customerdata="customerdata"/>
<my-agent :agentcontrol.sync="agentcontrol" @agentdata="agentdata"/>
<!--<el-select v-model="getemplist.receiptStat" :value="getemplist.receiptStat" placeholder="单据状态" clearable style="width: 40%;float: left;margin-left: 20px;margin-top: 20px">-->
<!--<el-option value="1" label="制单"/>-->
<!--<el-option value="2" label="执行"/>-->
<!--<el-option value="3" label="结单"/>-->
<!--</el-select>-->
<!--<el-select v-model="getemplist.judgeStat" :value="getemplist.judgeStat" placeholder="审批状态" clearable style="width: 40%;float: right;margin-right: 20px;margin-top: 20px">-->
<!--<el-option value="0" label="未审核"/>-->
<!--<el-option value="1" label="审核中"/>-->
<!--<el-option value="2" label="审核通过"/>-->
<!--<el-option value="3" label="审核不通过"/>-->
<!--</el-select>-->
<!--<el-date-picker-->
<!--v-model="date"-->
<!--type="daterange"-->
<!--range-separator="-"-->
<!--unlink-panels-->
<!--start-placeholder="销售日期"-->
<!--end-placeholder="销售日期"-->
<!--value-format="yyyy-MM-dd"-->
<!--style="margin-top: 20px;margin-left: 20px"/>-->
<div class="seachbutton" style="width: 100%;float: right;margin-top: 20px">
<el-button v-waves class="filter-item" type="primary" style="float: right" round @click="handleFilter">{{ $t('public.search') }}</el-button>
</div>
<el-button v-waves slot="reference" type="primary" class="filter-item" style="width: 130px" @click="visible2 = !visible2">{{ $t('public.filter') }}<svg-icon icon-class="shaixuan" style="margin-left: 4px"/></el-button>
</el-popover>
</el-col>
<el-col :span="3" style="margin-left: 20px">
<!-- 搜索按钮 -->
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search" style="width: 86px" round @click="handleFilter">{{ $t('public.search') }}</el-button>
</el-col>
<el-col :span="3">
<el-button v-waves class="filter-item" icon="el-icon-plus" type="success" style="width: 86px" @click="handleAdd">{{ $t('public.add') }}</el-button>
</el-col>
</el-form>
</el-row>
</el-card>
<el-card class="box-card" style="margin-top: 15px" shadow="never">
<!-- 列表开始 -->
<el-table
v-loading="listLoading"
:key="tableKey"
:data="list"
border
fit
highlight-current-row
style="width: 100%;"
@current-change="handleCurrentChange">
<el-table-column :label="$t('public.id')" :resizable="false" align="center" min-width="150">
<template slot-scope="scope">
<span>{{ scope.row.opportunityNumber }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('SaleOpportunity.title')" :resizable="false" align="center" min-width="150">
<template slot-scope="scope">
<span>{{ scope.row.title }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('SaleOpportunity.customerName')" :resizable="false" align="center" min-width="150">
<template slot-scope="scope">
<span>{{ scope.row.customerName }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('SaleOpportunity.customerPhone')" :resizable="false" align="center" min-width="150">
<template slot-scope="scope">
<span>{{ scope.row.customerPhone }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('SaleOpportunity.opportunityType')" :resizable="false" align="center" min-width="150">
<template slot-scope="scope">
<span>{{ scope.row.opportunityTypeName }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('SaleOpportunity.opportunitySource')" :resizable="false" align="center" min-width="150">
<template slot-scope="scope">
<span>{{ scope.row.opportunitySourceName }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('SaleOpportunity.handlePersonId')" :resizable="false" align="center" min-width="150">
<template slot-scope="scope">
<span>{{ scope.row.handlePersonName }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('SaleOpportunity.isSale')" :resizable="false" align="center" min-width="150">
<template slot-scope="scope">
<span>{{ scope.row.isSale | isSaleFilter }}</span>
</template>
</el-table-column>
</el-table>
<!-- 列表结束 -->
<pagination v-show="total>0" :total="total" :page.sync="getemplist.pageNum" :limit.sync="getemplist.pageSize" @pagination="getlist" />
<!--修改开始=================================================-->
<el-button v-waves class="filter-item" type="success" style="width: 100px;float: left;margin-bottom: 10px" @click="handleConfirm">确认添加</el-button>
</el-card>
</el-dialog>
</template>
<script>
import { saleopportunitylist } from '@/api/SaleOpportunity'
import { getdeptlist } from '@/api/BasicSettings'
import { searchStockCategory } from '@/api/StockCategory'
import waves from '@/directive/waves' // Waves directive
import Pagination from '@/components/Pagination'
import MyEmp from './MyEmp'
import MyCustomer from './MyCustomer'
import MyAgent from './MyAgent'
export default {
directives: { waves },
components: { MyEmp, MyCustomer, MyAgent, Pagination },
filters: {
judgeStatFilter(status) {
const statusMap = {
0: '未审核',
1: '审核中',
2: '审核通过',
3: '审核不通过'
}
return statusMap[status]
},
receiptStatFilter(status) {
const statusMap = {
1: '制单',
2: '执行',
3: '结单'
}
return statusMap[status]
},
stockTypeFilter(status) {
const statusMap = {
1: '采购1'
}
return statusMap[status]
},
isSaleFilter(status) {
const statusMap = {
1: '跟进中',
2: '销售成功'
}
return statusMap[status]
}
},
props: {
opportunitycontrol: {
type: Boolean,
default: false
}
},
data() {
return {
//
employeeVisible: this.opportunitycontrol,
//
customerName: '',
//
customercontrol: false,
agentcontrol: false,
//
typeparms: {
pagenum: 1,
pagesize: 99999
},
//
types: [],
//
depts: [],
//
reviewParms: {
id: '',
judgePersonId: '',
judgeStat: ''
},
//
detailvisible: false,
//
visible2: false,
//
supplierId: '',
//
empcontrol: false,
//
stockPersonId: '',
//
stockControl: false,
//
moreaction: '',
//
downloadLoading: false,
//
list: [],
//
total: 0,
//
tableKey: 0,
//
listLoading: true,
//
getemplist: {
pageNum: 1,
pageSize: 10,
isUse: 1,
repositoryId: this.$store.getters.repositoryId,
regionIds: this.$store.getters.regionId,
isActive: 1
},
//
personalForm: {},
//
editVisible: false,
//
date: []
}
},
watch: {
opportunitycontrol() {
this.employeeVisible = this.opportunitycontrol
this.getlist()
}
},
methods: {
//
clearCustomer() {
this.getemplist.customerId = ''
this.customerName = ''
},
// focus
chooseCustomer() {
if (this.getemplist.customerType === '1') {
this.agentcontrol = true
} else if (this.getemplist.customerType === '2') {
this.customercontrol = true
}
},
customerdata(val) {
this.getemplist.customerId = val.id
this.customerName = val.customerName
},
agentdata(val) {
this.getemplist.customerId = val.id
this.customerName = val.agentName
},
//
updatecountry() {
this.getlist()
},
getlist() {
//
this.listLoading = true
saleopportunitylist(this.getemplist).then(res => {
if (res.data.ret === 200) {
this.list = res.data.data.content.list
this.total = res.data.data.content.totalCount
}
setTimeout(() => {
this.listLoading = false
}, 0.5 * 100)
})
//
getdeptlist().then(res => {
if (res.data.ret === 200) {
this.depts = res.data.data.content
}
})
//
searchStockCategory(this.typeparms).then(res => {
if (res.data.ret === 200) {
this.types = res.data.data.content.list
}
})
},
//
restFilter() {
this.customerName = ''
this.getemplist.customerId = ''
this.stockPersonId = ''
this.getemplist.stockPersonId = ''
},
//
handleFilter() {
this.getemplist.pageNum = 1
saleopportunitylist(this.getemplist).then(res => {
if (res.data.ret === 200) {
this.list = res.data.data.content.list
this.total = res.data.data.content.totalCount
this.restFilter()
} else {
this.restFilter()
}
})
},
// focus
handlechooseStock() {
this.stockControl = true
},
//
stockName(val) {
this.stockPersonId = val.personName
this.getemplist.stockPersonId = val.id
},
// focus
handlechoose() {
this.empcontrol = true
},
//
supplierName(val) {
console.log(val)
this.supplierId = val.supplierName
this.getemplist.supplierId = val.id
},
//
handleAdd() {
this.$router.push('/SaleOpportunity/AddSaleOpportunity')
},
//
handleCurrentChange(val) {
this.choosedata = val
},
//
handleConfirm() {
this.employeeVisible = false
console.log(this.choosedata)
const opportunitydata = this.choosedata.saleOpportunityDetailVos
const opportunityNumber = this.choosedata.opportunityNumber
const opportunityDetail = opportunitydata.map(function(item) {
return {
productCode: item.productCode,
productName: item.productName,
productCategory: item.categoryId,
Categoryid: item.productCategory,
category: item.categoryId,
unit: item.unit,
productType: item.typeId,
typeId: item.productType,
type: item.typeId,
color: item.color,
kpiGrade: item.kpiGrade,
point: item.point,
quantity: 0,
salePrice: '0.00',
costPrice: '0.00',
taxprice: '0.00',
costMoney: '0.00',
includeTaxMoney: '0.00',
taxRate: '0.00',
taxMoney: '0.00',
money: '0.00',
includeTaxCostMoney: '0.00',
discount: '0.00',
discountMoney: '0.00',
carCode: 0,
motorCode: 0,
batteryCode: 0,
sourceNumber: opportunityNumber,
alreadyApplicationQuantity: 0,
alreadyProduceQuantity: 0
}
})
this.$emit('opportunityDetail', opportunityDetail)
this.$emit('opportunity', this.choosedata)
}
//
}
}
</script>
<style scoped>
.ERP-container {
margin: 50px 30px;
}
.filter-item{
width: 140px;
}
.form-name{
font-size: 18px;
color: #373e4f;
margin-bottom: -20px;
margin-top: 30px;
}
.container{
margin-top: 2%;
border: 1px solid #eceff6;
}
</style>

View file

@ -0,0 +1,264 @@
<template>
<el-dialog :visible.sync="repositoryVisible" :repositorycontrol="repositorycontrol" :close-on-press-escape="false" top="10px" title="选择仓库" append-to-body @close="$emit('update:repositorycontrol', false)">
<div class="filter-container">
<!-- 搜索条件栏目 -->
<el-input v-model="getemplist.id" :placeholder="$t('Repository.id')" class="filter-item" clearable @keyup.enter.native="handleFilter"/>
<el-input v-model="getemplist.repositoryName" :placeholder="$t('Repository.repositoryname')" class="filter-item" clearable @keyup.enter.native="handleFilter"/>
<el-select v-model="getemplist.type" :value="getemplist.type" :placeholder="$t('Repository.type2')" class="filter-item" clearable>
<el-option
v-for="(item, index) in types"
:key="index"
:value="item.id"
:label="item.categoryName"
/>
</el-select>
<el-select v-model="getemplist.iseffective" :value="getemplist.iseffective" :placeholder="$t('Repository.iseffective')" class="filter-item" clearable>
<el-option label="启用" value="1"/>
<el-option label="停用" value="2"/>
</el-select>
<el-cascader
:options="regions"
:props="props"
v-model="getemplistregions"
:show-all-levels="false"
placeholder="请选择区域"
change-on-select
filterable
clearable
class="filter-item"
/>
<el-select v-model="getemplist.countyrId" placeholder="请选择国家" class="filter-item" clearable>
<el-option
v-for="(item, index) in nations"
:key="index"
:label="item.name"
:value="item.id"/>
</el-select>
<!-- 搜索按钮 -->
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search" style="width: 86px" @click="handleFilter">{{ $t('public.search') }}</el-button>
<!-- 新建操作 -->
<el-button v-waves class="filter-item" icon="el-icon-plus" type="success" style="width: 86px;" @click="handleAdd">{{ $t('public.add') }}</el-button>
</div>
<!-- 列表开始 -->
<el-table
v-loading="listLoading"
:key="tableKey"
:data="list"
border
fit
highlight-current-row
style="width: 100%;"
@current-change="handleCurrentChange">
<el-table-column :label="$t('Repository.id')" :resizable="false" prop="id" align="center" width="100">
<template slot-scope="scope">
<span>{{ scope.row.id }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('Repository.repositoryname')" :resizable="false" prop="repositoryName" align="center" width="200">
<template slot-scope="scope">
<span>{{ scope.row.repositoryName }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('Repository.type2')" :resizable="false" prop="categoryName" align="center" width="230">
<template slot-scope="scope">
<span>{{ scope.row.categoryName }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('Repository.iseffective')" :resizable="false" prop="stat" align="center" width="230">
<template slot-scope="scope">
<span>{{ scope.row.stat | iseffectiveFilter }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('Repository.managerPeople')" :resizable="false" align="center" width="200">
<template slot-scope="scope">
<span>{{ scope.row.managerName }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('Repository.regionId')" :resizable="false" prop="regionName" align="center" width="250">
<template slot-scope="scope">
<span>{{ scope.row.regionName }}</span>
</template>
</el-table-column>
</el-table>
<!-- 列表结束 -->
<el-button v-waves class="filter-item" type="success" style="width: 100px;float: left;margin-top: 10px" @click="handleConfirm">确认添加</el-button>
<pagination v-show="total>0" :total="total" :page.sync="getemplist.pagenum" :limit.sync="getemplist.pagesize" @pagination="getlist" />
</el-dialog>
</template>
<script>
import { regionlist, getcountrylist } from '@/api/public'
import { searchRepCategory, searchRepository2 } from '@/api/Repository'
import waves from '@/directive/waves' // Waves directive
import Pagination from '@/components/Pagination' // Secondary package based on el-pagination
export default {
directives: { waves },
components: { Pagination },
filters: {
iseffectiveFilter(status) {
const statusMap = {
1: '启用',
2: '停用'
}
return statusMap[status]
},
genderFilter(status) {
const statusMap = {
1: '男',
2: '女'
}
return statusMap[status]
}
},
props: {
repositorycontrol: {
type: Boolean,
default: false
}
},
data() {
return {
//
repositoryVisible: this.repositorycontrol,
//
choosedata: '',
//
types: [],
//
nations: [],
//
downloadLoading: false,
//
list: [],
//
total: 0,
//
tableKey: 0,
//
listLoading: true,
//
getemplist: {
repositoryName: '',
type: '',
iseffective: '',
regionId: '',
countyrId: '',
id: '',
stat: 1,
loginRepositoryId: this.$store.getters.repositoryId,
regionIds: this.$store.getters.regionId,
pagenum: 1,
pagesize: 10
},
//
depts: [],
//
props: {
value: 'id',
label: 'regionName',
children: 'regionListVos'
},
//
regions: [],
getemplistregions: [],
getemplistregions0: []
}
},
watch: {
repositorycontrol() {
this.repositoryVisible = this.repositorycontrol
this.getlist()
}
},
methods: {
getlist() {
//
getcountrylist().then(res => {
if (res.data.ret === 200) {
this.nations = res.data.data.content
}
})
//
this.listLoading = true
searchRepository2(this.getemplist).then(res => {
if (res.data.ret === 200) {
this.list = res.data.data.content.list
this.total = res.data.data.content.totalCount
}
setTimeout(() => {
this.listLoading = false
}, 0.5 * 100)
})
//
searchRepCategory().then(res => {
if (res.data.ret === 200) {
console.log(res)
this.types = res.data.data.content.list
}
})
//
regionlist().then(res => {
if (res.data.ret === 200) {
this.regions = this.tranKTree(res.data.data.content)
}
})
},
//
handleFilter() {
this.getemplist.pagenum = 1
this.getemplist.regionId = this.getemplistregions[this.getemplistregions.length - 1]
console.log(this.getemplist)
searchRepository2(this.getemplist).then(res => {
if (res.data.ret === 200) {
this.list = res.data.data.content.list
this.total = res.data.data.content.totalCount
this.repositoryVisible = true
}
})
},
//
handleAdd() {
this.$router.push('/Repository/NewRepository')
this.repositoryVisible = false
},
//
tranKTree(arr) {
if (!arr || !arr.length) return
return arr.map(item => ({
id: item.id,
regionName: item.regionName,
regionListVos: this.tranKTree(item.regionListVos)
}))
},
//
handleConfirm() {
this.$emit('repositoryname', this.choosedata)
this.repositoryVisible = false
},
//
handleCurrentChange(val) {
this.choosedata = val
}
}
}
</script>
<style scoped>
.ERP-container {
margin: 50px 30px;
}
.filter-item{
width: 140px;
margin-left: 20px;
}
.form-name{
font-size: 18px;
color: #373e4f;
margin-bottom: -20px;
margin-top: 30px;
}
.container{
margin-top: 2%;
border: 1px solid #eceff6;
}
</style>

View file

@ -0,0 +1,264 @@
<template>
<el-dialog :visible.sync="repositoryVisible" :repositorycontrol2="repositorycontrol2" :close-on-press-escape="false" top="10px" title="选择仓库" append-to-body @close="$emit('update:repositorycontrol2', false)">
<div class="filter-container">
<!-- 搜索条件栏目 -->
<el-input v-model="getemplist.id" :placeholder="$t('Repository.id')" class="filter-item" clearable @keyup.enter.native="handleFilter"/>
<el-input v-model="getemplist.repositoryName" :placeholder="$t('Repository.repositoryname')" class="filter-item" clearable @keyup.enter.native="handleFilter"/>
<el-select v-model="getemplist.type" :value="getemplist.type" :placeholder="$t('Repository.type2')" class="filter-item" clearable>
<el-option
v-for="(item, index) in types"
:key="index"
:value="item.id"
:label="item.categoryName"
/>
</el-select>
<el-select v-model="getemplist.iseffective" :value="getemplist.iseffective" :placeholder="$t('Repository.iseffective')" class="filter-item" clearable>
<el-option label="启用" value="1"/>
<el-option label="停用" value="2"/>
</el-select>
<el-cascader
:options="regions"
:props="props"
v-model="getemplistregions"
:show-all-levels="false"
placeholder="请选择区域"
change-on-select
filterable
clearable
class="filter-item"
/>
<el-select v-model="getemplist.countyrId" placeholder="请选择国家" class="filter-item" clearable>
<el-option
v-for="(item, index) in nations"
:key="index"
:label="item.name"
:value="item.id"/>
</el-select>
<!-- 搜索按钮 -->
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search" style="width: 86px" @click="handleFilter">{{ $t('public.search') }}</el-button>
<!-- 新建操作 -->
<el-button v-waves class="filter-item" icon="el-icon-plus" type="success" style="width: 86px;" @click="handleAdd">{{ $t('public.add') }}</el-button>
</div>
<!-- 列表开始 -->
<el-table
v-loading="listLoading"
:key="tableKey"
:data="list"
border
fit
highlight-current-row
style="width: 100%;"
@current-change="handleCurrentChange">
<el-table-column :label="$t('Repository.id')" :resizable="false" prop="id" align="center" width="100">
<template slot-scope="scope">
<span>{{ scope.row.id }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('Repository.repositoryname')" :resizable="false" prop="repositoryName" align="center" width="200">
<template slot-scope="scope">
<span>{{ scope.row.repositoryName }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('Repository.type2')" :resizable="false" prop="categoryName" align="center" width="230">
<template slot-scope="scope">
<span>{{ scope.row.categoryName }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('Repository.iseffective')" :resizable="false" prop="stat" align="center" width="230">
<template slot-scope="scope">
<span>{{ scope.row.stat | iseffectiveFilter }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('Repository.managerPeople')" :resizable="false" align="center" width="200">
<template slot-scope="scope">
<span>{{ scope.row.managerName }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('Repository.regionId')" :resizable="false" prop="regionName" align="center" width="250">
<template slot-scope="scope">
<span>{{ scope.row.regionName }}</span>
</template>
</el-table-column>
</el-table>
<!-- 列表结束 -->
<el-button v-waves class="filter-item" type="success" style="width: 100px;float: left;margin-top: 10px" @click="handleConfirm">确认添加</el-button>
<pagination v-show="total>0" :total="total" :page.sync="getemplist.pagenum" :limit.sync="getemplist.pagesize" @pagination="getlist" />
</el-dialog>
</template>
<script>
import { regionlist, getcountrylist } from '@/api/public'
import { searchRepCategory, searchRepository2 } from '@/api/Repository'
import waves from '@/directive/waves' // Waves directive
import Pagination from '@/components/Pagination' // Secondary package based on el-pagination
export default {
directives: { waves },
components: { Pagination },
filters: {
iseffectiveFilter(status) {
const statusMap = {
1: '启用',
2: '停用'
}
return statusMap[status]
},
genderFilter(status) {
const statusMap = {
1: '男',
2: '女'
}
return statusMap[status]
}
},
props: {
repositorycontrol2: {
type: Boolean,
default: false
}
},
data() {
return {
//
repositoryVisible: this.repositorycontrol2,
//
choosedata: '',
//
types: [],
//
nations: [],
//
downloadLoading: false,
//
list: [],
//
total: 0,
//
tableKey: 0,
//
listLoading: true,
//
getemplist: {
repositoryName: '',
type: '',
iseffective: '',
regionId: '',
countyrId: '',
id: '',
stat: 1,
loginRepositoryId: this.$store.getters.repositoryId,
regionIds: this.$store.getters.regionId,
pagenum: 1,
pagesize: 10
},
//
depts: [],
//
props: {
value: 'id',
label: 'regionName',
children: 'regionListVos'
},
//
regions: [],
getemplistregions: [],
getemplistregions0: []
}
},
watch: {
repositorycontrol2() {
this.repositoryVisible = this.repositorycontrol
this.getlist()
}
},
methods: {
getlist() {
//
getcountrylist().then(res => {
if (res.data.ret === 200) {
this.nations = res.data.data.content
}
})
//
this.listLoading = true
searchRepository2(this.getemplist).then(res => {
if (res.data.ret === 200) {
this.list = res.data.data.content.list
this.total = res.data.data.content.totalCount
}
setTimeout(() => {
this.listLoading = false
}, 0.5 * 100)
})
//
searchRepCategory().then(res => {
if (res.data.ret === 200) {
console.log(res)
this.types = res.data.data.content.list
}
})
//
regionlist().then(res => {
if (res.data.ret === 200) {
this.regions = this.tranKTree(res.data.data.content)
}
})
},
//
handleFilter() {
this.getemplist.pagenum = 1
this.getemplist.regionId = this.getemplistregions[this.getemplistregions.length - 1]
console.log(this.getemplist)
searchRepository2(this.getemplist).then(res => {
if (res.data.ret === 200) {
this.list = res.data.data.content.list
this.total = res.data.data.content.totalCount
this.repositoryVisible = true
}
})
},
//
handleAdd() {
this.$router.push('/Repository/NewRepository')
this.repositoryVisible = false
},
//
tranKTree(arr) {
if (!arr || !arr.length) return
return arr.map(item => ({
id: item.id,
regionName: item.regionName,
regionListVos: this.tranKTree(item.regionListVos)
}))
},
//
handleConfirm() {
this.$emit('repositoryname2', this.choosedata)
this.repositoryVisible = false
},
//
handleCurrentChange(val) {
this.choosedata = val
}
}
}
</script>
<style scoped>
.ERP-container {
margin: 50px 30px;
}
.filter-item{
width: 140px;
margin-left: 20px;
}
.form-name{
font-size: 18px;
color: #373e4f;
margin-bottom: -20px;
margin-top: 30px;
}
.container{
margin-top: 2%;
border: 1px solid #eceff6;
}
</style>

View file

@ -0,0 +1,264 @@
<template>
<el-dialog :visible.sync="repositoryVisible" :repositorycontrol3="repositorycontrol3" :close-on-press-escape="false" top="10px" title="选择仓库" append-to-body @close="$emit('update:repositorycontrol3', false)">
<div class="filter-container">
<!-- 搜索条件栏目 -->
<el-input v-model="getemplist.id" :placeholder="$t('Repository.id')" class="filter-item" clearable @keyup.enter.native="handleFilter"/>
<el-input v-model="getemplist.repositoryName" :placeholder="$t('Repository.repositoryname')" class="filter-item" clearable @keyup.enter.native="handleFilter"/>
<el-select v-model="getemplist.type" :value="getemplist.type" :placeholder="$t('Repository.type2')" class="filter-item" clearable>
<el-option
v-for="(item, index) in types"
:key="index"
:value="item.id"
:label="item.categoryName"
/>
</el-select>
<el-select v-model="getemplist.iseffective" :value="getemplist.iseffective" :placeholder="$t('Repository.iseffective')" class="filter-item" clearable>
<el-option label="启用" value="1"/>
<el-option label="停用" value="2"/>
</el-select>
<el-cascader
:options="regions"
:props="props"
v-model="getemplistregions"
:show-all-levels="false"
placeholder="请选择区域"
change-on-select
filterable
clearable
class="filter-item"
/>
<el-select v-model="getemplist.countyrId" placeholder="请选择国家" class="filter-item" clearable>
<el-option
v-for="(item, index) in nations"
:key="index"
:label="item.name"
:value="item.id"/>
</el-select>
<!-- 搜索按钮 -->
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search" style="width: 86px" @click="handleFilter">{{ $t('public.search') }}</el-button>
<!-- 新建操作 -->
<el-button v-waves class="filter-item" icon="el-icon-plus" type="success" style="width: 86px;" @click="handleAdd">{{ $t('public.add') }}</el-button>
</div>
<!-- 列表开始 -->
<el-table
v-loading="listLoading"
:key="tableKey"
:data="list"
border
fit
highlight-current-row
style="width: 100%;"
@current-change="handleCurrentChange">
<el-table-column :label="$t('Repository.id')" :resizable="false" prop="id" align="center" width="100">
<template slot-scope="scope">
<span>{{ scope.row.id }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('Repository.repositoryname')" :resizable="false" prop="repositoryName" align="center" width="200">
<template slot-scope="scope">
<span>{{ scope.row.repositoryName }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('Repository.type2')" :resizable="false" prop="categoryName" align="center" width="230">
<template slot-scope="scope">
<span>{{ scope.row.categoryName }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('Repository.iseffective')" :resizable="false" prop="stat" align="center" width="230">
<template slot-scope="scope">
<span>{{ scope.row.stat | iseffectiveFilter }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('Repository.managerPeople')" :resizable="false" align="center" width="200">
<template slot-scope="scope">
<span>{{ scope.row.managerName }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('Repository.regionId')" :resizable="false" prop="regionName" align="center" width="250">
<template slot-scope="scope">
<span>{{ scope.row.regionName }}</span>
</template>
</el-table-column>
</el-table>
<!-- 列表结束 -->
<el-button v-waves class="filter-item" type="success" style="width: 100px;float: left;margin-top: 10px" @click="handleConfirm">确认添加</el-button>
<pagination v-show="total>0" :total="total" :page.sync="getemplist.pagenum" :limit.sync="getemplist.pagesize" @pagination="getlist" />
</el-dialog>
</template>
<script>
import { regionlist, getcountrylist } from '@/api/public'
import { searchRepCategory, searchRepository2 } from '@/api/Repository'
import waves from '@/directive/waves' // Waves directive
import Pagination from '@/components/Pagination' // Secondary package based on el-pagination
export default {
directives: { waves },
components: { Pagination },
filters: {
iseffectiveFilter(status) {
const statusMap = {
1: '启用',
2: '停用'
}
return statusMap[status]
},
genderFilter(status) {
const statusMap = {
1: '男',
2: '女'
}
return statusMap[status]
}
},
props: {
repositorycontrol3: {
type: Boolean,
default: false
}
},
data() {
return {
//
repositoryVisible: this.repositorycontrol3,
//
choosedata: '',
//
types: [],
//
nations: [],
//
downloadLoading: false,
//
list: [],
//
total: 0,
//
tableKey: 0,
//
listLoading: true,
//
getemplist: {
repositoryName: '',
type: '',
iseffective: '',
regionId: '',
countyrId: '',
id: '',
stat: 1,
loginRepositoryId: this.$store.getters.repositoryId,
regionIds: this.$store.getters.regionId,
pagenum: 1,
pagesize: 10
},
//
depts: [],
//
props: {
value: 'id',
label: 'regionName',
children: 'regionListVos'
},
//
regions: [],
getemplistregions: [],
getemplistregions0: []
}
},
watch: {
repositorycontrol3() {
this.repositoryVisible = this.repositorycontrol
this.getlist()
}
},
methods: {
getlist() {
//
getcountrylist().then(res => {
if (res.data.ret === 200) {
this.nations = res.data.data.content
}
})
//
this.listLoading = true
searchRepository2(this.getemplist).then(res => {
if (res.data.ret === 200) {
this.list = res.data.data.content.list
this.total = res.data.data.content.totalCount
}
setTimeout(() => {
this.listLoading = false
}, 0.5 * 100)
})
//
searchRepCategory().then(res => {
if (res.data.ret === 200) {
console.log(res)
this.types = res.data.data.content.list
}
})
//
regionlist().then(res => {
if (res.data.ret === 200) {
this.regions = this.tranKTree(res.data.data.content)
}
})
},
//
handleFilter() {
this.getemplist.pagenum = 1
this.getemplist.regionId = this.getemplistregions[this.getemplistregions.length - 1]
console.log(this.getemplist)
searchRepository2(this.getemplist).then(res => {
if (res.data.ret === 200) {
this.list = res.data.data.content.list
this.total = res.data.data.content.totalCount
this.repositoryVisible = true
}
})
},
//
handleAdd() {
this.$router.push('/Repository/NewRepository')
this.repositoryVisible = false
},
//
tranKTree(arr) {
if (!arr || !arr.length) return
return arr.map(item => ({
id: item.id,
regionName: item.regionName,
regionListVos: this.tranKTree(item.regionListVos)
}))
},
//
handleConfirm() {
this.$emit('repositoryname3', this.choosedata)
this.repositoryVisible = false
},
//
handleCurrentChange(val) {
this.choosedata = val
}
}
}
</script>
<style scoped>
.ERP-container {
margin: 50px 30px;
}
.filter-item{
width: 140px;
margin-left: 20px;
}
.form-name{
font-size: 18px;
color: #373e4f;
margin-bottom: -20px;
margin-top: 30px;
}
.container{
margin-top: 2%;
border: 1px solid #eceff6;
}
</style>

View file

@ -0,0 +1,264 @@
<template>
<el-dialog :visible.sync="repositoryVisible" :repositorycontrol4="repositorycontrol4" :close-on-press-escape="false" top="10px" title="选择仓库" append-to-body @close="$emit('update:repositorycontrol4', false)">
<div class="filter-container">
<!-- 搜索条件栏目 -->
<el-input v-model="getemplist.id" :placeholder="$t('Repository.id')" class="filter-item" clearable @keyup.enter.native="handleFilter"/>
<el-input v-model="getemplist.repositoryName" :placeholder="$t('Repository.repositoryname')" class="filter-item" clearable @keyup.enter.native="handleFilter"/>
<el-select v-model="getemplist.type" :value="getemplist.type" :placeholder="$t('Repository.type2')" class="filter-item" clearable>
<el-option
v-for="(item, index) in types"
:key="index"
:value="item.id"
:label="item.categoryName"
/>
</el-select>
<el-select v-model="getemplist.iseffective" :value="getemplist.iseffective" :placeholder="$t('Repository.iseffective')" class="filter-item" clearable>
<el-option label="启用" value="1"/>
<el-option label="停用" value="2"/>
</el-select>
<el-cascader
:options="regions"
:props="props"
v-model="getemplistregions"
:show-all-levels="false"
placeholder="请选择区域"
change-on-select
filterable
clearable
class="filter-item"
/>
<el-select v-model="getemplist.countyrId" placeholder="请选择国家" class="filter-item" clearable>
<el-option
v-for="(item, index) in nations"
:key="index"
:label="item.name"
:value="item.id"/>
</el-select>
<!-- 搜索按钮 -->
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search" style="width: 86px" @click="handleFilter">{{ $t('public.search') }}</el-button>
<!-- 新建操作 -->
<el-button v-waves class="filter-item" icon="el-icon-plus" type="success" style="width: 86px;" @click="handleAdd">{{ $t('public.add') }}</el-button>
</div>
<!-- 列表开始 -->
<el-table
v-loading="listLoading"
:key="tableKey"
:data="list"
border
fit
highlight-current-row
style="width: 100%;"
@current-change="handleCurrentChange">
<el-table-column :label="$t('Repository.id')" :resizable="false" prop="id" align="center" width="100">
<template slot-scope="scope">
<span>{{ scope.row.id }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('Repository.repositoryname')" :resizable="false" prop="repositoryName" align="center" width="200">
<template slot-scope="scope">
<span>{{ scope.row.repositoryName }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('Repository.type2')" :resizable="false" prop="categoryName" align="center" width="230">
<template slot-scope="scope">
<span>{{ scope.row.categoryName }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('Repository.iseffective')" :resizable="false" prop="stat" align="center" width="230">
<template slot-scope="scope">
<span>{{ scope.row.stat | iseffectiveFilter }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('Repository.managerPeople')" :resizable="false" align="center" width="200">
<template slot-scope="scope">
<span>{{ scope.row.managerName }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('Repository.regionId')" :resizable="false" prop="regionName" align="center" width="250">
<template slot-scope="scope">
<span>{{ scope.row.regionName }}</span>
</template>
</el-table-column>
</el-table>
<!-- 列表结束 -->
<el-button v-waves class="filter-item" type="success" style="width: 100px;float: left;margin-top: 10px" @click="handleConfirm">确认添加</el-button>
<pagination v-show="total>0" :total="total" :page.sync="getemplist.pagenum" :limit.sync="getemplist.pagesize" @pagination="getlist" />
</el-dialog>
</template>
<script>
import { regionlist, getcountrylist } from '@/api/public'
import { searchRepCategory, searchRepository2 } from '@/api/Repository'
import waves from '@/directive/waves' // Waves directive
import Pagination from '@/components/Pagination' // Secondary package based on el-pagination
export default {
directives: { waves },
components: { Pagination },
filters: {
iseffectiveFilter(status) {
const statusMap = {
1: '启用',
2: '停用'
}
return statusMap[status]
},
genderFilter(status) {
const statusMap = {
1: '男',
2: '女'
}
return statusMap[status]
}
},
props: {
repositorycontrol4: {
type: Boolean,
default: false
}
},
data() {
return {
//
repositoryVisible: this.repositorycontrol4,
//
choosedata: '',
//
types: [],
//
nations: [],
//
downloadLoading: false,
//
list: [],
//
total: 0,
//
tableKey: 0,
//
listLoading: true,
//
getemplist: {
repositoryName: '',
type: '',
iseffective: '',
regionId: '',
countyrId: '',
id: '',
stat: 1,
loginRepositoryId: this.$store.getters.repositoryId,
regionIds: this.$store.getters.regionId,
pagenum: 1,
pagesize: 10
},
//
depts: [],
//
props: {
value: 'id',
label: 'regionName',
children: 'regionListVos'
},
//
regions: [],
getemplistregions: [],
getemplistregions0: []
}
},
watch: {
repositorycontrol4() {
this.repositoryVisible = this.repositorycontrol
this.getlist()
}
},
methods: {
getlist() {
//
getcountrylist().then(res => {
if (res.data.ret === 200) {
this.nations = res.data.data.content
}
})
//
this.listLoading = true
searchRepository2(this.getemplist).then(res => {
if (res.data.ret === 200) {
this.list = res.data.data.content.list
this.total = res.data.data.content.totalCount
}
setTimeout(() => {
this.listLoading = false
}, 0.5 * 100)
})
//
searchRepCategory().then(res => {
if (res.data.ret === 200) {
console.log(res)
this.types = res.data.data.content.list
}
})
//
regionlist().then(res => {
if (res.data.ret === 200) {
this.regions = this.tranKTree(res.data.data.content)
}
})
},
//
handleFilter() {
this.getemplist.pagenum = 1
this.getemplist.regionId = this.getemplistregions[this.getemplistregions.length - 1]
console.log(this.getemplist)
searchRepository2(this.getemplist).then(res => {
if (res.data.ret === 200) {
this.list = res.data.data.content.list
this.total = res.data.data.content.totalCount
this.repositoryVisible = true
}
})
},
//
handleAdd() {
this.$router.push('/Repository/NewRepository')
this.repositoryVisible = false
},
//
tranKTree(arr) {
if (!arr || !arr.length) return
return arr.map(item => ({
id: item.id,
regionName: item.regionName,
regionListVos: this.tranKTree(item.regionListVos)
}))
},
//
handleConfirm() {
this.$emit('repositoryname4', this.choosedata)
this.repositoryVisible = false
},
//
handleCurrentChange(val) {
this.choosedata = val
}
}
}
</script>
<style scoped>
.ERP-container {
margin: 50px 30px;
}
.filter-item{
width: 140px;
margin-left: 20px;
}
.form-name{
font-size: 18px;
color: #373e4f;
margin-bottom: -20px;
margin-top: 30px;
}
.container{
margin-top: 2%;
border: 1px solid #eceff6;
}
</style>

View file

@ -0,0 +1,329 @@
<template>
<el-dialog :visible.sync="employeeVisible" :requirecontrol="requirecontrol" :close-on-press-escape="false" top="10px" title="选择采购需求单" append-to-body width="1100px" @close="$emit('update:requirecontrol', false)">
<el-card class="box-card" style="margin-top: 15px;height: 60px;padding-left:0 " shadow="never">
<el-row>
<el-form ref="getemplist" :model="getemplist" style="margin-top: -9px">
<el-col :span="4">
<el-form-item>
<el-input v-model="categoryId" :placeholder="$t('StockRequire.categoryId')" class="filter-item" clearable @keyup.enter.native="handleFilter" @focus="treechoose"/>
<my-tree :treecontrol.sync="treecontrol" @tree="tree"/>
</el-form-item>
</el-col>
<el-col :span="3" style="margin-left: 5px">
<el-form-item>
<el-input v-model="getemplist.productName" placeholder="物料名称" class="filter-item" clearable @keyup.enter.native="handleFilter" @focus="handleAddproduct"/>
<my-detail :control.sync="control" @productdata="productdata"/>
</el-form-item>
</el-col>
<el-col :span="3" style="margin-left: 20px">
<el-form-item>
<el-select v-model="getemplist.isPlan" :value="getemplist.isPlan" class="filter-item" placeholder="是否已生成采购计划" clearable>
<el-option value="1" label="是"/>
<el-option value="2" label="否"/>
</el-select>
</el-form-item>
</el-col>
<!--更多搜索条件-->
<el-col :span="3" style="margin-left: 30px">
<el-popover
v-model="visible2"
placement="bottom"
width="500"
trigger="click">
<el-date-picker
v-model="date"
type="daterange"
range-separator="-"
unlink-panels
start-placeholder="需求日期开始"
end-placeholder="需求日期结束"
value-format="yyyy-MM-dd"
style="margin-top: 20px;margin-left: 20px"/>
<div class="seachbutton" style="width: 100%;float: right;margin-top: 20px">
<el-button v-waves class="filter-item" type="primary" style="float: right" round @click="handleFilter">{{ $t('public.search') }}</el-button>
</div>
<el-button v-waves slot="reference" type="primary" class="filter-item" style="width: 130px" @click="visible2 = !visible2">{{ $t('public.filter') }}<svg-icon icon-class="shaixuan" style="margin-left: 4px"/></el-button>
</el-popover>
</el-col>
<el-col :span="3" style="margin-left: 20px">
<!-- 搜索按钮 -->
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search" style="width: 86px" round @click="handleFilter">{{ $t('public.search') }}</el-button>
</el-col>
</el-form>
</el-row>
</el-card>
<el-card class="box-card" style="margin-top: 15px" shadow="never">
<!-- 列表开始 -->
<el-table
v-loading="listLoading"
:key="tableKey"
:data="list"
border
fit
highlight-current-row
style="width: 100%;"
@selection-change="handleSelectionChange">
<el-table-column
type="selection"
width="55"
align="center"/>
<el-table-column :label="$t('public.id')" :resizable="false" align="center" min-width="150">
<template slot-scope="scope">
<span>{{ scope.row.materialsRequireNumber }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('StockRequire.productName')" :resizable="false" align="center" min-width="150">
<template slot-scope="scope">
<span>{{ scope.row.productName }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('StockRequire.productCode')" :resizable="false" align="center" min-width="150">
<template slot-scope="scope">
<span>{{ scope.row.productCode }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('StockRequire.categoryId')" :resizable="false" align="center" min-width="150">
<template slot-scope="scope">
<span>{{ scope.row.productCategory }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('StockRequire.productType')" :resizable="false" align="center" min-width="150">
<template slot-scope="scope">
<span>{{ scope.row.productType }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('StockRequire.color')" :resizable="false" align="center" min-width="150">
<template slot-scope="scope">
<span>{{ scope.row.color }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('StockRequire.unit')" :resizable="false" align="center" min-width="150">
<template slot-scope="scope">
<span>{{ scope.row.unit }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('StockRequire.requireQuantity')" :resizable="false" align="center" min-width="150">
<template slot-scope="scope">
<span>{{ scope.row.requireQuantity }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('StockRequire.inventoryQuantity')" :resizable="false" align="center" min-width="150">
<template slot-scope="scope">
<span>{{ scope.row.inventoryQuantity }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('StockRequire.shouldStockQuantity')" :resizable="false" align="center" min-width="150">
<template slot-scope="scope">
<span>{{ scope.row.shouldStockQuantity }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('StockRequire.stockAdvanceday')" :resizable="false" align="center" min-width="150">
<template slot-scope="scope">
<span>{{ scope.row.stockAdvanceday }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('StockRequire.requireDate')" :resizable="false" align="center" min-width="150">
<template slot-scope="scope">
<span>{{ scope.row.requireDate }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('StockRequire.isPlan')" :resizable="false" align="center" min-width="150">
<template slot-scope="scope">
<span>{{ scope.row.isPlaned | isPlanedFilter }}</span>
</template>
</el-table-column>
</el-table>
<!-- 列表结束 -->
<pagination v-show="total>0" :total="total" :page.sync="getemplist.pageNum" :limit.sync="getemplist.pageSize" @pagination="getlist" />
<!--修改开始=================================================-->
<el-button v-waves class="filter-item" type="success" style="width: 100px;float: left;margin-bottom: 10px" @click="handleConfirm">确认添加</el-button>
</el-card>
</el-dialog>
</template>
<script>
import { stockrequirelist } from '@/api/StockRequire'
import waves from '@/directive/waves' // Waves directive
import Pagination from '@/components/Pagination'
import MyTree from '../../Product/components/MyTree'
import MyDetail from '../../StockRequire/components/MyDetail'
export default {
directives: { waves },
components: { MyDetail, MyTree, Pagination },
filters: {
isPlanedFilter(status) {
const statusMap = {
1: '是',
2: '否'
}
return statusMap[status]
}
},
props: {
requirecontrol: {
type: Boolean,
default: false
}
},
data() {
return {
//
employeeVisible: this.requirecontrol,
//
choosedata: '',
//
control: false,
//
categoryId: '',
//
treecontrol: false,
//
detailvisible: false,
//
visible2: false,
//
moreaction: '',
//
downloadLoading: false,
//
list: [],
//
total: 0,
//
tableKey: 0,
//
listLoading: true,
//
getemplist: {
pageNum: 1,
pageSize: 10,
repositoryId: this.$store.getters.repositoryId,
regionIds: this.$store.getters.regionId,
isActive: 1
},
//
personalForm: {},
//
editVisible: false,
//
date: []
}
},
watch: {
requirecontrol() {
this.employeeVisible = this.requirecontrol
this.getlist()
}
},
methods: {
// focus
handleAddproduct() {
this.control = true
},
//
productdata(val) {
this.getemplist.productName = val.productName
},
// focus
treechoose() {
this.treecontrol = true
},
//
tree(val) {
this.categoryId = val.categoryName
this.getemplist.categoryId = val.id
},
getlist() {
//
this.listLoading = true
stockrequirelist(this.getemplist).then(res => {
if (res.data.ret === 200) {
this.list = res.data.data.content.list
this.total = res.data.data.content.totalCount
}
setTimeout(() => {
this.listLoading = false
}, 0.5 * 100)
})
},
//
restFilter() {
this.handlePersonId = ''
this.getemplist.handlePersonId = ''
this.workCenterId = ''
this.getemplist.workCenterId = ''
this.producePlanNumber = ''
this.getemplist.producePlanNumber = ''
},
//
handleFilter() {
this.getemplist.pageNum = 1
if (this.date === null || this.date === '') {
this.getemplist.beginTime = null
this.getemplist.endTime = null
} else {
this.getemplist.beginTime = this.date[0]
this.getemplist.endTime = this.date[1]
}
stockrequirelist(this.getemplist).then(res => {
if (res.data.ret === 200) {
this.list = res.data.data.content.list
this.total = res.data.data.content.totalCount
this.restFilter()
} else {
this.restFilter()
}
})
},
//
handleSelectionChange(val) {
this.choosedata = val
},
//
handleConfirm() {
this.employeeVisible = false
console.log(this.choosedata)
const requiredata = this.choosedata
const requireDetail = requiredata.map(function(item) {
return {
productCode: item.productCode,
productName: item.productName,
productType: item.productType,
typeId: item.typeId,
unit: item.unit,
color: item.color,
basicQuantity: item.requireQuantity,
planDeliveryDate: item.requireDate,
applyReason: '',
sourceNumber: item.materialsRequireNumber,
supplierId: '',
supplierName: '',
basicPrice: ''
}
})
this.$emit('require', requireDetail)
this.$emit('require2', requireDetail)
}
//
}
}
</script>
<style scoped>
.ERP-container {
margin: 50px 30px;
}
.filter-item{
width: 140px;
}
.form-name{
font-size: 18px;
color: #373e4f;
margin-bottom: -20px;
margin-top: 30px;
}
.container{
margin-top: 2%;
border: 1px solid #eceff6;
}
</style>

View file

@ -0,0 +1,291 @@
<template>
<el-dialog :visible.sync="employeeVisible" :control="control" :close-on-press-escape="false" top="10px" title="选择供应商" append-to-body @close="$emit('update:control', false)">
<div class="filter-container">
<!-- 搜索条件栏目 -->
<el-input v-model="getemplist.id" :placeholder="$t('Supplier.id')" class="filter-item" clearable @keyup.enter.native="handleFilter"/>
<el-input v-model="getemplist.supplierName" :placeholder="$t('Supplier.supplierName')" class="filter-item" clearable @keyup.enter.native="handleFilter"/>
<el-select v-model="getemplist.typeId" :value="getemplist.typeId" placeholder="请选择供应商" class="filter-item" clearable>
<el-option
v-for="(item, index) in typeIds"
:key="index"
:label="item.categoryName"
:value="item.id"
/>
</el-select>
<!-- 更多搜索条件下拉栏 -->
<el-popover
v-model="visible2"
placement="bottom"
width="500"
trigger="click">
<el-cascader
:options="regions"
:props="props"
v-model="getemplistregions"
:show-all-levels="false"
placeholder="所在区域"
change-on-select
filterable
clearable
style="width: 40%;float: left;margin-left: 20px"
@change="handlechange4"
/>
<el-select v-model="getemplist.levelId" placeholder="请选择优质级别" clearable style="width: 40%;float: right;margin-right: 20px">
<el-option
v-for="(item, index) in levelIds"
:key="index"
:label="item.categoryName"
:value="item.id"
/>
</el-select>
<div class="seachbutton" style="width: 100%;float: right;margin-top: 20px">
<el-button v-waves class="filter-item" type="primary" style="float: right" @click="handleFilter">{{ $t('public.search') }}</el-button>
</div>
<el-button v-waves slot="reference" type="primary" class="filter-item" style="width: 130px" @click="visible2 = !visible2">{{ $t('public.filter') }}<svg-icon icon-class="shaixuan" style="margin-left: 4px"/></el-button>
</el-popover>
<!-- 搜索按钮 -->
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search" style="width: 86px" @click="handleFilter">{{ $t('public.search') }}</el-button>
<!-- 新建操作 -->
<el-button v-waves class="filter-item" icon="el-icon-plus" type="success" style="width: 86px;float: right" @click="handleAdd">{{ $t('public.add') }}</el-button>
</div>
<!-- 列表开始 -->
<el-table
v-loading="listLoading"
:key="tableKey"
:data="list"
border
fit
highlight-current-row
style="width: 100%;"
@current-change="handleCurrentChange">
<el-table-column :label="$t('Supplier.id')" :resizable="false" prop="id" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.id }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('Supplier.supplierName')" :resizable="false" prop="supplierName" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.supplierName }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('Supplier.supplierShortName')" :resizable="false" prop="supplierShortName" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.supplierShortName }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('Supplier.typeId')" :resizable="false" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.typeName }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('Supplier.regionId')" :resizable="false" prop="regionName" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.regionName }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('Supplier.buyerId')" :resizable="false" prop="buyerName" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.buyerName }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('Supplier.levelId')" :resizable="false" prop="levelName" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.levelName }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('Supplier.createId')" :resizable="false" prop="createId" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.createName }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('Supplier.createTime')" :resizable="false" prop="createTime" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.createTime }}</span>
</template>
</el-table-column>
</el-table>
<pagination v-show="total>0" :total="total" :page.sync="getemplist.pagenum" :limit.sync="getemplist.pagesize" @pagination="getlist" />
<el-button v-waves class="filter-item" type="success" @click="handleConfirm">确认添加</el-button>
</el-dialog>
</template>
<script>
import { searchRepository, regionlist } from '@/api/public'
import { searchCategory, search } from '@/api/Supplier'
import waves from '@/directive/waves' // Waves directive
import Pagination from '@/components/Pagination' // Secondary package based on el-pagination
export default {
directives: { waves },
components: { Pagination },
filters: {
genderFilter(status) {
const statusMap = {
1: '男',
2: '女'
}
return statusMap[status]
}
},
props: {
control: {
type: Boolean,
default: false
}
},
data() {
return {
//
visible2: false,
//
choosedata: '',
//
moreaction: '',
//
levelIds: [],
//
typeIds: [],
//
downloadLoading: false,
//
list: [],
//
total: 0,
//
tableKey: 0,
//
listLoading: true,
//
getemplist: {
id: '',
supplierName: '',
typeId: '',
regionId: '',
levelId: '',
pagenum: 1,
pagesize: 10
},
//
depts: [],
//
props: {
value: 'id',
label: 'regionName',
children: 'regionListVos'
},
//
regions: [],
getemplistregions: [],
//
repositories: [],
//
employeeVisible: this.control,
//
regionManagerVisible: false
}
},
watch: {
control() {
this.employeeVisible = this.control
this.getlist()
}
},
methods: {
getlist() {
//
this.listLoading = true
search(this.getemplist).then(res => {
if (res.data.ret === 200) {
this.list = res.data.data.content.list
this.total = res.data.data.content.totalCount
}
setTimeout(() => {
this.listLoading = false
}, 0.5 * 100)
})
//
searchCategory(1).then(res => {
if (res.data.ret === 200) {
this.typeIds = res.data.data.content.list
}
})
//
searchCategory(4).then(res => {
if (res.data.ret === 200) {
this.levelIds = res.data.data.content.list
}
})
//
regionlist().then(res => {
if (res.data.ret === 200) {
this.regions = this.tranKTree(res.data.data.content)
}
})
},
//
tranKTree(arr) {
if (!arr || !arr.length) return
return arr.map(item => ({
id: item.id,
regionName: item.regionName,
regionListVos: this.tranKTree(item.regionListVos)
}))
},
//
handleFilter() {
this.getemplist.pagenum = 1
this.getemplist.regionId = this.getemplistregions[this.getemplistregions.length - 1]
search(this.getemplist).then(res => {
if (res.data.ret === 200) {
this.list = res.data.data.content.list
this.total = res.data.data.content.totalCount
}
})
},
//
handleAdd() {
this.$router.push('/Supplier/NewSupplier')
},
//
handlechange4(val) {
console.log(val)
const finalid = val[val.length - 1]
searchRepository(finalid).then(res => {
if (res.data.ret === 200) {
console.log(res)
this.repositories = res.data.data.content.list
}
})
},
//
handleConfirm() {
this.employeeVisible = false
this.$emit('supplierName', this.choosedata)
},
//
handleCurrentChange(val) {
this.choosedata = val
}
//
}
}
</script>
<style scoped>
.ERP-container {
margin: 50px 30px;
}
.filter-item{
width: 140px;
margin-left: 20px;
}
.form-name{
font-size: 18px;
color: #373e4f;
margin-bottom: -20px;
margin-top: 30px;
}
.container{
margin-top: 2%;
border: 1px solid #eceff6;
}
</style>

View file

@ -0,0 +1,151 @@
<template>
<el-dialog :visible.sync="editVisible" :treecontrol="treecontrol" :close-on-press-escape="false" append-to-body top="10px" @close="$emit('update:treecontrol', false)">
<!--基本信息-->
<h2 ref="geren" class="form-name">物品分类</h2>
<el-card class="box-card">
<el-input
v-model="filterText"
placeholder="输入关键字进行过滤"
style="margin-bottom: 30px"/>
<el-tree
ref="tree2"
:data="detalist"
:props="detaillistProps"
:filter-node-method="filterNode"
class="filter-tree"
default-expand-all
@node-click="handleNodeClick"/>
</el-card>
<!--<el-button class="filter-item" type="success" style="margin-top: 10px" @click="handleConfirm">确认添加</el-button>-->
</el-dialog>
</template>
<script>
import { detaillist } from '@/api/Product'
export default {
props: {
treecontrol: {
type: Boolean,
default: false
}
},
data() {
return {
//
digui: '',
//
choosedata: '',
//
editVisible: this.treecontrol,
//
filterText: '',
//
detalist: [],
// props
detaillistProps: {
children: 'productClassfyVos',
label: 'categoryName'
}
}
},
watch: {
treecontrol() {
this.editVisible = this.treecontrol
// this.gettree()
if (this.$refs.tree2) {
console.log(this.filterText)
this.$refs.tree2.filter(this.filterText)
}
},
filterText: {
handler(o, n) {
if (this.$refs.tree2) {
console.log(o)
this.$refs.tree2.filter(o)
}
},
immediate: true
}
},
created() {
this.gettree()
},
activated() {
this.gettree()
},
methods: {
//
filterNode(value, data, node) {
console.log(value)
if (!value) return true
// return data.categoryName.indexOf(value) !== -1
const _array = []// 使
this.getReturnNode(node, _array, value)
let result = false
_array.forEach((item) => {
result = result || item
})
return result
},
getReturnNode(node, _array, value) {
const isPass = node.data && node.data.categoryName && node.data.categoryName.indexOf(value) !== -1
isPass ? _array.push(isPass) : ''
this.index++
if (!isPass && node.level !== 1 && node.parent) {
this.getReturnNode(node.parent, _array, value)
}
},
//
gettree() {
detaillist().then(res => {
if (res.data.ret === 200) {
this.detalist = res.data.data.content
}
})
},
//
handleNodeClick(data, node) {
console.log(node)
if (node.level === 1) {
this.$notify.error({
title: '错误',
message: '顶层不可选择',
offset: 100
})
return false
}
this.digui = node
this.choosedata = data
if (this.choosedata.level === 1) {
this.$notify.error({
title: '错误',
message: '顶层不可选择',
offset: 100
})
this.editVisible = true
return false
} else {
this.$emit('tree', this.choosedata)
this.$emit('finder', this.digui)
this.editVisible = false
}
this.gettree()
},
handleConfirm() {
console.log(this.choosedata)
}
// -------------------------------------------------
}
}
</script>
<style rel="stylesheet/css" scoped>
.box-card .filter-tree{
height: 200px;
overflow-y: scroll;
}
.box-card >>> .el-tree-node__content:hover {
background: #409EFF;
}
</style>

View file

@ -0,0 +1,498 @@
<template>
<div class="ERP-container">
<el-card class="box-card" style="margin-top: 10px;height: 60px" shadow="never">
<el-row>
<el-form ref="getemplist" :model="getemplist" label-width="100px" style="margin-top: -9px">
<el-col :span="4">
<el-form-item :label="$t('StockContract.supplierId')">
<el-input v-model="supplierId" style="margin-left: -34px;width: 130px" @focus="handlechoose"/>
<my-supplier :control.sync="empcontrol" @supplierName="supplierName"/>
</el-form-item>
</el-col>
<el-col :span="4" style="margin-left: 40px">
<el-form-item :label="$t('shouldPayCount.startMonth')">
<el-date-picker
ref="datesRef"
v-model="data1"
:editable = "false"
type="month"
format="yyyy-MM"
value-format="yyyy-MM"
style="margin-left: -34px;"
placeholder="选择月"/>
</el-form-item>
</el-col>
<el-col :span="4" style="margin-left: 140px">
<el-form-item :label="$t('shouldPayCount.endMonth')">
<el-date-picker
ref="datesRef"
v-model="data2"
:editable = "false"
type="month"
format="yyyy-MM"
style="margin-left: -34px;"
value-format="yyyy-MM"
placeholder="选择月"/>
</el-form-item>
</el-col>
<el-col :span="4" style="margin-left: 160px">
<!-- 搜索按钮 -->
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search" style="width: 86px" round @click="handleFilter">{{ $t('public.search') }}</el-button>
</el-col>
</el-form>
</el-row>
</el-card>
<el-card class="box-card" style="margin-top: 10px" shadow="never">
<!-- 列表开始 -->
<el-table
:data="list"
border
style="width: 100%">
<el-table-column
:label="$t('stockDetailCount.productCode')"
prop="productCode"
width="200"
align="center"/>
<el-table-column
:label="$t('stockDetailCount.productName')"
prop="productName"
width="200"
align="center"/>
<el-table-column
:label="$t('stockDetailCount.productType')"
prop="productType"
width="200"
align="center"/>
<el-table-column
:label="$t('stockDetailCount.unit')"
prop="unit"
width="200"
align="center"/>
<el-table-column :label="$t('stockOrderCount.order')" align="center">
<el-table-column
:label="$t('stockOrderCount.orderQuantity')"
prop="orderQuantity"
width="200"
align="center"/>
<el-table-column
:label="$t('stockOrderCount.totalMoney')"
prop="totalMoney"
width="200"
align="center"/>
<el-table-column
:label="$t('stockOrderCount.taxMoney')"
prop="taxMoney"
width="200"
align="center"/>
<el-table-column
:label="$t('stockOrderCount.heji')"
prop="heji"
width="200"
align="center"/>
</el-table-column>
<el-table-column
:label="$t('stockOrderCount.arrivedQuantity')"
prop="arrivedQuantity"
width="200"
align="center"/>
<el-table-column
:label="$t('stockOrderCount.notArrivedQuantity')"
prop="notArrivedQuantity"
width="200"
align="center"/>
</el-table>
<!-- 列表结束 -->
<pagination v-show="total>0" :total="total" :page.sync="getemplist.pageNum" :limit.sync="getemplist.pageSize" @pagination="getlist" />
</el-card>
</div>
</template>
<script>
import { shouldPayCount } from '@/api/count'
import MyRepository from './components/MyRepository'
import waves from '@/directive/waves' // Waves directive
import Pagination from '@/components/Pagination'
import permission from '@/directive/permission/index.js' //
import permission2 from '@/directive/permission2/index.js' //
import checkPermission from '@/utils/permission' //
import MyEmp from './components/MyEmp'
import DetailList from './components/DetailList'
import MyDialog from './components/MyDialog'
import MyCustomer from './components/MyCustomer'
import MyAgent from './components/MyAgent'
import MySupplier from './components/MySupplier'
export default {
name: 'StockDetailCount',
directives: { waves, permission, permission2 },
components: { MyDialog, DetailList, MyEmp, MyCustomer, MySupplier, MyAgent, MyRepository, Pagination },
filters: {
judgeStatFilter(status) {
const statusMap = {
0: '未审核',
1: '审核中',
2: '审核通过',
3: '审核不通过'
}
return statusMap[status]
},
receiptStatFilter(status) {
const statusMap = {
1: '制单',
2: '执行',
3: '结单'
}
return statusMap[status]
},
stockTypeFilter(status) {
const statusMap = {
1: '采购1'
}
return statusMap[status]
},
sendTypeFilter(status) {
const statusMap = {
1: '未发货',
2: '发货中',
3: '已发货'
}
return statusMap[status]
}
},
data() {
return {
first: '',
step1: '',
step2: '',
step3: '',
step4: '',
step5: '',
step6: '',
step7: '',
step8: '',
receiptVisible: false,
//
customerName: '',
data1: '',
data2: '',
//
customercontrol: false,
agentcontrol: false,
//
typeparms: {
pagenum: 1,
pagesize: 99999
},
//
types: [],
//
depts: [],
//
reviewParms: {
id: '',
judgePersonId: '',
judgeStat: ''
},
//
detailvisible: false,
//
visible2: false,
//
supplierId: '',
//
empcontrol: false,
//
stockPersonId: '',
//
stockControl: false,
//
moreaction: '',
//
downloadLoading: false,
//
list: [],
//
total: 0,
//
tableKey: 0,
//
listLoading: true,
//
getemplist: {
pageNum: 1,
pageSize: 10,
repositoryId: this.$store.getters.repositoryId,
regionIds: this.$store.getters.regionId,
type: '1'
},
//
personalForm: {},
//
editVisible: false,
//
date: []
}
},
mounted() {
// this.getlist()
// this.changeName()
},
methods: {
supplierName(val) {
console.log(val)
this.supplierId = val.supplierName
this.getemplist.supplierId = val.id
},
changeName() {
if (this.getemplist.type === '1') {
this.first = '供应商名称'
}
if (this.getemplist.type === '2') {
this.first = '经办人名称'
}
if (this.getemplist.type === '3') {
this.first = '品牌名称'
}
if (this.getemplist.type === '4') {
this.first = '种类名称'
}
this.getlist()
},
checkPermission,
//
selectInit(row, index) {
if (row.judgeStat !== 0) {
return false
} else {
return true
}
},
//
clearCustomer() {
this.getemplist.customerId = ''
this.customerName = ''
},
// focus
chooseCustomer() {
if (this.getemplist.customerType === '1') {
this.agentcontrol = true
} else if (this.getemplist.customerType === '2') {
this.customercontrol = true
}
},
customerdata(val) {
this.getemplist.customerId = val.id
this.customerName = val.customerName
},
agentdata(val) {
this.getemplist.customerId = val.id
this.customerName = val.agentName
},
//
updatecountry() {
this.getlist()
},
getlist() {
//
this.listLoading = true
shouldPayCount(this.getemplist).then(res => {
if (res.data.ret === 200) {
this.list = res.data.data.content.list
for (let i = 0; i < this.list.length; i++) {
this.list[i].heji = this.list[i].totalMoney + this.list[i].taxMoney
}
this.total = res.data.data.content.totalCount
}
setTimeout(() => {
this.listLoading = false
}, 0.5 * 100)
})
},
//
restFilter() {
this.customerName = ''
this.getemplist.customerId = ''
this.stockPersonId = ''
this.getemplist.stockPersonId = ''
},
//
handleFilter() {
if (this.supplierId !== null && this.data1 !== null && this.data2 !== null && this.supplierId !== '' && this.data1 !== '' && this.data2 !== '') {
console.log(66666)
var result = []
var s = this.data1.split('-')
var e = this.data2.split('-')
var min = new Date()
var max = new Date()
min.setFullYear(s[0], s[1])
max.setFullYear(e[0], e[1])
console.log(e[0] + '---- ' + e[1])
var curr = min
// eslint-disable-next-line no-unmodified-loop-condition
while (curr <= max) {
var month = curr.getMonth()
// month=month==0?12:month;
console.log(month)
var str = curr.getFullYear() + '-' + (month)
var s2 = curr.getFullYear() + '-0'
if (str === s2) {
str = curr.getFullYear() + '-12'
}
result.push(str)
curr.setMonth(month + 1)
}
console.log('result', result)
this.getemplist.dateList = result
shouldPayCount(this.getemplist).then(res => {
if (res.data.ret === 200) {
this.list = res.data.data.content.list
// for (let i = 0; i < this.list.length; i++) {
// this.list[i].heji = this.list[i].totalMoney + this.list[i].taxMoney
// }
// this.total = res.data.data.content.totalCount
this.restFilter()
} else {
this.restFilter()
}
})
} else {
this.list = []
this.$notify.error({
title: '错误',
message: '搜索条件不能为空',
offset: 100
})
}
},
// focus
handlechooseStock() {
this.stockControl = true
},
//
stockName(val) {
this.stockPersonId = val.personName
this.getemplist.stockPersonId = val.id
},
// focus
handlechoose() {
this.empcontrol = true
},
//
handleEdit(row) {
console.log(row)
this.editVisible = true
this.personalForm = Object.assign({}, row)
this.personalForm.sourceType = String(row.sourceType)
if (row.currency !== null) {
this.personalForm.currency = String(row.currency)
}
if (row.customerType !== null) {
this.personalForm.customerType = String(row.customerType)
}
if (row.saleType !== null) {
this.personalForm.saleType = String(row.saleType)
}
if (row.payType !== null) {
this.personalForm.payType = String(row.payType)
}
},
//
refreshlist(val) {
if (val === true) {
this.getlist()
}
},
//
handleDetail(row) {
console.log(row)
this.detailvisible = true
this.personalForm = Object.assign({}, row)
},
//
isReview(row) {
if (row.approvalUseVos !== '' && row.approvalUseVos !== null && row.approvalUseVos !== undefined && row.approvalUseVos.length !== 0) {
const approvalUse = row.approvalUseVos
const index = approvalUse[approvalUse.length - 1].stepHandler.indexOf(',' + this.$store.getters.userId + ',')
console.log(approvalUse[approvalUse.length - 1].stepHandler)
console.log(index)
if (index > -1 && (row.judgeStat === 1 || row.judgeStat === 0)) {
return true
}
}
},
// focus
handlechooseRep() {
this.repositorycontrol = true
},
repositoryname(val) {
console.log(val)
this.enterRepositoryId = val.repositoryName
this.getemplist.enterRepositoryId = val.id
},
// focus
updatedept() {
this.getlist()
},
// foucs
handlechooseDelivery() {
this.deliverycontrol = true
},
deliveryName(val) {
this.deliveryPersonId = val.personName
this.getemplist.deliveryPersonId = val.id
},
// focus
handlechooseAccept() {
this.accetpcontrol = true
},
acceptName(val) {
this.acceptPersonId = val.personName
this.getemplist.acceptPersonId = val.id
}
}
}
</script>
<style rel="stylesheet/css" scoped>
.ERP-container >>> .el-form-item__label{
color: #909399;
text-align: left;
}
.app-container >>> .el-table .cell {
-webkit-box-sizing: border-box;
box-sizing: border-box;
line-height: 24px;
word-break: keep-all;
word-wrap: break-word;
white-space: pre-wrap;
}
.ERP-container {
margin: 0px 10px;
}
.filter-container{
padding: 20px;
padding-left: 0px;
}
.filter-item{
width: 140px;
margin-left: 0px;
}
.normal >>> .el-dialog__header {
padding: 20px 20px 10px;
background: #fff;
position: static;
top: auto;
z-index: auto;
width: auto;
border-bottom: none;
}
.normal >>> .el-dialog {
-webkit-transform: none;
transform: none;
left: 0;
position: relative;
margin: 0 auto;
height: auto;
}
</style>

View file

@ -0,0 +1,463 @@
<template>
<div class="ERP-container">
<el-card class="box-card" style="margin-top: 10px;height: 60px" shadow="never">
<el-row>
<el-form ref="getemplist" :model="getemplist" label-width="100px" style="margin-top: -9px">
<el-col :span="4">
<el-form-item label="物品名称">
<el-input v-model="getemplist.productName" class="filter-item" clearable @keyup.enter.native="handleFilter"/>
</el-form-item>
</el-col>
<el-col :span="4" style="margin-left: 80px">
<el-form-item :label="$t('StockContract.supplierId')">
<el-input v-model="supplierId" style="width: 130px" @focus="handlechoose"/>
<my-supplier :control.sync="empcontrol" @supplierName="supplierName"/>
</el-form-item>
</el-col>
<el-col :span="4" style="margin-left: 63px">
<el-date-picker
v-model="monthValue"
:editable = "false"
type="month"
placeholder="选择月"/>
</el-col>
<el-col :span="4" style="margin-left: 197px">
<!-- 搜索按钮 -->
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search" style="width: 86px" round @click="handleFilter">{{ $t('public.search') }}</el-button>
</el-col>
</el-form>
</el-row>
</el-card>
<el-card class="box-card" style="margin-top: 10px" shadow="never">
<!-- 列表开始 -->
<el-table
:data="list"
border
style="width: 100%">
<el-table-column
:label="$t('stockDetailCount.productCode')"
prop="productCode"
width="200"
align="center"/>
<el-table-column
:label="$t('stockDetailCount.productName')"
prop="productName"
width="200"
align="center"/>
<el-table-column
:label="$t('stockDetailCount.productType')"
prop="productType"
width="200"
align="center"/>
<el-table-column
:label="$t('stockDetailCount.unit')"
prop="unit"
width="200"
align="center"/>
<el-table-column :label="$t('stockOrderCount.order')" align="center">
<el-table-column
:label="$t('stockOrderCount.orderQuantity')"
prop="orderQuantity"
width="200"
align="center"/>
<el-table-column
:label="$t('stockOrderCount.totalMoney')"
prop="totalMoney"
width="200"
align="center"/>
<el-table-column
:label="$t('stockOrderCount.taxMoney')"
prop="taxMoney"
width="200"
align="center"/>
<el-table-column
:label="$t('stockOrderCount.heji')"
prop="heji"
width="200"
align="center"/>
</el-table-column>
<el-table-column
:label="$t('stockOrderCount.arrivedQuantity')"
prop="arrivedQuantity"
width="200"
align="center"/>
<el-table-column
:label="$t('stockOrderCount.notArrivedQuantity')"
prop="notArrivedQuantity"
width="200"
align="center"/>
</el-table>
<!-- 列表结束 -->
<pagination v-show="total>0" :total="total" :page.sync="getemplist.pageNum" :limit.sync="getemplist.pageSize" @pagination="getlist" />
</el-card>
</div>
</template>
<script>
import { stockDetailCount } from '@/api/count'
import { searchStockCategory } from '@/api/StockCategory'
import MyRepository from './components/MyRepository'
import waves from '@/directive/waves' // Waves directive
import Pagination from '@/components/Pagination'
import permission from '@/directive/permission/index.js' //
import permission2 from '@/directive/permission2/index.js' //
import checkPermission from '@/utils/permission' //
import MyEmp from './components/MyEmp'
import DetailList from './components/DetailList'
import MyDialog from './components/MyDialog'
import MyCustomer from './components/MyCustomer'
import MyAgent from './components/MyAgent'
import MySupplier from './components/MySupplier'
export default {
name: 'StockDetailCount',
directives: { waves, permission, permission2 },
components: { MyDialog, DetailList, MyEmp, MyCustomer, MySupplier, MyAgent, MyRepository, Pagination },
filters: {
judgeStatFilter(status) {
const statusMap = {
0: '未审核',
1: '审核中',
2: '审核通过',
3: '审核不通过'
}
return statusMap[status]
},
receiptStatFilter(status) {
const statusMap = {
1: '制单',
2: '执行',
3: '结单'
}
return statusMap[status]
},
stockTypeFilter(status) {
const statusMap = {
1: '采购1'
}
return statusMap[status]
},
sendTypeFilter(status) {
const statusMap = {
1: '未发货',
2: '发货中',
3: '已发货'
}
return statusMap[status]
}
},
data() {
return {
first: '',
step1: '',
step2: '',
step3: '',
step4: '',
step5: '',
step6: '',
step7: '',
step8: '',
receiptVisible: false,
//
customerName: '',
//
customercontrol: false,
agentcontrol: false,
//
typeparms: {
pagenum: 1,
pagesize: 99999
},
//
types: [],
//
depts: [],
//
reviewParms: {
id: '',
judgePersonId: '',
judgeStat: ''
},
//
detailvisible: false,
//
visible2: false,
//
supplierId: '',
//
empcontrol: false,
//
stockPersonId: '',
//
stockControl: false,
//
moreaction: '',
//
downloadLoading: false,
//
list: [],
//
total: 0,
//
tableKey: 0,
//
listLoading: true,
//
getemplist: {
pageNum: 1,
pageSize: 10,
repositoryId: this.$store.getters.repositoryId,
regionIds: this.$store.getters.regionId,
type: '1'
},
//
personalForm: {},
//
editVisible: false,
//
date: []
}
},
mounted() {
this.getlist()
this.changeName()
},
methods: {
supplierName(val) {
console.log(val)
this.supplierId = val.supplierName
this.getemplist.supplierId = val.id
},
changeName() {
if (this.getemplist.type === '1') {
this.first = '供应商名称'
}
if (this.getemplist.type === '2') {
this.first = '经办人名称'
}
if (this.getemplist.type === '3') {
this.first = '品牌名称'
}
if (this.getemplist.type === '4') {
this.first = '种类名称'
}
this.getlist()
},
checkPermission,
//
selectInit(row, index) {
if (row.judgeStat !== 0) {
return false
} else {
return true
}
},
//
clearCustomer() {
this.getemplist.customerId = ''
this.customerName = ''
},
// focus
chooseCustomer() {
if (this.getemplist.customerType === '1') {
this.agentcontrol = true
} else if (this.getemplist.customerType === '2') {
this.customercontrol = true
}
},
customerdata(val) {
this.getemplist.customerId = val.id
this.customerName = val.customerName
},
agentdata(val) {
this.getemplist.customerId = val.id
this.customerName = val.agentName
},
//
updatecountry() {
this.getlist()
},
getlist() {
//
this.listLoading = true
stockDetailCount(this.getemplist).then(res => {
if (res.data.ret === 200) {
this.list = res.data.data.content.list
for (let i = 0; i < this.list.length; i++) {
this.list[i].heji = this.list[i].totalMoney + this.list[i].taxMoney
}
this.total = res.data.data.content.totalCount
}
setTimeout(() => {
this.listLoading = false
}, 0.5 * 100)
})
//
searchStockCategory(this.typeparms).then(res => {
if (res.data.ret === 200) {
this.types = res.data.data.content.list
}
})
},
//
restFilter() {
this.customerName = ''
this.getemplist.customerId = ''
this.stockPersonId = ''
this.getemplist.stockPersonId = ''
},
//
handleFilter() {
this.getemplist.pageNum = 1
if (this.date === null || this.date === undefined || this.date === '') {
this.getemplist.beginTime = ''
this.getemplist.endTime = ''
} else {
this.getemplist.beginTime = this.date[0]
this.getemplist.endTime = this.date[1]
}
stockDetailCount(this.getemplist).then(res => {
if (res.data.ret === 200) {
this.list = res.data.data.content.list
for (let i = 0; i < this.list.length; i++) {
this.list[i].heji = this.list[i].totalMoney + this.list[i].taxMoney
}
this.total = res.data.data.content.totalCount
this.restFilter()
} else {
this.restFilter()
}
})
},
// focus
handlechooseStock() {
this.stockControl = true
},
//
stockName(val) {
this.stockPersonId = val.personName
this.getemplist.stockPersonId = val.id
},
// focus
handlechoose() {
this.empcontrol = true
},
//
handleEdit(row) {
console.log(row)
this.editVisible = true
this.personalForm = Object.assign({}, row)
this.personalForm.sourceType = String(row.sourceType)
if (row.currency !== null) {
this.personalForm.currency = String(row.currency)
}
if (row.customerType !== null) {
this.personalForm.customerType = String(row.customerType)
}
if (row.saleType !== null) {
this.personalForm.saleType = String(row.saleType)
}
if (row.payType !== null) {
this.personalForm.payType = String(row.payType)
}
},
//
refreshlist(val) {
if (val === true) {
this.getlist()
}
},
//
handleDetail(row) {
console.log(row)
this.detailvisible = true
this.personalForm = Object.assign({}, row)
},
//
isReview(row) {
if (row.approvalUseVos !== '' && row.approvalUseVos !== null && row.approvalUseVos !== undefined && row.approvalUseVos.length !== 0) {
const approvalUse = row.approvalUseVos
const index = approvalUse[approvalUse.length - 1].stepHandler.indexOf(',' + this.$store.getters.userId + ',')
console.log(approvalUse[approvalUse.length - 1].stepHandler)
console.log(index)
if (index > -1 && (row.judgeStat === 1 || row.judgeStat === 0)) {
return true
}
}
},
// focus
handlechooseRep() {
this.repositorycontrol = true
},
repositoryname(val) {
console.log(val)
this.enterRepositoryId = val.repositoryName
this.getemplist.enterRepositoryId = val.id
},
// focus
updatedept() {
this.getlist()
},
// foucs
handlechooseDelivery() {
this.deliverycontrol = true
},
deliveryName(val) {
this.deliveryPersonId = val.personName
this.getemplist.deliveryPersonId = val.id
},
// focus
handlechooseAccept() {
this.accetpcontrol = true
},
acceptName(val) {
this.acceptPersonId = val.personName
this.getemplist.acceptPersonId = val.id
}
}
}
</script>
<style rel="stylesheet/css" scoped>
.ERP-container >>> .el-form-item__label{
color: #909399;
text-align: left;
}
.app-container >>> .el-table .cell {
-webkit-box-sizing: border-box;
box-sizing: border-box;
line-height: 24px;
word-break: keep-all;
word-wrap: break-word;
white-space: pre-wrap;
}
.ERP-container {
margin: 0px 10px;
}
.filter-container{
padding: 20px;
padding-left: 0px;
}
.filter-item{
width: 140px;
margin-left: 0px;
}
.normal >>> .el-dialog__header {
padding: 20px 20px 10px;
background: #fff;
position: static;
top: auto;
z-index: auto;
width: auto;
border-bottom: none;
}
.normal >>> .el-dialog {
-webkit-transform: none;
transform: none;
left: 0;
position: relative;
margin: 0 auto;
height: auto;
}
</style>

Binary file not shown.