7/1日前修改

This commit is contained in:
shawnzhang 2020-07-01 11:39:38 +08:00
parent 4bbf43d3a6
commit d4afe681c0
134 changed files with 9284 additions and 2430 deletions

View file

@ -5,3 +5,7 @@ src/views/home
src/views/Repair src/views/Repair
src/views/Employee src/views/Employee
src/views/layout/components/Sidebar src/views/layout/components/Sidebar
src/utils/salecontract
src/utils/salecontract2
src/utils/*.js

View file

@ -1,7 +1,7 @@
import request from '@/utils/request' import request from '@/utils/request'
// 添加销售出库单 // 添加销售出库单
export function createsaleOut(query, query2, query3, query4, query5, query6) { export function createsaleOut(query, query2, query3, query4, query5, query6, query7) {
var params = new URLSearchParams() var params = new URLSearchParams()
params.append('Json', query) // 你要传给后台的参数值 key/value params.append('Json', query) // 你要传给后台的参数值 key/value
params.append('detailJson', query2) // 你要传给后台的参数值 key/value params.append('detailJson', query2) // 你要传给后台的参数值 key/value
@ -18,6 +18,9 @@ export function createsaleOut(query, query2, query3, query4, query5, query6) {
if (query6) { if (query6) {
params.append('retreatJson', query6) // 你要传给后台的参数值 key/value params.append('retreatJson', query6) // 你要传给后台的参数值 key/value
} }
if (query7) {
params.append('serviceJson', query7) // 你要传给后台的参数值 key/value
}
return request({ return request({
url: '/saleOut/create', url: '/saleOut/create',
method: 'post', method: 'post',
@ -95,7 +98,7 @@ export function searchsaleOut(query) {
} }
// 修改销售出库单 // 修改销售出库单
export function updatesaleOut(query, query2, query3, query4, query5) { export function updatesaleOut(query, query2, query3, query4, query5, query6) {
var params = new URLSearchParams() var params = new URLSearchParams()
params.append('Json', query) // 你要传给后台的参数值 key/value params.append('Json', query) // 你要传给后台的参数值 key/value
params.append('detailJson', query2) // 你要传给后台的参数值 key/value params.append('detailJson', query2) // 你要传给后台的参数值 key/value
@ -104,6 +107,9 @@ export function updatesaleOut(query, query2, query3, query4, query5) {
if (query5) { if (query5) {
params.append('retreatJson', query5) // 你要传给后台的参数值 key/value params.append('retreatJson', query5) // 你要传给后台的参数值 key/value
} }
if (query6) {
params.append('serviceJson', query6) // 你要传给后台的参数值 key/value
}
return request({ return request({
url: '/saleOut/update', url: '/saleOut/update',
method: 'post', method: 'post',

View file

@ -1766,3 +1766,28 @@ export function bigStuffInventory(query) {
data: params data: params
}) })
} }
// 收入分析表
export function incomeAnalysis(query) {
var params = new URLSearchParams()
if (query.searchRepositoryId !== '' && query.searchRepositoryId !== null && query.searchRepositoryId !== undefined) {
params.append('searchRepositoryId', query.searchRepositoryId) // 你要传给后台的参数值 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.repositoryId !== '' && query.repositoryId !== null && query.repositoryId !== undefined) {
params.append('repositoryId', query.repositoryId) // 你要传给后台的参数值 key/value
}
if (query.regionIds !== '' && query.regionIds !== null && query.regionIds !== undefined) {
params.append('regionIds', query.regionIds) // 你要传给后台的参数值 key/value
}
return request({
url: '/SaleReport/incomeAnalysis',
method: 'post',
data: params
})
}

View file

@ -1,5 +1,6 @@
export default { export default {
route: { route: {
IncomeAnalysis: 'incomeAnalysis',
bigStuffInventory: 'bigStuffInventory', bigStuffInventory: 'bigStuffInventory',
VehicleSaleCount: 'VehicleSaleCount', VehicleSaleCount: 'VehicleSaleCount',
OutSouringAdjustList: 'OutSouringAdjustList', OutSouringAdjustList: 'OutSouringAdjustList',

View file

@ -1,5 +1,6 @@
export default { export default {
route: { route: {
IncomeAnalysis: '收入分析',
bigStuffInventory: '大件库存统计', bigStuffInventory: '大件库存统计',
VehicleSaleCount: '销售整车出库统计', VehicleSaleCount: '销售整车出库统计',
OutSouringAdjustList: '外包工厂调价单列表', OutSouringAdjustList: '外包工厂调价单列表',
@ -4459,6 +4460,27 @@ export default {
dbrgscgsx: '担保人人数超过限制', dbrgscgsx: '担保人人数超过限制',
zxrwek: '担保人为空', zxrwek: '担保人为空',
sfdk: '是否抵扣', sfdk: '是否抵扣',
qxzkh: '请选择客户' qxzkh: '请选择客户',
rq: '日期',
khm: '客户名',
ck: '仓库/门店',
djlx: '单据类型',
addMoney: '增加金额',
lessMoney: '减少金额',
djh: '单据号',
invoiceNumber: '发票号',
remark: '备注',
xsckd: '销售出库单',
xsthd: '销售退货单',
skd: '收款单',
srk: '收入单',
wxxm: '维修项目',
tjxm: '添加项目',
wxcx: '维修车型',
xmmc: '项目名称',
ms: '描述',
bdkhjg: '本店客户价格',
fbdkhjg: '非本店客户价格',
qxxzkh: '请先选择客户'
} }
} }

View file

@ -3318,6 +3318,12 @@ export const asyncRouterMap = [
roles: ['311-314-328-4', '311-314-329-4', '311-314-367-4', '311-314-368-4', '311-314-375-4', '311-313-380-4'] roles: ['311-314-328-4', '311-314-329-4', '311-314-367-4', '311-314-368-4', '311-314-375-4', '311-313-380-4']
}, },
children: [ children: [
{
path: 'IncomeAnalysis',
component: () => import('@/views/Financecount/IncomeAnalysis'),
name: 'IncomeAnalysis',
meta: { title: 'IncomeAnalysis', noCache: false, roles: ['311-314-409-4'] }
},
{ {
path: 'shouldPayCount', path: 'shouldPayCount',
component: () => import('@/views/Financecount/shouldPayCount'), component: () => import('@/views/Financecount/shouldPayCount'),

File diff suppressed because it is too large Load diff

4752
src/utils/salecontract2.js Normal file

File diff suppressed because it is too large Load diff

View file

@ -160,8 +160,8 @@ export default {
}, },
filterno(status) { filterno(status) {
const statusMap = { const statusMap = {
1: '老客户', 1: _that.$t('update4.bdkh'),
2: '新客户' 2: _that.$t('update4.fbdkh')
} }
return statusMap[status] return statusMap[status]
} }

View file

@ -168,8 +168,8 @@ export default {
}, },
filterno(status) { filterno(status) {
const statusMap = { const statusMap = {
1: '老客户', 1: _that.$t('update4.bdkh'),
2: '新客户' 2: _that.$t('update4.fbdkh')
} }
return statusMap[status] return statusMap[status]
} }

View file

@ -160,8 +160,8 @@ export default {
}, },
filterno(status) { filterno(status) {
const statusMap = { const statusMap = {
1: '老客户', 1: _that.$t('update4.bdkh'),
2: '新客户' 2: _that.$t('update4.fbdkh')
} }
return statusMap[status] return statusMap[status]
} }

View file

@ -168,8 +168,8 @@ export default {
}, },
filterno(status) { filterno(status) {
const statusMap = { const statusMap = {
1: '老客户', 1: _that.$t('update4.bdkh'),
2: '新客户' 2: _that.$t('update4.fbdkh')
} }
return statusMap[status] return statusMap[status]
} }

View file

@ -161,8 +161,8 @@ export default {
}, },
filterno(status) { filterno(status) {
const statusMap = { const statusMap = {
1: '老客户', 1: _that.$t('update4.bdkh'),
2: '新客户' 2: _that.$t('update4.fbdkh')
} }
return statusMap[status] return statusMap[status]
} }

View file

@ -169,8 +169,8 @@ export default {
}, },
filterno(status) { filterno(status) {
const statusMap = { const statusMap = {
1: '老客户', 1: _that.$t('update4.bdkh'),
2: '新客户' 2: _that.$t('update4.fbdkh')
} }
return statusMap[status] return statusMap[status]
} }

View file

@ -172,8 +172,8 @@ export default {
}, },
filterno(status) { filterno(status) {
const statusMap = { const statusMap = {
1: '老客户', 1: _that.$t('update4.bdkh'),
2: '新客户' 2: _that.$t('update4.fbdkh')
} }
return statusMap[status] return statusMap[status]
} }

View file

@ -160,8 +160,8 @@ export default {
}, },
filterno(status) { filterno(status) {
const statusMap = { const statusMap = {
1: '老客户', 1: _that.$t('update4.bdkh'),
2: '新客户' 2: _that.$t('update4.fbdkh')
} }
return statusMap[status] return statusMap[status]
} }

View file

@ -168,8 +168,8 @@ export default {
}, },
filterno(status) { filterno(status) {
const statusMap = { const statusMap = {
1: '老客户', 1: _that.$t('update4.bdkh'),
2: '新客户' 2: _that.$t('update4.fbdkh')
} }
return statusMap[status] return statusMap[status]
} }

View file

@ -139,7 +139,7 @@
</div> </div>
</el-card> </el-card>
<!--组装后的商品 --> <!--组装后的商品 -->
<el-card :body-style=" { padding: '5px' }" class="box-card" shadow="never" style="margin-top: 5px; marign-bottom: 20px"> <el-card :body-style=" { padding: '5px' }" class="box-card" shadow="never" style="margin-top: 5px; marign-bottom: 40px">
<div ref="fuzhu" class="form-name">{{ $t('updates.zzhdsp') }}</div> <div ref="fuzhu" class="form-name">{{ $t('updates.zzhdsp') }}</div>
<div class="buttons" style="margin-top: 25px"> <div class="buttons" style="margin-top: 25px">
@ -159,7 +159,7 @@
stripe stripe
border border
size="small" size="small"
style="width: 100%" style="width: 100%;margin-bottom: 40px"
@selection-change="handleSelectionChange"> @selection-change="handleSelectionChange">
<el-editable-column type="selection" width="55" align="center"/> <el-editable-column type="selection" width="55" align="center"/>
<el-editable-column label="编号" width="55" align="center" type="index"/> <el-editable-column label="编号" width="55" align="center" type="index"/>

View file

@ -160,8 +160,8 @@ export default {
}, },
filterno(status) { filterno(status) {
const statusMap = { const statusMap = {
1: '老客户', 1: _that.$t('update4.bdkh'),
2: '新客户' 2: _that.$t('update4.fbdkh')
} }
return statusMap[status] return statusMap[status]
} }

View file

@ -168,8 +168,8 @@ export default {
}, },
filterno(status) { filterno(status) {
const statusMap = { const statusMap = {
1: '老客户', 1: _that.$t('update4.bdkh'),
2: '新客户' 2: _that.$t('update4.fbdkh')
} }
return statusMap[status] return statusMap[status]
} }

View file

@ -160,8 +160,8 @@ export default {
}, },
filterno(status) { filterno(status) {
const statusMap = { const statusMap = {
1: '老客户', 1: _that.$t('update4.bdkh'),
2: '新客户' 2: _that.$t('update4.fbdkh')
} }
return statusMap[status] return statusMap[status]
} }

View file

@ -168,8 +168,8 @@ export default {
}, },
filterno(status) { filterno(status) {
const statusMap = { const statusMap = {
1: '老客户', 1: _that.$t('update4.bdkh'),
2: '新客户' 2: _that.$t('update4.fbdkh')
} }
return statusMap[status] return statusMap[status]
} }

View file

@ -160,8 +160,8 @@ export default {
}, },
filterno(status) { filterno(status) {
const statusMap = { const statusMap = {
1: '老客户', 1: _that.$t('update4.bdkh'),
2: '新客户' 2: _that.$t('update4.fbdkh')
} }
return statusMap[status] return statusMap[status]
} }

View file

@ -168,8 +168,8 @@ export default {
}, },
filterno(status) { filterno(status) {
const statusMap = { const statusMap = {
1: '老客户', 1: _that.$t('update4.bdkh'),
2: '新客户' 2: _that.$t('update4.fbdkh')
} }
return statusMap[status] return statusMap[status]
} }

View file

@ -160,8 +160,8 @@ export default {
}, },
filterno(status) { filterno(status) {
const statusMap = { const statusMap = {
1: '老客户', 1: _that.$t('update4.bdkh'),
2: '新客户' 2: _that.$t('update4.fbdkh')
} }
return statusMap[status] return statusMap[status]
} }

View file

@ -168,8 +168,8 @@ export default {
}, },
filterno(status) { filterno(status) {
const statusMap = { const statusMap = {
1: '老客户', 1: _that.$t('update4.bdkh'),
2: '新客户' 2: _that.$t('update4.fbdkh')
} }
return statusMap[status] return statusMap[status]
} }

View file

@ -160,8 +160,8 @@ export default {
}, },
filterno(status) { filterno(status) {
const statusMap = { const statusMap = {
1: '老客户', 1: _that.$t('update4.bdkh'),
2: '新客户' 2: _that.$t('update4.fbdkh')
} }
return statusMap[status] return statusMap[status]
} }

View file

@ -168,8 +168,8 @@ export default {
}, },
filterno(status) { filterno(status) {
const statusMap = { const statusMap = {
1: '老客户', 1: _that.$t('update4.bdkh'),
2: '新客户' 2: _that.$t('update4.fbdkh')
} }
return statusMap[status] return statusMap[status]
} }

View file

@ -160,8 +160,8 @@ export default {
}, },
filterno(status) { filterno(status) {
const statusMap = { const statusMap = {
1: '老客户', 1: _that.$t('update4.bdkh'),
2: '新客户' 2: _that.$t('update4.fbdkh')
} }
return statusMap[status] return statusMap[status]
} }

View file

@ -168,8 +168,8 @@ export default {
}, },
filterno(status) { filterno(status) {
const statusMap = { const statusMap = {
1: '老客户', 1: _that.$t('update4.bdkh'),
2: '新客户' 2: _that.$t('update4.fbdkh')
} }
return statusMap[status] return statusMap[status]
} }

View file

@ -165,8 +165,8 @@ export default {
}, },
filterno(status) { filterno(status) {
const statusMap = { const statusMap = {
1: '老客户', 1: _that.$t('update4.bdkh'),
2: '新客户' 2: _that.$t('update4.fbdkh')
} }
return statusMap[status] return statusMap[status]
} }

View file

@ -171,8 +171,8 @@ export default {
}, },
filterno(status) { filterno(status) {
const statusMap = { const statusMap = {
1: '老客户', 1: _that.$t('update4.bdkh'),
2: '新客户' 2: _that.$t('update4.fbdkh')
} }
return statusMap[status] return statusMap[status]
} }

View file

@ -164,8 +164,8 @@ export default {
}, },
filterno(status) { filterno(status) {
const statusMap = { const statusMap = {
1: '老客户', 1: _that.$t('update4.bdkh'),
2: '新客户' 2: _that.$t('update4.fbdkh')
} }
return statusMap[status] return statusMap[status]
} }

View file

@ -171,8 +171,8 @@ export default {
}, },
filterno(status) { filterno(status) {
const statusMap = { const statusMap = {
1: '老客户', 1: _that.$t('update4.bdkh'),
2: '新客户' 2: _that.$t('update4.fbdkh')
} }
return statusMap[status] return statusMap[status]
} }

View file

@ -87,14 +87,14 @@
<el-option <el-option
v-for="(item, index) in packageLists" v-for="(item, index) in packageLists"
:key="index" :key="index"
:label="item.processNames" :label="item.remark"
:value="item.id" :value="item.id"
/> />
</el-select> </el-select>
</div> </div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button type="primary" @click="handlesendok()">{{ $t('Hmodule.sure') }}</el-button> <el-button :loading="sureloding" type="primary" @click="handlesendok()">{{ $t('Hmodule.sure') }}</el-button>
<el-button type="danger" @click="closetag()">{{ $t('Hmodule.cancel') }}</el-button> <el-button :loading="sureloding" type="danger" @click="closetag()">{{ $t('Hmodule.cancel') }}</el-button>
</span> </span>
</el-dialog> </el-dialog>
@ -251,6 +251,7 @@ export default {
} }
} }
return { return {
sureloding: false,
packageLists: [], packageLists: [],
packageparms: '', packageparms: '',
categoryVisible: false, categoryVisible: false,
@ -444,7 +445,7 @@ export default {
_that = this _that = this
}, },
methods: { methods: {
handlesendok() { async handlesendok() {
console.log('packageparms', this.packageparms) console.log('packageparms', this.packageparms)
if (!this.packageparms) { if (!this.packageparms) {
this.$notify.error({ this.$notify.error({
@ -457,20 +458,60 @@ export default {
const filterarr = this.moreaction.filter(item => { const filterarr = this.moreaction.filter(item => {
return item.stat === 1 return item.stat === 1
}) })
if (filterarr.length === 0) {
this.$notify.error({
title: 'wrong',
message: '请选择在职员工',
offset: 100
})
return false
}
this.sureloding = true
const parms = this.packageparms
const list = await Promise.all(filterarr.map(function(item) {
return packageToEmp(item.id, parms)
}))
console.log('list', list)
let j = 0
for (const i in list) {
if (list[i].data.ret !== 200) {
j = 1
}
}
for (const i in filterarr) { if (j === 0) {
packageToEmp(filterarr[i].id, this.packageparms).then(res => {
if (res.data.ret === 200) {
this.$notify({ this.$notify({
title: 'successful', title: 'successful',
message: '分配成功', message: '分配成功',
type: 'success', type: 'success',
offset: 100 offset: 100
}) })
} this.sureloding = false
this.categoryVisible = false this.categoryVisible = false
} else if (j === 1) {
this.$notify.error({
title: 'wrong',
message: '分配失败,请再次分配',
offset: 100
}) })
this.sureloding = false
return false
} }
// for (const i in filterarr) {
// packageToEmp(filterarr[i].id, this.packageparms).then(res => {
// if (res.data.ret === 200) {
// this.$notify({
// title: 'successful',
// message: '',
// type: 'success',
// offset: 100
// })
// }
// this.categoryVisible = false
// })
// }
}, },
getpackagelist() { getpackagelist() {
approvalPackageList().then(res => { approvalPackageList().then(res => {
@ -481,6 +522,7 @@ export default {
}, },
closetag() { closetag() {
this.packageparms = '' this.packageparms = ''
this.sureloding = false
this.categoryVisible = false this.categoryVisible = false
}, },
handleSend() { handleSend() {

View file

@ -0,0 +1,248 @@
<template>
<div class="ERP-container">
<el-card :body-style=" { padding: '5px' }" class="box-card" style="margin-top: 5px" shadow="never">
<el-input v-model="accessrepository" :placeholder="$t('updates.repository')" class="filter-item" clearable @keyup.enter.native="handleFilter" @focus="handlechooseRep" @clear="restFilter2"/>
<my-repository :repositorycontrol.sync="repositorycontrol" @repositoryname="repositoryname"/>
<el-date-picker
v-model="date"
:default-time="['00:00:00', '23:59:59']"
type="daterange"
range-separator="-"
unlink-panels
value-format="yyyy-MM-dd"
style="width: 250px"/>
<el-button v-waves class="filter-item" size="small" type="primary" icon="el-icon-search" style="width: 86px;margin-top: 10px" round @click="handleFilter">{{ $t('public.search') }}</el-button>
</el-card>
<el-card :body-style=" { padding: '10px' }" class="box-card" shadow="never">
<!-- 列表开始 -->
<el-table
v-loading="listLoading"
ref="table"
:data="list"
:height="tableHeight"
size="small"
border
style="width: 100%"
@row-click="clickRow">
<el-table-column
:label="$t('update4.rq')"
prop="receiptDate"
sortable
align="center"/>
<el-table-column
:label="$t('update4.djh')"
prop="receiptNumber"
sortable
align="center"/>
<el-table-column
:label="$t('update4.khm')"
prop="customerName"
sortable
align="center"/>
<el-table-column
:label="$t('update4.ck')"
prop="handleRepositoryName"
sortable
align="center"/>
<el-table-column
:label="$t('update4.djlx')"
prop="receiptType"
sortable
align="center">
<template slot-scope="scope">
<span>{{ scope.row.receiptType | receiptTypeFilter }}</span>
</template>
</el-table-column>
<el-table-column
:label="$t('update4.addMoney')"
prop="addMoney"
sortable
align="center"/>
<el-table-column
:label="$t('update4.lessMoney')"
prop="lessMoney"
sortable
align="center"/>
<el-table-column
:label="$t('update4.invoiceNumber')"
prop="invoiceNumber"
sortable
align="center"/>
<el-table-column
:label="$t('update4.remark')"
prop="remark"
sortable
align="center"/>
</el-table>
<!-- 列表结束 -->
</el-card>
</div>
</template>
<script>
import { incomeAnalysis } from '@/api/count'
import { searchStockCategory } from '@/api/StockCategory'
import MyRepository from './components/MyRepository'
import waves from '@/directive/waves' // Waves directive
import permission from '@/directive/permission/index.js' //
import permission2 from '@/directive/permission2/index.js' //
import checkPermission from '@/utils/permission' //
import MyDetail from './components/MyDetail'
var _that
export default {
name: 'IncomeAnalysis',
directives: { waves, permission, permission2 },
components: { MyRepository, MyDetail },
filters: {
receiptTypeFilter(sta) {
const statusMap = {
1: _that.$t('update4.xsckd'),
2: _that.$t('update4.xsthd'),
3: _that.$t('update4.skd'),
4: _that.$t('update4.srk')
}
return statusMap[sta]
}
},
data() {
return {
tableHeight: 200,
getemplist: {
searchRepositoryId: '',
repositoryId: this.$store.getters.repositoryId,
regionIds: this.$store.getters.regionIds,
beginTime: '',
endTime: '',
productCode: '',
productName: ''
},
date: [],
list: [],
control: false,
repositorycontrol: false,
accessrepository: '',
listLoading: false
}
},
activated() {
setTimeout(() => {
this.tableHeight = window.innerHeight - this.$refs.table.$el.offsetTop - 140
}, 100)
},
mounted() {
setTimeout(() => {
this.tableHeight = window.innerHeight - this.$refs.table.$el.offsetTop - 140
}, 100)
},
beforeCreate() {
_that = this
},
methods: {
clickRow(val) {
if (val.judgeStat === 0) {
this.$refs.table.toggleRowSelection(val)
}
},
handleFilter() {
if (this.date.length === 0) {
this.$notify.error({
title: 'wrong',
message: '请选择日期开始搜索',
offset: 100
})
return false
}
this.getemplist.beginTime = this.date[0] + ' 00:00:00'
this.getemplist.endTime = this.date[1] + ' 23:59:59'
console.log(this.getemplist)
this.listLoading = true
incomeAnalysis(this.getemplist).then(res => {
if (res.data.ret === 200) {
this.list = res.data.data.content
}
this.listLoading = false
})
},
handlechoosepro() {
this.control = true
},
handlechooseRep() {
this.repositorycontrol = true
},
productdetail(val) {
this.getemplist.productCode = val.productCode
},
repositoryname(val) {
console.log('repval', val)
this.getemplist.searchRepositoryId = val.id
this.accessrepository = val.repositoryName
},
restFilter() {
this.getemplist.productCode = ''
},
restFilter2() {
this.getemplist.searchRepositoryId = ''
this.accessrepository = ''
}
}
}
</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-left:10px;
}
.filter-container{
padding: 20px;
padding-left: 0px;
}
.filter-item{
width: 180px;
margin-left: 10px;
padding: 10px 0;
}
.filter-item2{
width: 180px;
margin-left: 5px;
padding: 10px 0;
}
.box-card {
/* border : 1px solid #f1f1ff !important; */
border-bottom : 1px solid #f1f1ff00 !important
}
.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

@ -160,8 +160,8 @@ export default {
}, },
filterno(status) { filterno(status) {
const statusMap = { const statusMap = {
1: '老客户', 1: _that.$t('update4.bdkh'),
2: '新客户' 2: _that.$t('update4.fbdkh')
} }
return statusMap[status] return statusMap[status]
} }

View file

@ -168,8 +168,8 @@ export default {
}, },
filterno(status) { filterno(status) {
const statusMap = { const statusMap = {
1: '老客户', 1: _that.$t('update4.bdkh'),
2: '新客户' 2: _that.$t('update4.fbdkh')
} }
return statusMap[status] return statusMap[status]
} }

View file

@ -160,8 +160,8 @@ export default {
}, },
filterno(status) { filterno(status) {
const statusMap = { const statusMap = {
1: '老客户', 1: _that.$t('update4.bdkh'),
2: '新客户' 2: _that.$t('update4.fbdkh')
} }
return statusMap[status] return statusMap[status]
} }

View file

@ -168,8 +168,8 @@ export default {
}, },
filterno(status) { filterno(status) {
const statusMap = { const statusMap = {
1: '老客户', 1: _that.$t('update4.bdkh'),
2: '新客户' 2: _that.$t('update4.fbdkh')
} }
return statusMap[status] return statusMap[status]
} }

View file

@ -160,8 +160,8 @@ export default {
}, },
filterno(status) { filterno(status) {
const statusMap = { const statusMap = {
1: '老客户', 1: _that.$t('update4.bdkh'),
2: '新客户' 2: _that.$t('update4.fbdkh')
} }
return statusMap[status] return statusMap[status]
} }

View file

@ -168,8 +168,8 @@ export default {
}, },
filterno(status) { filterno(status) {
const statusMap = { const statusMap = {
1: '老客户', 1: _that.$t('update4.bdkh'),
2: '新客户' 2: _that.$t('update4.fbdkh')
} }
return statusMap[status] return statusMap[status]
} }

View file

@ -160,8 +160,8 @@ export default {
}, },
filterno(status) { filterno(status) {
const statusMap = { const statusMap = {
1: '老客户', 1: _that.$t('update4.bdkh'),
2: '新客户' 2: _that.$t('update4.fbdkh')
} }
return statusMap[status] return statusMap[status]
} }

View file

@ -168,8 +168,8 @@ export default {
}, },
filterno(status) { filterno(status) {
const statusMap = { const statusMap = {
1: '老客户', 1: _that.$t('update4.bdkh'),
2: '新客户' 2: _that.$t('update4.fbdkh')
} }
return statusMap[status] return statusMap[status]
} }

View file

@ -308,14 +308,14 @@ export default {
// } // }
const EnterDetail2 = this.$refs.editable3.getRecords() const EnterDetail2 = this.$refs.editable3.getRecords()
if (EnterDetail2.length === 0) { // if (EnterDetail2.length === 0) {
this.$notify.error({ // this.$notify.error({
title: 'wrong', // title: 'wrong',
message: this.$t('prompt.mxbbnwk'), // message: this.$t('prompt.mxbbnwk'),
offset: 100 // offset: 100
}) // })
return false // return false
} // }
EnterDetail2.map(function(elem) { EnterDetail2.map(function(elem) {
return elem return elem
}).forEach(function(elem) { }).forEach(function(elem) {

View file

@ -160,8 +160,8 @@ export default {
}, },
filterno(status) { filterno(status) {
const statusMap = { const statusMap = {
1: '老客户', 1: _that.$t('update4.bdkh'),
2: '新客户' 2: _that.$t('update4.fbdkh')
} }
return statusMap[status] return statusMap[status]
} }

View file

@ -168,8 +168,8 @@ export default {
}, },
filterno(status) { filterno(status) {
const statusMap = { const statusMap = {
1: '老客户', 1: _that.$t('update4.bdkh'),
2: '新客户' 2: _that.$t('update4.fbdkh')
} }
return statusMap[status] return statusMap[status]
} }

View file

@ -160,8 +160,8 @@ export default {
}, },
filterno(status) { filterno(status) {
const statusMap = { const statusMap = {
1: '老客户', 1: _that.$t('update4.bdkh'),
2: '新客户' 2: _that.$t('update4.fbdkh')
} }
return statusMap[status] return statusMap[status]
} }

View file

@ -168,8 +168,8 @@ export default {
}, },
filterno(status) { filterno(status) {
const statusMap = { const statusMap = {
1: '老客户', 1: _that.$t('update4.bdkh'),
2: '新客户' 2: _that.$t('update4.fbdkh')
} }
return statusMap[status] return statusMap[status]
} }

View file

@ -165,8 +165,8 @@ export default {
}, },
filterno(status) { filterno(status) {
const statusMap = { const statusMap = {
1: '老客户', 1: _that.$t('update4.bdkh'),
2: '新客户' 2: _that.$t('update4.fbdkh')
} }
return statusMap[status] return statusMap[status]
} }

View file

@ -173,8 +173,8 @@ export default {
}, },
filterno(status) { filterno(status) {
const statusMap = { const statusMap = {
1: '老客户', 1: _that.$t('update4.bdkh'),
2: '新客户' 2: _that.$t('update4.fbdkh')
} }
return statusMap[status] return statusMap[status]
} }

View file

@ -158,7 +158,7 @@
<el-editable-column :fixed="isfixed" :label="$t('Hmodule.xh')" min-width="55" align="center" type="index"/> <el-editable-column :fixed="isfixed" :label="$t('Hmodule.xh')" min-width="55" align="center" type="index"/>
<el-editable-column :fixed="isfixed" :label="$t('Hmodule.wpbh')" prop="productCode" align="center" min-width="150"/> <el-editable-column :fixed="isfixed" :label="$t('Hmodule.wpbh')" prop="productCode" align="center" min-width="150"/>
<el-editable-column :fixed="isfixed" :label="$t('Hmodule.wpmc')" prop="productName" align="center" min-width="150"/> <el-editable-column :fixed="isfixed" :label="$t('Hmodule.wpmc')" prop="productName" align="center" min-width="150"/>
<el-editable-column :edit-render="{type: 'default'}" :label="$t('Hmodule.hw')" prop="locationId" align="center" width="200px"> <el-editable-column :edit-render="{name: 'ElSelect', type: 'default'}" :label="$t('Hmodule.hw')" prop="locationId" align="center" width="200px">
<template slot-scope="scope"> <template slot-scope="scope">
<el-select v-model="scope.row.locationId" :value="scope.row.locationId" :placeholder="$t('Hmodule.xzhw')" filterable clearable style="margin-left: 18px;width: 100%;margin-bottom: 0" @visible-change="updatebatch($event,scope)"> <el-select v-model="scope.row.locationId" :value="scope.row.locationId" :placeholder="$t('Hmodule.xzhw')" filterable clearable style="margin-left: 18px;width: 100%;margin-bottom: 0" @visible-change="updatebatch($event,scope)">
<el-option <el-option

View file

@ -172,8 +172,8 @@ export default {
}, },
filterno(status) { filterno(status) {
const statusMap = { const statusMap = {
1: '老客户', 1: _that.$t('update4.bdkh'),
2: '新客户' 2: _that.$t('update4.fbdkh')
} }
return statusMap[status] return statusMap[status]
} }

View file

@ -116,7 +116,7 @@
<el-editable-column :fixed="isfixed" :label="$t('Hmodule.xh')" min-width="55" align="center" type="index"/> <el-editable-column :fixed="isfixed" :label="$t('Hmodule.xh')" min-width="55" align="center" type="index"/>
<el-editable-column :fixed="isfixed" :label="$t('Hmodule.wpbh')" prop="productCode" align="center" min-width="150"/> <el-editable-column :fixed="isfixed" :label="$t('Hmodule.wpbh')" prop="productCode" align="center" min-width="150"/>
<el-editable-column :fixed="isfixed" :label="$t('Hmodule.wpmc')" prop="productName" align="center" min-width="150"/> <el-editable-column :fixed="isfixed" :label="$t('Hmodule.wpmc')" prop="productName" align="center" min-width="150"/>
<el-editable-column :edit-render="{type: 'default'}" :label="$t('Hmodule.hw')" prop="locationId" align="center" width="200px"> <el-editable-column :edit-render="{name: 'ElSelect', type: 'default'}" :label="$t('Hmodule.hw')" prop="locationId" align="center" width="200px">
<template slot-scope="scope"> <template slot-scope="scope">
<el-select v-model="scope.row.locationId" :value="scope.row.locationId" :placeholder="$t('Hmodule.xzhw')" filterable clearable style="width: 100%;" @visible-change="updatebatch($event,scope)"> <el-select v-model="scope.row.locationId" :value="scope.row.locationId" :placeholder="$t('Hmodule.xzhw')" filterable clearable style="width: 100%;" @visible-change="updatebatch($event,scope)">
<el-option <el-option

View file

@ -168,8 +168,8 @@ export default {
}, },
filterno(status) { filterno(status) {
const statusMap = { const statusMap = {
1: '老客户', 1: _that.$t('update4.bdkh'),
2: '新客户' 2: _that.$t('update4.fbdkh')
} }
return statusMap[status] return statusMap[status]
} }

View file

@ -169,8 +169,8 @@ export default {
}, },
filterno(status) { filterno(status) {
const statusMap = { const statusMap = {
1: '老客户', 1: _that.$t('update4.bdkh'),
2: '新客户' 2: _that.$t('update4.fbdkh')
} }
return statusMap[status] return statusMap[status]
} }

View file

@ -164,8 +164,8 @@ export default {
}, },
filterno(status) { filterno(status) {
const statusMap = { const statusMap = {
1: '老客户', 1: _that.$t('update4.bdkh'),
2: '新客户' 2: _that.$t('update4.fbdkh')
} }
return statusMap[status] return statusMap[status]
} }

View file

@ -173,8 +173,8 @@ export default {
}, },
filterno(status) { filterno(status) {
const statusMap = { const statusMap = {
1: '老客户', 1: _that.$t('update4.bdkh'),
2: '新客户' 2: _that.$t('update4.fbdkh')
} }
return statusMap[status] return statusMap[status]
} }

View file

@ -339,6 +339,7 @@
<script> <script>
import printJS from 'print-js' import printJS from 'print-js'
import { searchRepository3 } from '@/api/Repository'
// import datazzz from '@/utils/salecontract' // import datazzz from '@/utils/salecontract'
var _that var _that
export default { export default {
@ -490,13 +491,24 @@ export default {
return hasPermission return hasPermission
}, },
handleprint() { handleprint() {
const parms = {
id: this.personalForm.saleRepositoryId,
pagenum: 1,
pagesize: 10
}
searchRepository3(parms).then(res => {
if (res.data.ret === 200) {
this.categoryVisible = false this.categoryVisible = false
localStorage.setItem('selectcompany', this.selectcompany) localStorage.setItem('selectcompany', this.selectcompany)
// console.log('this.selectcompany', this.selectcompany) const repdata = JSON.stringify(res.data.data.content.list[0])
localStorage.setItem('setrepository', repdata)
const routeUrl = this.$router.resolve({ const routeUrl = this.$router.resolve({
path: '/SaleContract/download' path: '/SaleContract/download'
}) })
window.open(routeUrl.href, '_blank') window.open(routeUrl.href, '_blank')
}
})
// console.log('this.selectcompany', this.selectcompany)
}, },
closetag() { closetag() {
this.categoryVisible = false this.categoryVisible = false

View file

@ -164,8 +164,8 @@ export default {
}, },
filterno(status) { filterno(status) {
const statusMap = { const statusMap = {
1: '老客户', 1: _that.$t('update4.bdkh'),
2: '新客户' 2: _that.$t('update4.fbdkh')
} }
return statusMap[status] return statusMap[status]
} }

View file

@ -172,8 +172,8 @@ export default {
}, },
filterno(status) { filterno(status) {
const statusMap = { const statusMap = {
1: '老客户', 1: _that.$t('update4.bdkh'),
2: '新客户' 2: _that.$t('update4.fbdkh')
} }
return statusMap[status] return statusMap[status]
} }

View file

@ -172,8 +172,8 @@ export default {
}, },
filterno(status) { filterno(status) {
const statusMap = { const statusMap = {
1: '老客户', 1: _that.$t('update4.bdkh'),
2: '新客户' 2: _that.$t('update4.fbdkh')
} }
return statusMap[status] return statusMap[status]
} }

View file

@ -14,6 +14,7 @@ export default {
data() { data() {
return { return {
article: '', article: '',
dataprint: '',
fullscreenLoading: true fullscreenLoading: true
} }
}, },
@ -25,9 +26,17 @@ export default {
seedata() { seedata() {
var data1 = JSON.parse(localStorage.getItem('getprintdata')) var data1 = JSON.parse(localStorage.getItem('getprintdata'))
console.log(data1) console.log(data1)
const data2 = JSON.parse(localStorage.getItem('setrepository'))
console.log(data2)
}, },
fetchData() { fetchData() {
import('@/utils/salecontract').then(data => { this.dataprint = JSON.parse(localStorage.getItem('getprintdata'))
var data1 = JSON.parse(localStorage.getItem('getprintdata'))
console.log(data1)
const data2 = JSON.parse(localStorage.getItem('setrepository'))
console.log(data2)
if (this.dataprint.saleType === 2) {
import('@/utils/salecontract2').then(data => {
const { title } = data.default const { title } = data.default
document.title = title document.title = title
this.article = data.default this.article = data.default
@ -39,6 +48,20 @@ export default {
}) })
}, 3000) }, 3000)
}) })
} else if (this.dataprint.saleType === 1) {
import('@/utils/salecontract').then(data => {
const { title } = data.default
document.title = title
this.article = data.default
console.log(data.default)
setTimeout(() => {
this.fullscreenLoading = false
this.$nextTick(() => {
window.print()
})
}, 3000)
})
}
} }
} }
} }

View file

@ -161,8 +161,8 @@ export default {
}, },
filterno(status) { filterno(status) {
const statusMap = { const statusMap = {
1: '老客户', 1: _that.$t('update4.bdkh'),
2: '新客户' 2: _that.$t('update4.fbdkh')
} }
return statusMap[status] return statusMap[status]
} }

View file

@ -169,8 +169,8 @@ export default {
}, },
filterno(status) { filterno(status) {
const statusMap = { const statusMap = {
1: '老客户', 1: _that.$t('update4.bdkh'),
2: '新客户' 2: _that.$t('update4.fbdkh')
} }
return statusMap[status] return statusMap[status]
} }

View file

@ -165,8 +165,8 @@ export default {
}, },
filterno(status) { filterno(status) {
const statusMap = { const statusMap = {
1: '老客户', 1: _that.$t('update4.bdkh'),
2: '新客户' 2: _that.$t('update4.fbdkh')
} }
return statusMap[status] return statusMap[status]
} }

View file

@ -172,8 +172,8 @@ export default {
}, },
filterno(status) { filterno(status) {
const statusMap = { const statusMap = {
1: '老客户', 1: _that.$t('update4.bdkh'),
2: '新客户' 2: _that.$t('update4.fbdkh')
} }
return statusMap[status] return statusMap[status]
} }

View file

@ -729,6 +729,11 @@ export default {
return time.getTime() < new Date().getTime() - 8.64e7 return time.getTime() < new Date().getTime() - 8.64e7
} }
}, },
pickerOptions2: {
disabledDate: (time) => {
return time.getTime() > new Date().getTime() - 8.64e7
}
},
materialcontrol: false, materialcontrol: false,
// //
packagecontrol: false, packagecontrol: false,

View file

@ -342,6 +342,36 @@
</div> </div>
</el-card> </el-card>
<!-- 维修项目 -->
<el-card :body-style=" { padding: '5px' }" class="box-card" shadow="never" style="margin-top: 5px">
<div ref="fuzhu" class="form-name">{{ $t('update4.wxxm') }}</div>
<div class="buttons" style="margin-top: 58px">
<el-button type="success" style="background:#3696fd;border-color:#3696fd " @click="additem">{{ $t('update4.tjxm') }}</el-button>
<el-button type="danger" @click="$refs.editable3.removeSelecteds()">{{ $t('Hmodule.delete') }}</el-button>
<my-item :control.sync="control3" @product2="productdetail3"/>
</div>
<div class="container">
<el-editable
ref="editable3"
:data.sync="itemlist"
:edit-config="{ showIcon: true, showStatus: true}"
class="click-table1"
stripe
border
size="small"
style="width: 100%">
<el-editable-column type="selection" width="55" align="center"/>
<el-editable-column width="55" align="center" type="index"/>
<el-editable-column :label="$t('update4.wxcx')" prop="productType" align="center"/>
<el-editable-column :label="$t('update4.xmmc')" prop="name" align="center" min-width="200"/>
<el-editable-column :label="$t('update4.bdkhjg')" prop="price" align="center"/>
<el-editable-column :label="$t('update4.fbdkhjg')" prop="otherPrice" align="center"/>
<el-editable-column :label="$t('update4.ms')" prop="description" align="center"/>
</el-editable>
</div>
</el-card>
<el-card :body-style=" { padding: '5px' }" class="box-card" shadow="never" style="margin-top: 5px; margin-bottom: 20px"> <el-card :body-style=" { padding: '5px' }" class="box-card" shadow="never" style="margin-top: 5px; margin-bottom: 20px">
<div ref="geren" class="form-name" style="font-size: 16px;color: #606266;margin-top: -5px;">{{ $t('update4.skxx') }}</div> <div ref="geren" class="form-name" style="font-size: 16px;color: #606266;margin-top: -5px;">{{ $t('update4.skxx') }}</div>
<div class="container" style="margin-top: 37px"> <div class="container" style="margin-top: 37px">
@ -469,7 +499,7 @@
<!--操作--> <!--操作-->
<div class="buttons" style="position:fixed;bottom: 0;width: 100%;height: 40px; background: #fff;z-index: 99"> <div class="buttons" style="position:fixed;bottom: 0;width: 100%;height: 40px; background: #fff;z-index: 99">
<el-button v-no-more-click type="primary" style="background:#3696fd;border-color:#3696fd;width: 98px" @click="handlesave()">{{ $t('Hmodule.baoc') }}</el-button> <el-button :loading="saveloading" type="primary" style="background:#3696fd;border-color:#3696fd;width: 98px" @click="handlesave()">{{ $t('Hmodule.baoc') }}</el-button>
<!-- <el-button v-no-more-click type="primary" style="background:#3696fd;border-color:#3696fd;width: 98px" @click="handlesave2()">{{ $t('collectAndPay.lsbc') }}</el-button> --> <!-- <el-button v-no-more-click type="primary" style="background:#3696fd;border-color:#3696fd;width: 98px" @click="handlesave2()">{{ $t('collectAndPay.lsbc') }}</el-button> -->
<el-button type="danger" @click="handlecancel()">{{ $t('Hmodule.cancel') }}</el-button> <el-button type="danger" @click="handlecancel()">{{ $t('Hmodule.cancel') }}</el-button>
</div> </div>
@ -539,10 +569,11 @@ import MyContract from './components/MyContract'
import MyRecycling from './components/MyRecycling' import MyRecycling from './components/MyRecycling'
import MyPackage from './components/MyPackage' import MyPackage from './components/MyPackage'
import MyMaterials from './components/MyMaterials' import MyMaterials from './components/MyMaterials'
import MyItem from './components/MyItem'
var _that var _that
export default { export default {
name: 'NewAccessoriesOut', name: 'NewAccessoriesOut',
components: { MyMaterials, MyReturn, MyRecycling, MyContract, MyDetail2, MyOpportunity, MyPresale, MyAdvance, MyOrder, MyRepository, MyAccept, MyAgent, MyCustomer, MyRequire, MySupplier, MyApply, MyDetail, MyDelivery, MyEmp, MyPackage }, components: { MyMaterials, MyItem, MyReturn, MyRecycling, MyContract, MyDetail2, MyOpportunity, MyPresale, MyAdvance, MyOrder, MyRepository, MyAccept, MyAgent, MyCustomer, MyRequire, MySupplier, MyApply, MyDetail, MyDelivery, MyEmp, MyPackage },
data() { data() {
const validatePass = (rule, value, callback) => { const validatePass = (rule, value, callback) => {
if (this.salePersonId === undefined || this.salePersonId === null || this.salePersonId === '') { if (this.salePersonId === undefined || this.salePersonId === null || this.salePersonId === '') {
@ -603,6 +634,11 @@ export default {
} }
} }
return { return {
saveloading: false,
projectmoney: 0,
isbendi: null,
itemlist: [],
control3: false,
isdeduct: 1, isdeduct: 1,
ischina: this.$store.getters.countryId, ischina: this.$store.getters.countryId,
listLoading: false, listLoading: false,
@ -852,6 +888,24 @@ export default {
this.heji10 = num1 this.heji10 = num1
}, },
deep: true deep: true
},
itemlist: {
handler(oldval, newval) {
console.log('oldval', oldval)
let num = 0
if (this.isbendi === 1) {
for (const i in this.itemlist) {
num += this.itemlist[i].price
}
} else if (this.isbendi === 2) {
for (const i in this.itemlist) {
num += this.itemlist[i].otherPrice
}
}
this.projectmoney = num
this.getReceivableMoney()
},
deep: true
} }
}, },
created() { created() {
@ -875,6 +929,55 @@ export default {
_that = this _that = this
}, },
methods: { methods: {
uniqueArray3(array, key) {
var result = [array[0]]
for (var i = 1; i < array.length; i++) {
var item = array[i]
var repeat = false
for (var j = 0; j < result.length; j++) {
if (item[key] === result[j][key]) {
repeat = true
break
}
}
if (!repeat) {
result.push(item)
}
}
return result
},
additem() {
if (!this.customerId) {
this.$notify.error({
title: 'wrong',
message: this.$t('update4.qxxzkh'),
offset: 100
})
return false
}
this.control3 = true
},
productdetail3(val) {
if (!this.customerId) {
this.$notify.error({
title: 'wrong',
message: this.$t('update4.qxxzkh'),
offset: 100
})
return false
}
const nowlistdata = this.$refs.editable3.getRecords()
this.$refs.editable3.clear()
console.log('val============', val)
const alldata = [...nowlistdata, ...val]
const filterdata = this.uniqueArray3(alldata, 'id')
console.log('filterdata=====', filterdata)
// this.list2 = filterdata
for (let i = 0; i < filterdata.length; i++) {
// val[i].quantity = 1
this.$refs.editable3.insert(filterdata[i])
}
},
changeisdeduct() { changeisdeduct() {
if (this.isdeduct === 2) { if (this.isdeduct === 2) {
this.personalForm.advanceMoney = 0 this.personalForm.advanceMoney = 0
@ -1258,11 +1361,15 @@ export default {
this.personalForm.advanceMoney = 0 this.personalForm.advanceMoney = 0
} }
if (!this.projectmoney) {
this.projectmoney = 0
}
if (this.personalForm.isFree === 2) { if (this.personalForm.isFree === 2) {
if (this.personalForm.isAppService === 1) { if (this.personalForm.isAppService === 1) {
if (this.personalForm.sourceType === '1' || this.personalForm.sourceType === '3' || this.personalForm.sourceType === '4' || this.personalForm.sourceType === '5' || this.personalForm.sourceType === '6') { if (this.personalForm.sourceType === '1' || this.personalForm.sourceType === '3' || this.personalForm.sourceType === '4' || this.personalForm.sourceType === '5' || this.personalForm.sourceType === '6') {
let testneedmoney = (this.heji3 - this.heji4 - Number(this.personalForm.pointSupport) - Number(this.personalForm.ridMoney) - Number(this.personalForm.ridBikeMoney) - Number(this.personalForm.advanceMoney) - Number(this.personalForm.couponSupportOld) - Number(this.personalForm.couponMoney)) + Number(this.personalForm.otherMoney) let testneedmoney = (this.heji3 - this.heji4 - Number(this.personalForm.pointSupport) - Number(this.personalForm.ridMoney) - Number(this.personalForm.ridBikeMoney) - Number(this.personalForm.advanceMoney) - Number(this.personalForm.couponSupportOld) - Number(this.personalForm.couponMoney)) + Number(this.personalForm.otherMoney) + Number(this.projectmoney)
const testneedmoney2 = (this.heji3 - this.heji4 - Number(this.personalForm.pointSupport) - Number(this.personalForm.ridMoney) - Number(this.personalForm.ridBikeMoney) - Number(this.personalForm.advanceMoney) - Number(this.personalForm.couponSupportOld)) + Number(this.personalForm.otherMoney) const testneedmoney2 = (this.heji3 - this.heji4 - Number(this.personalForm.pointSupport) - Number(this.personalForm.ridMoney) - Number(this.personalForm.ridBikeMoney) - Number(this.personalForm.advanceMoney) - Number(this.personalForm.couponSupportOld)) + Number(this.personalForm.otherMoney) + Number(this.projectmoney)
if (testneedmoney < 0) { if (testneedmoney < 0) {
testneedmoney = 0 testneedmoney = 0
} }
@ -1277,8 +1384,8 @@ export default {
// //
this.$set(this.personalForm, 'receivableMoney2', needmoney2) this.$set(this.personalForm, 'receivableMoney2', needmoney2)
} else if (this.$store.getters.newsaleoutdata.firstMoney) { } else if (this.$store.getters.newsaleoutdata.firstMoney) {
let testneedmoney = (this.$store.getters.newsaleoutdata.firstMoney - Number(this.personalForm.couponSupportOld) - Number(this.personalForm.couponMoney)) + Number(this.personalForm.otherMoney) let testneedmoney = (this.$store.getters.newsaleoutdata.firstMoney - Number(this.personalForm.couponSupportOld) - Number(this.personalForm.couponMoney)) + Number(this.personalForm.otherMoney) + Number(this.projectmoney)
const testneedmoney2 = (this.$store.getters.newsaleoutdata.firstMoney - Number(this.personalForm.couponSupportOld)) + Number(this.personalForm.otherMoney) const testneedmoney2 = (this.$store.getters.newsaleoutdata.firstMoney - Number(this.personalForm.couponSupportOld)) + Number(this.personalForm.otherMoney) + Number(this.projectmoney)
if (testneedmoney < 0) { if (testneedmoney < 0) {
testneedmoney = 0 testneedmoney = 0
} }
@ -1294,8 +1401,8 @@ export default {
// //
this.$set(this.personalForm, 'receivableMoney2', needmoney2) this.$set(this.personalForm, 'receivableMoney2', needmoney2)
} else if (this.shouldMoney !== '' || this.shouldMoney !== null || this.shouldMoney !== undefined) { } else if (this.shouldMoney !== '' || this.shouldMoney !== null || this.shouldMoney !== undefined) {
let testneedmoney = (this.shouldMoney - Number(this.personalForm.couponSupportOld) - Number(this.personalForm.couponMoney)) + Number(this.personalForm.otherMoney) let testneedmoney = (this.shouldMoney - Number(this.personalForm.couponSupportOld) - Number(this.personalForm.couponMoney)) + Number(this.personalForm.otherMoney) + Number(this.projectmoney)
const testneedmoney2 = (this.shouldMoney - Number(this.personalForm.couponSupportOld)) + Number(this.personalForm.otherMoney) const testneedmoney2 = (this.shouldMoney - Number(this.personalForm.couponSupportOld)) + Number(this.personalForm.otherMoney) + Number(this.projectmoney)
if (testneedmoney < 0) { if (testneedmoney < 0) {
testneedmoney = 0 testneedmoney = 0
} }
@ -1310,8 +1417,8 @@ export default {
// //
this.$set(this.personalForm, 'receivableMoney2', needmoney2) this.$set(this.personalForm, 'receivableMoney2', needmoney2)
} else { } else {
let testneedmoney = (this.heji3 - this.heji4 - Number(this.personalForm.pointSupport) - Number(this.personalForm.ridMoney) - Number(this.personalForm.ridBikeMoney) - Number(this.personalForm.advanceMoney) - Number(this.personalForm.couponSupportOld) - Number(this.personalForm.couponMoney)) + Number(this.personalForm.otherMoney) let testneedmoney = (this.heji3 - this.heji4 - Number(this.personalForm.pointSupport) - Number(this.personalForm.ridMoney) - Number(this.personalForm.ridBikeMoney) - Number(this.personalForm.advanceMoney) - Number(this.personalForm.couponSupportOld) - Number(this.personalForm.couponMoney)) + Number(this.personalForm.otherMoney) + Number(this.projectmoney)
const testneedmoney2 = (this.heji3 - this.heji4 - Number(this.personalForm.pointSupport) - Number(this.personalForm.ridMoney) - Number(this.personalForm.ridBikeMoney) - Number(this.personalForm.advanceMoney) - Number(this.personalForm.couponSupportOld)) + Number(this.personalForm.otherMoney) const testneedmoney2 = (this.heji3 - this.heji4 - Number(this.personalForm.pointSupport) - Number(this.personalForm.ridMoney) - Number(this.personalForm.ridBikeMoney) - Number(this.personalForm.advanceMoney) - Number(this.personalForm.couponSupportOld)) + Number(this.personalForm.otherMoney) + Number(this.projectmoney)
if (testneedmoney < 0) { if (testneedmoney < 0) {
testneedmoney = 0 testneedmoney = 0
} }
@ -1328,8 +1435,8 @@ export default {
} else if (this.personalForm.isAppService === 2) { } else if (this.personalForm.isAppService === 2) {
this.$set(this.personalForm, 'appDiscount', 0) this.$set(this.personalForm, 'appDiscount', 0)
if (this.personalForm.sourceType === '1' || this.personalForm.sourceType === '3' || this.personalForm.sourceType === '4' || this.personalForm.sourceType === '5' || this.personalForm.sourceType === '6') { if (this.personalForm.sourceType === '1' || this.personalForm.sourceType === '3' || this.personalForm.sourceType === '4' || this.personalForm.sourceType === '5' || this.personalForm.sourceType === '6') {
let needmoney = (this.heji3 - this.heji4 - Number(this.personalForm.pointSupport) - Number(this.personalForm.ridMoney) - Number(this.personalForm.ridBikeMoney) - Number(this.personalForm.advanceMoney) - Number(this.personalForm.couponSupportOld) - Number(this.personalForm.couponMoney)) + Number(this.personalForm.otherMoney) let needmoney = (this.heji3 - this.heji4 - Number(this.personalForm.pointSupport) - Number(this.personalForm.ridMoney) - Number(this.personalForm.ridBikeMoney) - Number(this.personalForm.advanceMoney) - Number(this.personalForm.couponSupportOld) - Number(this.personalForm.couponMoney)) + Number(this.personalForm.otherMoney) + Number(this.projectmoney)
const needmoney2 = (this.heji3 - this.heji4 - Number(this.personalForm.pointSupport) - Number(this.personalForm.ridMoney) - Number(this.personalForm.ridBikeMoney) - Number(this.personalForm.advanceMoney) - Number(this.personalForm.couponSupportOld)) + Number(this.personalForm.otherMoney) const needmoney2 = (this.heji3 - this.heji4 - Number(this.personalForm.pointSupport) - Number(this.personalForm.ridMoney) - Number(this.personalForm.ridBikeMoney) - Number(this.personalForm.advanceMoney) - Number(this.personalForm.couponSupportOld)) + Number(this.personalForm.otherMoney) + Number(this.projectmoney)
if (needmoney < 0) { if (needmoney < 0) {
needmoney = 0 needmoney = 0
} }
@ -1337,8 +1444,8 @@ export default {
// //
this.$set(this.personalForm, 'receivableMoney2', needmoney2) this.$set(this.personalForm, 'receivableMoney2', needmoney2)
} else if (this.$store.getters.newsaleoutdata.firstMoney) { } else if (this.$store.getters.newsaleoutdata.firstMoney) {
let needmoney = (this.$store.getters.newsaleoutdata.firstMoney - Number(this.personalForm.couponSupportOld) - Number(this.personalForm.couponMoney)) + Number(this.personalForm.otherMoney) let needmoney = (this.$store.getters.newsaleoutdata.firstMoney - Number(this.personalForm.couponSupportOld) - Number(this.personalForm.couponMoney)) + Number(this.personalForm.otherMoney) + Number(this.projectmoney)
const needmoney2 = (this.$store.getters.newsaleoutdata.firstMoney - Number(this.personalForm.couponSupportOld)) + Number(this.personalForm.otherMoney) const needmoney2 = (this.$store.getters.newsaleoutdata.firstMoney - Number(this.personalForm.couponSupportOld)) + Number(this.personalForm.otherMoney) + Number(this.projectmoney)
if (needmoney < 0) { if (needmoney < 0) {
needmoney = 0 needmoney = 0
} }
@ -1346,8 +1453,8 @@ export default {
// //
this.$set(this.personalForm, 'receivableMoney2', needmoney2) this.$set(this.personalForm, 'receivableMoney2', needmoney2)
} else if (this.shouldMoney !== '' || this.shouldMoney !== null || this.shouldMoney !== undefined) { } else if (this.shouldMoney !== '' || this.shouldMoney !== null || this.shouldMoney !== undefined) {
let needmoney = (this.shouldMoney - Number(this.personalForm.couponSupportOld) - Number(this.personalForm.couponMoney)) + Number(this.personalForm.otherMoney) let needmoney = (this.shouldMoney - Number(this.personalForm.couponSupportOld) - Number(this.personalForm.couponMoney)) + Number(this.personalForm.otherMoney) + Number(this.projectmoney)
const needmoney2 = (this.shouldMoney - Number(this.personalForm.couponSupportOld)) + Number(this.personalForm.otherMoney) const needmoney2 = (this.shouldMoney - Number(this.personalForm.couponSupportOld)) + Number(this.personalForm.otherMoney) + Number(this.projectmoney)
if (needmoney < 0) { if (needmoney < 0) {
needmoney = 0 needmoney = 0
} }
@ -1355,8 +1462,8 @@ export default {
// //
this.$set(this.personalForm, 'receivableMoney2', needmoney2) this.$set(this.personalForm, 'receivableMoney2', needmoney2)
} else { } else {
let needmoney = (this.heji3 - this.heji4 - Number(this.personalForm.pointSupport) - Number(this.personalForm.ridMoney) - Number(this.personalForm.ridBikeMoney) - Number(this.personalForm.advanceMoney) - Number(this.personalForm.couponSupportOld) - Number(this.personalForm.couponMoney)) + Number(this.personalForm.otherMoney) let needmoney = (this.heji3 - this.heji4 - Number(this.personalForm.pointSupport) - Number(this.personalForm.ridMoney) - Number(this.personalForm.ridBikeMoney) - Number(this.personalForm.advanceMoney) - Number(this.personalForm.couponSupportOld) - Number(this.personalForm.couponMoney)) + Number(this.personalForm.otherMoney) + Number(this.projectmoney)
const needmoney2 = (this.heji3 - this.heji4 - Number(this.personalForm.pointSupport) - Number(this.personalForm.ridMoney) - Number(this.personalForm.ridBikeMoney) - Number(this.personalForm.advanceMoney) - Number(this.personalForm.couponSupportOld)) + Number(this.personalForm.otherMoney) const needmoney2 = (this.heji3 - this.heji4 - Number(this.personalForm.pointSupport) - Number(this.personalForm.ridMoney) - Number(this.personalForm.ridBikeMoney) - Number(this.personalForm.advanceMoney) - Number(this.personalForm.couponSupportOld)) + Number(this.personalForm.otherMoney) + Number(this.projectmoney)
if (needmoney < 0) { if (needmoney < 0) {
needmoney = 0 needmoney = 0
} }
@ -2137,6 +2244,8 @@ export default {
} }
}, },
customerdata(val) { customerdata(val) {
console.log('val', val)
this.isbendi = val.newOrOld
this.personalForm.transAddress = val.address this.personalForm.transAddress = val.address
this.personalForm.customerId = val.id this.personalForm.customerId = val.id
customerlist2(this.personalForm.customerId).then(res => { customerlist2(this.personalForm.customerId).then(res => {
@ -2149,6 +2258,7 @@ export default {
this.personalForm.address = val.address this.personalForm.address = val.address
this.personalForm.advanceMoney = val.advanceMoney this.personalForm.advanceMoney = val.advanceMoney
this.point = val.point this.point = val.point
this.$refs.editable3.clear()
}, },
agentdata(val) { agentdata(val) {
this.personalForm.transAddress = val.address this.personalForm.transAddress = val.address
@ -2573,6 +2683,7 @@ export default {
isAppService: 2, isAppService: 2,
appDiscount: 0 appDiscount: 0
} }
this.projectmoney = 0
this.customerId = null this.customerId = null
this.salePersonId = this.$store.state.user.name this.salePersonId = this.$store.state.user.name
this.saleRepositoryId = this.$store.getters.repositoryName this.saleRepositoryId = this.$store.getters.repositoryName
@ -2828,6 +2939,7 @@ export default {
}, },
// //
async handlesave() { async handlesave() {
this.saveloading = true
const judgecustomer = await getCustomerOutCount(this.personalForm.customerId).then(res => { const judgecustomer = await getCustomerOutCount(this.personalForm.customerId).then(res => {
return res.data.data.content return res.data.data.content
}) })
@ -2841,6 +2953,7 @@ export default {
duration: 5000 duration: 5000
}) })
} }
if (this.personalForm.isFree === 2 && this.returnlist.length !== 0) { if (this.personalForm.isFree === 2 && this.returnlist.length !== 0) {
this.$refs.editable2.clear() this.$refs.editable2.clear()
} }
@ -2860,6 +2973,7 @@ export default {
const needbatterycategorys = await batteryList2(1118).then(res => { const needbatterycategorys = await batteryList2(1118).then(res => {
return res.data.data.content return res.data.data.content
}) })
setTimeout(() => {
const battery1 = needbatterycategorys[0].productClassfyVos const battery1 = needbatterycategorys[0].productClassfyVos
const battery2 = needbatterycategorys[1].productClassfyVos const battery2 = needbatterycategorys[1].productClassfyVos
const batterycategorys = [...battery1, ...battery2] const batterycategorys = [...battery1, ...battery2]
@ -2882,6 +2996,7 @@ export default {
message: this.$t('tongyo.zbthmxbnwk'), message: this.$t('tongyo.zbthmxbnwk'),
offset: 100 offset: 100
}) })
this.saveloading = false
return false return false
} }
const returnproduct = this.$refs.editable2.getRecords() const returnproduct = this.$refs.editable2.getRecords()
@ -2957,6 +3072,8 @@ export default {
message: this.$t('tongyo.dcthslyckslbfh'), message: this.$t('tongyo.dcthslyckslbfh'),
offset: 100 offset: 100
}) })
this.saveloading = false
return false return false
} }
@ -2966,6 +3083,8 @@ export default {
message: this.$t('tongyo.kzqthslyckslbf'), message: this.$t('tongyo.kzqthslyckslbf'),
offset: 100 offset: 100
}) })
this.saveloading = false
return false return false
} }
@ -2975,6 +3094,8 @@ export default {
message: this.$t('tongyo.cdqthslyckslbf'), message: this.$t('tongyo.cdqthslyckslbf'),
offset: 100 offset: 100
}) })
this.saveloading = false
return false return false
} }
@ -2984,6 +3105,8 @@ export default {
message: this.$t('tongyo.djthslyckslbf'), message: this.$t('tongyo.djthslyckslbf'),
offset: 100 offset: 100
}) })
this.saveloading = false
return false return false
} }
let z = 1 let z = 1
@ -3011,6 +3134,8 @@ export default {
message: this.$t('tongyo.cdqbmwtx'), message: this.$t('tongyo.cdqbmwtx'),
offset: 100 offset: 100
}) })
this.saveloading = false
return false return false
} }
if (z === 4) { if (z === 4) {
@ -3019,6 +3144,8 @@ export default {
message: this.$t('tongyo.kzqbmwtx'), message: this.$t('tongyo.kzqbmwtx'),
offset: 100 offset: 100
}) })
this.saveloading = false
return false return false
} }
if (z === 2) { if (z === 2) {
@ -3027,6 +3154,8 @@ export default {
message: this.$t('prompt.pchwbnwk'), message: this.$t('prompt.pchwbnwk'),
offset: 100 offset: 100
}) })
this.saveloading = false
return false return false
} }
if (z === 3) { if (z === 3) {
@ -3035,6 +3164,8 @@ export default {
message: this.$t('prompt.dcckytbm'), message: this.$t('prompt.dcckytbm'),
offset: 100 offset: 100
}) })
this.saveloading = false
return false return false
} }
} }
@ -3073,6 +3204,8 @@ export default {
message: this.$t('tongyo.cdqbmwtx'), message: this.$t('tongyo.cdqbmwtx'),
offset: 100 offset: 100
}) })
this.saveloading = false
return false return false
} }
if (m === 4) { if (m === 4) {
@ -3081,6 +3214,8 @@ export default {
message: this.$t('tongyo.kzqbmwtx'), message: this.$t('tongyo.kzqbmwtx'),
offset: 100 offset: 100
}) })
this.saveloading = false
return false return false
} }
if (m === 3) { if (m === 3) {
@ -3089,6 +3224,8 @@ export default {
message: this.$t('prompt.dcckytbm'), message: this.$t('prompt.dcckytbm'),
offset: 100 offset: 100
}) })
this.saveloading = false
return false return false
} }
if (m === 2) { if (m === 2) {
@ -3097,6 +3234,8 @@ export default {
message: this.$t('prompt.zcckytbm'), message: this.$t('prompt.zcckytbm'),
offset: 100 offset: 100
}) })
this.saveloading = false
return false return false
} }
// //
@ -3122,6 +3261,8 @@ export default {
message: '同样商品不能有同一个批次', message: '同样商品不能有同一个批次',
offset: 100 offset: 100
}) })
this.saveloading = false
return false return false
} }
// //
@ -3139,15 +3280,20 @@ export default {
message: this.$t('prompt.pchwbnwk'), message: this.$t('prompt.pchwbnwk'),
offset: 100 offset: 100
}) })
this.saveloading = false
return false return false
} }
const EnterDetail2 = this.deepClone(this.$refs.editable2.getRecords()) const EnterDetail2 = this.deepClone(this.$refs.editable2.getRecords())
if (EnterDetail.length === 0) { const servicedata = this.deepClone(this.$refs.editable3.getRecords())
if (EnterDetail.length === 0 && servicedata.length === 0) {
this.$notify.error({ this.$notify.error({
title: 'wrong', title: 'wrong',
message: this.$t('prompt.mxbbnwk'), message: this.$t('prompt.mxbbnwk'),
offset: 100 offset: 100
}) })
this.saveloading = false
return false return false
} }
EnterDetail.map(function(elem) { EnterDetail.map(function(elem) {
@ -3277,6 +3423,8 @@ export default {
message: '本次收款金额不能为空', message: '本次收款金额不能为空',
offset: 100 offset: 100
}) })
this.saveloading = false
return false return false
} }
if (Number(this.personalForm.shouldMoney) !== 0 && Number(this.personalForm.customerPay) === 0 && this.personalForm.isFree === 2) { if (Number(this.personalForm.shouldMoney) !== 0 && Number(this.personalForm.customerPay) === 0 && this.personalForm.isFree === 2) {
@ -3285,6 +3433,8 @@ export default {
message: this.$t('update4.qsrshijshk'), message: this.$t('update4.qsrshijshk'),
offset: 100 offset: 100
}) })
this.saveloading = false
return false return false
} }
console.log('Number(this.personalForm.shouldMoney)', Number(this.personalForm.shouldMoney)) console.log('Number(this.personalForm.shouldMoney)', Number(this.personalForm.shouldMoney))
@ -3295,6 +3445,8 @@ export default {
message: this.$t('update4.bcskyw'), message: this.$t('update4.bcskyw'),
offset: 100 offset: 100
}) })
this.saveloading = false
return false return false
} }
// eslint-disable-next-line use-isnan // eslint-disable-next-line use-isnan
@ -3304,6 +3456,8 @@ export default {
message: '实际收到客户金额不能为空', message: '实际收到客户金额不能为空',
offset: 100 offset: 100
}) })
this.saveloading = false
return false return false
} }
if (this.personalForm.isFree === 1) { if (this.personalForm.isFree === 1) {
@ -3325,6 +3479,7 @@ export default {
} }
const parms2 = JSON.stringify(EnterDetail) const parms2 = JSON.stringify(EnterDetail)
const parms6 = JSON.stringify(EnterDetail2) const parms6 = JSON.stringify(EnterDetail2)
const parms7 = JSON.stringify(servicedata)
const Data = this.personalForm const Data = this.personalForm
for (const key in Data) { for (const key in Data) {
if (Data[key] === '' || Data[key] === undefined || Data[key] === null) { if (Data[key] === '' || Data[key] === undefined || Data[key] === null) {
@ -3335,7 +3490,7 @@ export default {
} }
} }
const parms = JSON.stringify(Data) const parms = JSON.stringify(Data)
createsaleOut(parms, parms2, parms3, this.personalForm, this.personalForm.receivableMoney2, parms6).then(res => { createsaleOut(parms, parms2, parms3, this.personalForm, this.personalForm.receivableMoney2, parms6, parms7).then(res => {
if (res.data.ret === 200) { if (res.data.ret === 200) {
this.$notify({ this.$notify({
title: 'successful', title: 'successful',
@ -3346,6 +3501,7 @@ export default {
this.restAllForm() this.restAllForm()
this.$refs.editable.clear() this.$refs.editable.clear()
this.$refs.editable2.clear() this.$refs.editable2.clear()
this.$refs.editable3.clear()
this.$refs.personalForm.clearValidate() this.$refs.personalForm.clearValidate()
this.$refs.personalForm.resetFields() this.$refs.personalForm.resetFields()
this.$refs.personalForm2.clearValidate() this.$refs.personalForm2.clearValidate()
@ -3359,6 +3515,7 @@ export default {
offset: 100 offset: 100
}) })
} }
this.saveloading = false
}) })
} else { } else {
this.$notify.error({ this.$notify.error({
@ -3366,9 +3523,12 @@ export default {
message: 'Information is incomplete', message: 'Information is incomplete',
offset: 100 offset: 100
}) })
this.saveloading = false
return false return false
} }
}) })
}, 0.5 * 1000)
}, },
// //
handlecancel() { handlecancel() {

View file

@ -69,7 +69,7 @@
<!-- <el-button v-permission="['54-55-7']" v-waves size="small" class="filter-item2" icon="el-icon-printer" style="width: 86px" @click="handlePrint">{{ $t('public.print') }}</el-button> --> <!-- <el-button v-permission="['54-55-7']" v-waves size="small" class="filter-item2" icon="el-icon-printer" style="width: 86px" @click="handlePrint">{{ $t('public.print') }}</el-button> -->
<!-- 新建操作 --> <!-- 新建操作 -->
<el-button v-permission="['54-55-1']" v-waves size="small" class="filter-item2" icon="el-icon-plus" type="success" style="width: 86px" @click="handleAdd">{{ $t('public.add') }}</el-button> <el-button v-permission="['54-55-1']" v-waves size="small" class="filter-item2" icon="el-icon-plus" type="success" style="width: 86px" @click="handleAdd">{{ $t('public.add') }}</el-button>
<el-button v-permission="['54-55-1']" v-waves size="small" class="filter-item2" icon="el-icon-plus" type="success" style="width: 110px" @click="handleAdd2">创建补单</el-button> <!-- <el-button v-permission="['54-55-1']" v-waves size="small" class="filter-item2" icon="el-icon-plus" type="success" style="width: 110px" @click="handleAdd2">创建补单</el-button> -->
</el-card> </el-card>
<el-card :body-style=" { padding: '10px' }" class="box-card" shadow="never"> <el-card :body-style=" { padding: '10px' }" class="box-card" shadow="never">

View file

@ -315,6 +315,29 @@
</div> </div>
</el-card> </el-card>
<el-card class="box-card" style="margin-top: 15px">
<h2 ref="fuzhu" class="form-name">{{ $t('update4.wxxm') }}</h2>
<div class="container">
<el-editable
ref="editable4"
:data.sync="itemlist"
:edit-config="{ showIcon: true, showStatus: true}"
class="click-table1"
stripe
border
size="small"
style="width: 100%">
<!-- <el-editable-column type="selection" width="55" align="center"/> -->
<el-editable-column width="55" align="center" type="index"/>
<el-editable-column :label="$t('update4.wxcx')" prop="productType" align="center"/>
<el-editable-column :label="$t('update4.xmmc')" prop="name" align="center" min-width="200"/>
<el-editable-column :label="$t('update4.bdkhjg')" prop="price" align="center"/>
<el-editable-column :label="$t('update4.fbdkhjg')" prop="otherPrice" align="center"/>
<el-editable-column :label="$t('update4.ms')" prop="description" align="center"/>
</el-editable>
</div>
</el-card>
<!--审核状态--> <!--审核状态-->
<el-card class="box-card" shadow="never" style="margin-top: 10px"> <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;">{{ $t('updates.hjxx') }}</h2> <h2 ref="geren" class="form-name" style="font-size: 16px;color: #606266;margin-top: -5px;">{{ $t('updates.hjxx') }}</h2>
@ -605,6 +628,7 @@ export default {
}, },
data() { data() {
return { return {
itemlist: [],
// 退 // 退
returnlist: [], returnlist: [],
huishou: '', huishou: '',
@ -633,6 +657,7 @@ export default {
console.log('this.personalForm.receivableMoney', this.personalForm.receivableMoney) console.log('this.personalForm.receivableMoney', this.personalForm.receivableMoney)
this.list2 = this.personalForm.saleOutDetailVos this.list2 = this.personalForm.saleOutDetailVos
this.list3 = this.personalForm.saleOutGiftVos this.list3 = this.personalForm.saleOutGiftVos
this.itemlist = this.personalForm.saleOutItems
this.returnlist = this.personalForm.saleOutRetreatVos this.returnlist = this.personalForm.saleOutRetreatVos
for (const i in this.list2) { for (const i in this.list2) {
this.list2[i].categoryName = this.list2[i].productCategoryName this.list2[i].categoryName = this.list2[i].productCategoryName

View file

@ -164,8 +164,8 @@ export default {
}, },
filterno(status) { filterno(status) {
const statusMap = { const statusMap = {
1: '老客户', 1: _that.$t('update4.bdkh'),
2: '新客户' 2: _that.$t('update4.fbdkh')
} }
return statusMap[status] return statusMap[status]
} }

View file

@ -172,8 +172,8 @@ export default {
}, },
filterno(status) { filterno(status) {
const statusMap = { const statusMap = {
1: '老客户', 1: _that.$t('update4.bdkh'),
2: '新客户' 2: _that.$t('update4.fbdkh')
} }
return statusMap[status] return statusMap[status]
} }

View file

@ -473,6 +473,35 @@
</div> </div>
</el-card> </el-card>
<el-card :body-style=" { padding: '5px' }" class="box-card" shadow="never" style="margin-top: 5px">
<div ref="fuzhu" class="form-name">{{ $t('update4.wxxm') }}</div>
<div class="buttons" style="margin-top: 58px">
<el-button type="success" style="background:#3696fd;border-color:#3696fd " @click="additem">{{ $t('update4.tjxm') }}</el-button>
<el-button type="danger" @click="$refs.editable4.removeSelecteds()">{{ $t('Hmodule.delete') }}</el-button>
<my-item :control.sync="control3" @product2="productdetail3"/>
</div>
<div class="container">
<el-editable
ref="editable4"
:data.sync="itemlist"
:edit-config="{ showIcon: true, showStatus: true}"
class="click-table1"
stripe
border
size="small"
style="width: 100%">
<el-editable-column type="selection" width="55" align="center"/>
<el-editable-column width="55" align="center" type="index"/>
<el-editable-column :label="$t('update4.wxcx')" prop="productType" align="center"/>
<el-editable-column :label="$t('update4.xmmc')" prop="name" align="center" min-width="200"/>
<el-editable-column :label="$t('update4.bdkhjg')" prop="price" align="center"/>
<el-editable-column :label="$t('update4.fbdkhjg')" prop="otherPrice" align="center"/>
<el-editable-column :label="$t('update4.ms')" prop="description" align="center"/>
</el-editable>
</div>
</el-card>
<el-card class="box-card" shadow="never" style="margin-top: 10px"> <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;">{{ $t('updates.hjxx') }}</h2> <h2 ref="geren" class="form-name" style="font-size: 16px;color: #606266;margin-top: -5px;">{{ $t('updates.hjxx') }}</h2>
<div class="container" style="margin-top: 37px"> <div class="container" style="margin-top: 37px">
@ -575,6 +604,8 @@ import MyDetail2 from './MyDetail2'
import MyPackage from './MyPackage' import MyPackage from './MyPackage'
import MyContract from './MyContract' import MyContract from './MyContract'
import MyReturn from './MyReturn' import MyReturn from './MyReturn'
import MyItem from './MyItem'
// eslint-disable-next-line no-unused-vars // eslint-disable-next-line no-unused-vars
var _that var _that
export default { export default {
@ -595,7 +626,7 @@ export default {
return statusMap[sta] return statusMap[sta]
} }
}, },
components: { MyReturn, MyContract, MyPackage, MyDetail2, MyOpportunity, MyPresale, MyAdvance, MyOrder, MyRepository, MyAccept, MyAgent, MyCustomer, MyRequire, MySupplier, MyApply, MyDetail, MyDelivery, MyEmp }, components: { MyReturn, MyItem, MyContract, MyPackage, MyDetail2, MyOpportunity, MyPresale, MyAdvance, MyOrder, MyRepository, MyAccept, MyAgent, MyCustomer, MyRequire, MySupplier, MyApply, MyDetail, MyDelivery, MyEmp },
props: { props: {
editcontrol: { editcontrol: {
type: Boolean, type: Boolean,
@ -665,6 +696,10 @@ export default {
} }
} }
return { return {
projectmoney: 0,
isbendi: null,
itemlist: [],
control3: false,
personalForm2: { personalForm2: {
couponSupports: [ couponSupports: [
{ {
@ -914,6 +949,7 @@ export default {
} }
this.list3 = this.personalForm.saleOutGiftVos this.list3 = this.personalForm.saleOutGiftVos
this.returnlist = this.personalForm.saleOutRetreatVos this.returnlist = this.personalForm.saleOutRetreatVos
this.itemlist = this.personalForm.saleOutItems
// for (const i in this.list2) { // for (const i in this.list2) {
// this.list3[i].location = this.list3[i].locationName // this.list3[i].location = this.list3[i].locationName
// } // }
@ -963,6 +999,24 @@ export default {
// console.log(num) // console.log(num)
}, },
deep: true deep: true
},
itemlist: {
handler(oldval, newval) {
console.log('oldval', oldval)
let num = 0
if (this.isbendi === 1) {
for (const i in this.itemlist) {
num += this.itemlist[i].price
}
} else if (this.isbendi === 2) {
for (const i in this.itemlist) {
num += this.itemlist[i].otherPrice
}
}
this.projectmoney = num
this.getReceivableMoney()
},
deep: true
} }
}, },
@ -974,6 +1028,55 @@ export default {
_that = this _that = this
}, },
methods: { methods: {
uniqueArray3(array, key) {
var result = [array[0]]
for (var i = 1; i < array.length; i++) {
var item = array[i]
var repeat = false
for (var j = 0; j < result.length; j++) {
if (item[key] === result[j][key]) {
repeat = true
break
}
}
if (!repeat) {
result.push(item)
}
}
return result
},
additem() {
if (!this.customerId) {
this.$notify.error({
title: 'wrong',
message: this.$t('update4.qxxzkh'),
offset: 100
})
return false
}
this.control3 = true
},
productdetail3(val) {
if (!this.customerId) {
this.$notify.error({
title: 'wrong',
message: this.$t('update4.qxxzkh'),
offset: 100
})
return false
}
const nowlistdata = this.$refs.editable4.getRecords()
this.$refs.editable4.clear()
console.log('val============', val)
const alldata = [...nowlistdata, ...val]
const filterdata = this.uniqueArray3(alldata, 'id')
console.log('filterdata=====', filterdata)
// this.list2 = filterdata
for (let i = 0; i < filterdata.length; i++) {
// val[i].quantity = 1
this.$refs.editable4.insert(filterdata[i])
}
},
judgeinvoce() { judgeinvoce() {
console.log('this.personalForm.invoiceNumber', this.personalForm.invoiceNumber) console.log('this.personalForm.invoiceNumber', this.personalForm.invoiceNumber)
checkInvoiceExist(this.personalForm.invoiceNumber, this.personalForm.saleRepositoryId).then(res => { checkInvoiceExist(this.personalForm.invoiceNumber, this.personalForm.saleRepositoryId).then(res => {
@ -1157,6 +1260,9 @@ export default {
if (!this.personalForm.couponMoney) { if (!this.personalForm.couponMoney) {
this.personalForm.couponMoney = 0 this.personalForm.couponMoney = 0
} }
if (!this.projectmoney) {
this.projectmoney = 0
}
console.log('this.personalForm.sourceTypethis.personalForm.sourceType', this.personalForm.sourceType) console.log('this.personalForm.sourceTypethis.personalForm.sourceType', this.personalForm.sourceType)
if (this.personalForm.couponSupportOld === null || this.personalForm.couponSupportOld === '' || this.personalForm.couponSupportOld === undefined) { if (this.personalForm.couponSupportOld === null || this.personalForm.couponSupportOld === '' || this.personalForm.couponSupportOld === undefined) {
this.personalForm.couponSupportOld = 0 this.personalForm.couponSupportOld = 0
@ -1165,8 +1271,8 @@ export default {
console.log('this.heji3', this.heji3) console.log('this.heji3', this.heji3)
console.log('this.heji4', this.heji4) console.log('this.heji4', this.heji4)
console.log('this.personalForm.couponMoney', this.personalForm.couponMoney) console.log('this.personalForm.couponMoney', this.personalForm.couponMoney)
let needmoney = (this.heji3 - this.heji4 - Number(this.personalForm.pointSupport) - Number(this.personalForm.ridMoney) - Number(this.personalForm.ridBikeMoney) - Number(this.personalForm.advanceMoney) - Number(this.personalForm.couponSupportOld) - Number(this.personalForm.couponMoney)) + Number(this.personalForm.otherMoney) let needmoney = (this.heji3 - this.heji4 - Number(this.personalForm.pointSupport) - Number(this.personalForm.ridMoney) - Number(this.personalForm.ridBikeMoney) - Number(this.personalForm.advanceMoney) - Number(this.personalForm.couponSupportOld) - Number(this.personalForm.couponMoney)) + Number(this.personalForm.otherMoney) + Number(this.projectmoney)
const needmoney2 = (this.heji3 - this.heji4 - Number(this.personalForm.pointSupport) - Number(this.personalForm.ridMoney) - Number(this.personalForm.ridBikeMoney) - Number(this.personalForm.advanceMoney) - Number(this.personalForm.couponSupportOld)) + Number(this.personalForm.otherMoney) const needmoney2 = (this.heji3 - this.heji4 - Number(this.personalForm.pointSupport) - Number(this.personalForm.ridMoney) - Number(this.personalForm.ridBikeMoney) - Number(this.personalForm.advanceMoney) - Number(this.personalForm.couponSupportOld)) + Number(this.personalForm.otherMoney) + Number(this.projectmoney)
if (needmoney < 0) { if (needmoney < 0) {
needmoney = 0 needmoney = 0
} }
@ -1191,8 +1297,8 @@ export default {
console.log('filterfinally', filterfinally) console.log('filterfinally', filterfinally)
// this.diffpricelist // this.diffpricelist
if (filterfinally.length !== 0) { if (filterfinally.length !== 0) {
let needmoney = (Number(filterfinally[0].diffMoney) * Number(allbattery[0].quantity) - Number(this.personalForm.pointSupport) - Number(this.personalForm.ridMoney) - Number(this.personalForm.ridBikeMoney) - Number(this.personalForm.advanceMoney) - Number(this.personalForm.couponSupportOld) - Number(this.personalForm.couponMoney)) + Number(this.personalForm.otherMoney) let needmoney = (Number(filterfinally[0].diffMoney) * Number(allbattery[0].quantity) - Number(this.personalForm.pointSupport) - Number(this.personalForm.ridMoney) - Number(this.personalForm.ridBikeMoney) - Number(this.personalForm.advanceMoney) - Number(this.personalForm.couponSupportOld) - Number(this.personalForm.couponMoney)) + Number(this.personalForm.otherMoney) + Number(this.projectmoney)
const needmoney2 = (Number(filterfinally[0].diffMoney) * Number(allbattery[0].quantity) - Number(this.personalForm.pointSupport) - Number(this.personalForm.ridMoney) - Number(this.personalForm.ridBikeMoney) - Number(this.personalForm.advanceMoney) - Number(this.personalForm.couponSupportOld)) + Number(this.personalForm.otherMoney) const needmoney2 = (Number(filterfinally[0].diffMoney) * Number(allbattery[0].quantity) - Number(this.personalForm.pointSupport) - Number(this.personalForm.ridMoney) - Number(this.personalForm.ridBikeMoney) - Number(this.personalForm.advanceMoney) - Number(this.personalForm.couponSupportOld)) + Number(this.personalForm.otherMoney) + Number(this.projectmoney)
if (needmoney < 0) { if (needmoney < 0) {
needmoney = 0 needmoney = 0
} }
@ -1206,8 +1312,8 @@ export default {
} }
} else if (this.$store.getters.newsaleoutdata.firstMoney) { } else if (this.$store.getters.newsaleoutdata.firstMoney) {
console.log('123', 123) console.log('123', 123)
let needmoney = (this.$store.getters.newsaleoutdata.firstMoney - Number(this.personalForm.couponSupportOld) - Number(this.personalForm.couponMoney)) + Number(this.personalForm.otherMoney) let needmoney = (this.$store.getters.newsaleoutdata.firstMoney - Number(this.personalForm.couponSupportOld) - Number(this.personalForm.couponMoney)) + Number(this.personalForm.otherMoney) + Number(this.projectmoney)
const needmoney2 = (this.$store.getters.newsaleoutdata.firstMoney - Number(this.personalForm.couponSupportOld)) + Number(this.personalForm.otherMoney) const needmoney2 = (this.$store.getters.newsaleoutdata.firstMoney - Number(this.personalForm.couponSupportOld)) + Number(this.personalForm.otherMoney) + Number(this.projectmoney)
if (needmoney < 0) { if (needmoney < 0) {
needmoney = 0 needmoney = 0
} }
@ -1217,8 +1323,8 @@ export default {
} else if (this.receivableMoney !== '' || this.receivableMoney !== null || this.receivableMoney !== undefined) { } else if (this.receivableMoney !== '' || this.receivableMoney !== null || this.receivableMoney !== undefined) {
console.log('是否是销售合同带入过来') console.log('是否是销售合同带入过来')
console.log('234', 234) console.log('234', 234)
let needmoney = (this.receivableMoney - Number(this.personalForm.couponSupportOld) - Number(this.personalForm.couponMoney)) + Number(this.personalForm.otherMoney) let needmoney = (this.receivableMoney - Number(this.personalForm.couponSupportOld) - Number(this.personalForm.couponMoney)) + Number(this.personalForm.otherMoney) + Number(this.projectmoney)
const needmoney2 = (this.receivableMoney - Number(this.personalForm.couponSupportOld)) + Number(this.personalForm.otherMoney) const needmoney2 = (this.receivableMoney - Number(this.personalForm.couponSupportOld)) + Number(this.personalForm.otherMoney) + Number(this.projectmoney)
if (needmoney < 0) { if (needmoney < 0) {
needmoney = 0 needmoney = 0
} }
@ -1227,8 +1333,8 @@ export default {
this.$set(this.personalForm, 'receivableMoney2', needmoney2) this.$set(this.personalForm, 'receivableMoney2', needmoney2)
} else { } else {
console.log('456', 456) console.log('456', 456)
let needmoney = (this.heji3 - this.heji4 - Number(this.personalForm.pointSupport) - Number(this.personalForm.ridMoney) - Number(this.personalForm.ridBikeMoney) - Number(this.personalForm.advanceMoney) - Number(this.personalForm.couponSupportOld) - Number(this.personalForm.couponMoney)) + Number(this.personalForm.otherMoney) let needmoney = (this.heji3 - this.heji4 - Number(this.personalForm.pointSupport) - Number(this.personalForm.ridMoney) - Number(this.personalForm.ridBikeMoney) - Number(this.personalForm.advanceMoney) - Number(this.personalForm.couponSupportOld) - Number(this.personalForm.couponMoney)) + Number(this.personalForm.otherMoney) + Number(this.projectmoney)
const needmoney2 = (this.heji3 - this.heji4 - Number(this.personalForm.pointSupport) - Number(this.personalForm.ridMoney) - Number(this.personalForm.ridBikeMoney) - Number(this.personalForm.advanceMoney) - Number(this.personalForm.couponSupportOld)) + Number(this.personalForm.otherMoney) const needmoney2 = (this.heji3 - this.heji4 - Number(this.personalForm.pointSupport) - Number(this.personalForm.ridMoney) - Number(this.personalForm.ridBikeMoney) - Number(this.personalForm.advanceMoney) - Number(this.personalForm.couponSupportOld)) + Number(this.personalForm.otherMoney) + Number(this.projectmoney)
if (needmoney < 0) { if (needmoney < 0) {
needmoney = 0 needmoney = 0
} }
@ -2046,6 +2152,7 @@ export default {
this.personalForm.phoneNumber = val.phoneNumber this.personalForm.phoneNumber = val.phoneNumber
this.personalForm.address = val.address this.personalForm.address = val.address
this.point = val.point this.point = val.point
this.$refs.editable4.clear()
}, },
agentdata(val) { agentdata(val) {
console.log(222, val) console.log(222, val)
@ -2343,6 +2450,7 @@ export default {
otherMoney: '', otherMoney: '',
receivableMoney: '' receivableMoney: ''
} }
this.projectmoney = 0
this.receivableMoney = '' this.receivableMoney = ''
this.customerId = null this.customerId = null
this.salePersonId = null this.salePersonId = null
@ -2594,6 +2702,7 @@ export default {
} }
delete this.personalForm.saleOutRetreatVos delete this.personalForm.saleOutRetreatVos
delete this.personalForm.saleOutDetailVos delete this.personalForm.saleOutDetailVos
delete this.personalForm.saleOutItems
delete this.personalForm.approvalUseVos delete this.personalForm.approvalUseVos
delete this.personalForm.saleOutGiftVos delete this.personalForm.saleOutGiftVos
delete this.personalForm.judgeStat delete this.personalForm.judgeStat
@ -2888,8 +2997,11 @@ export default {
const parms = JSON.stringify(Data) const parms = JSON.stringify(Data)
const returndata = this.$refs.editable3.getRecords() const returndata = this.$refs.editable3.getRecords()
const parms4 = JSON.stringify(returndata) const parms4 = JSON.stringify(returndata)
const itemdata = this.$refs.editable4.getRecords()
const parms5 = JSON.stringify(itemdata)
console.log('parms4', parms4) console.log('parms4', parms4)
updatesaleOut(parms, parms2, parms3, this.personalForm.receivableMoney2, parms4).then(res => { updatesaleOut(parms, parms2, parms3, this.personalForm.receivableMoney2, parms4, parms5).then(res => {
if (res.data.ret === 200) { if (res.data.ret === 200) {
this.$notify({ this.$notify({
title: this.$t('prompt.czcg'), title: this.$t('prompt.czcg'),
@ -2900,7 +3012,7 @@ export default {
}) })
this.$emit('rest', true) this.$emit('rest', true)
this.$refs.editable.clear() this.$refs.editable.clear()
// this.$refs.editable2.clear() // this.$refs.editable4.clear()
this.$refs.personalForm.clearValidate() this.$refs.personalForm.clearValidate()
this.$refs.personalForm.resetFields() this.$refs.personalForm.resetFields()
this.$refs.personalForm2.clearValidate() this.$refs.personalForm2.clearValidate()

View file

@ -0,0 +1,290 @@
<template>
<el-dialog :visible.sync="productVisible" :control="control" :close-on-press-escape="false" :title="$t('update4.wxxm')" top="10px" append-to-body @close="$emit('update:control', false)">
<div class="filter-container">
<!-- 搜索条件栏目 -->
<el-input v-model="getemplist.productType" :placeholder="$t('Product.code')" class="filter-item" clearable @keyup.enter.native="handleFilter"/>
<!-- 搜索按钮 -->
<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"
ref="multipleTable"
:height="tableHeight"
:key="tableKey"
:data="list"
:row-key="getRowKeys"
size="small"
border
fit
highlight-current-row
style="width: 100%;"
@selection-change="handleSelectionChange">
<el-table-column
:reserve-selection="true"
type="selection"
width="55"
align="center"/>
<el-table-column :label="$t('repair.SerialNumber')" :resizable="false" prop="id" align="center" min-width="80">
<template slot-scope="scope">
<span>{{ scope.row.id }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('repair.itemName')" :resizable="false" prop="name" min-width="200px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.name }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('repair.model')" :resizable="false" align="center" prop="productType" min-width="80px">
<template slot-scope="scope">
<span>{{ scope.row.productType }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('repair.price2')" :resizable="false" prop="price" min-width="80px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.price }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('otherlanguage.fbdkh')" :resizable="false" prop="price" min-width="80px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.otherPrice }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('repair.Description2')" :resizable="false" prop="description" min-width="110px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.description }}</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">
<div style="padding-top: 10px; text-align: left;">{{ $t('update4.yxz') }}{{ tiaoshu }}{{ $t('update4.tiao') }} </div>
<el-button v-waves type="success" style="text-align: center;" @click="handleAddTo">{{ $t('Hmodule.sure') }}</el-button>
</span>
</el-dialog>
</template>
<script>
import { repairprojectList, editrepairproject, deleterepairproject, producttype, addrepairproject } from '@/api/repair'
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
// eslint-disable-next-line no-unused-vars
var _that
export default {
directives: { waves },
components: { MyTree, MySupplier, Pagination },
filters: {
genderFilter(status) {
const statusMap = {
1: '男',
2: '女'
}
return statusMap[status]
}
},
props: {
control: {
type: Boolean,
default: false
},
personalform: {
type: Object,
default: null
}
},
data() {
return {
tiaoshu: 0,
tableHeight: 200,
getRowKeys(row) {
return row.code
},
select_orderId: [],
select_order_number: [],
//
query: this.personalform,
//
supplierid: '',
//
empcontrol: false,
//
types: [],
//
treecontrol: false,
//
categoryid: '',
//
productVisible: this.control,
//
visible2: false,
//
moreaction: '',
//
list: [],
//
total: 0,
//
tableKey: 0,
//
listLoading: true,
//
getemplist: {
pagenum: 1,
pagesize: 10,
productType: ''
},
//
queryemplist: {
pagenum: 1,
pagesize: 10,
repositoryId: 0
},
// id11
detailList: {
pagenum: 1,
pagesize: 10
}
}
},
watch: {
control() {
this.productVisible = this.control
// console.log(this.control)
this.tableKey = 0
this.getlist()
setTimeout(() => {
this.tableHeight = window.innerHeight - this.$refs.multipleTable.$el.offsetTop - 180
}, 100)
},
personalform() {
this.query = this.personalform
}
},
beforeCreate() {
_that = this
},
methods: {
getlist() {
this.list = []
//
this.listLoading = true
repairprojectList(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)
})
// querycount(this.queryemplist).then(res => {
// if (res.data.ret === 200) {
// const result = res.data.data.content.list
// for (const i in result) {
// this.detailList.code = result[i].code
// productlist(this.detailList).then(res => {
// this.list.push(res.data.data.content.list[0])
// console.log(this.list)
// })
// }
// this.listLoading = false
// }
// })
//
},
restFilter() {
this.categoryid = ''
this.getemplist.categoryid = ''
},
restFilter2() {
this.supplierid = ''
this.getemplist.supplierid = ''
},
//
handleFilter() {
this.getemplist.pagenum = 1
repairprojectList(this.getemplist).then(res => {
if (res.data.ret === 200) {
console.log(res.data.data.content.list)
this.list = res.data.data.content.list
this.total = res.data.data.content.totalCount
// this.restFilter()
}
})
},
//
handleSelectionChange(rows) {
this.moreaction = rows
this.tiaoshu = this.moreaction.length
this.select_order_number = this.moreaction.length
this.select_orderId = []
if (rows) {
rows.forEach(row => {
if (row) {
this.select_orderId.push(row.code)
}
})
}
},
// 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.productVisible = false
},
//
handleAddTo() {
this.productVisible = false
console.log(this.moreaction)
const productDetail = this.moreaction
this.$refs.multipleTable.clearSelection()
// console.log(productDetail)
this.$emit('product2', 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

@ -161,8 +161,8 @@ export default {
}, },
filterno(status) { filterno(status) {
const statusMap = { const statusMap = {
1: '老客户', 1: _that.$t('update4.bdkh'),
2: '新客户' 2: _that.$t('update4.fbdkh')
} }
return statusMap[status] return statusMap[status]
} }

View file

@ -169,8 +169,8 @@ export default {
}, },
filterno(status) { filterno(status) {
const statusMap = { const statusMap = {
1: '老客户', 1: _that.$t('update4.bdkh'),
2: '新客户' 2: _that.$t('update4.fbdkh')
} }
return statusMap[status] return statusMap[status]
} }

View file

@ -165,8 +165,8 @@ export default {
}, },
filterno(status) { filterno(status) {
const statusMap = { const statusMap = {
1: '老客户', 1: _that.$t('update4.bdkh'),
2: '新客户' 2: _that.$t('update4.fbdkh')
} }
return statusMap[status] return statusMap[status]
} }

View file

@ -174,8 +174,8 @@ export default {
}, },
filterno(status) { filterno(status) {
const statusMap = { const statusMap = {
1: '老客户', 1: _that.$t('update4.bdkh'),
2: '新客户' 2: _that.$t('update4.fbdkh')
} }
return statusMap[status] return statusMap[status]
} }

View file

@ -161,8 +161,8 @@ export default {
}, },
filterno(status) { filterno(status) {
const statusMap = { const statusMap = {
1: '老客户', 1: _that.$t('update4.bdkh'),
2: '新客户' 2: _that.$t('update4.fbdkh')
} }
return statusMap[status] return statusMap[status]
} }

View file

@ -169,8 +169,8 @@ export default {
}, },
filterno(status) { filterno(status) {
const statusMap = { const statusMap = {
1: '老客户', 1: _that.$t('update4.bdkh'),
2: '新客户' 2: _that.$t('update4.fbdkh')
} }
return statusMap[status] return statusMap[status]
} }

View file

@ -146,7 +146,7 @@
<el-editable-column :label="$t('Hmodule.xh')" min-width="55" align="center" type="index"/> <el-editable-column :label="$t('Hmodule.xh')" min-width="55" align="center" type="index"/>
<el-editable-column v-if="personalForm.sourceType === '1' || personalForm.sourceType === '3'" :label="$t('Hmodule.hw')" prop="locationName" align="center" min-width="150px"/> <el-editable-column v-if="personalForm.sourceType === '1' || personalForm.sourceType === '3'" :label="$t('Hmodule.hw')" prop="locationName" align="center" min-width="150px"/>
<el-editable-column v-if="personalForm.sourceType === '1' || personalForm.sourceType === '3'" :label="$t('Hmodule.pc')" prop="batch" align="center" min-width="150px"/> <el-editable-column v-if="personalForm.sourceType === '1' || personalForm.sourceType === '3'" :label="$t('Hmodule.pc')" prop="batch" align="center" min-width="150px"/>
<el-editable-column v-if="personalForm.sourceType === '2'" :edit-render="{type: 'visible'}" :label="$t('Hmodule.hw')" prop="locationId" align="center" min-width="170px"> <el-editable-column v-if="personalForm.sourceType === '2'" :edit-render="{name: 'ElSelect', type: 'default'}" :label="$t('Hmodule.hw')" prop="locationId" align="center" min-width="170px">
<template slot="edit" slot-scope="scope"> <template slot="edit" slot-scope="scope">
<el-select v-model="scope.row.locationId" :value="scope.row.locationId" :placeholder="$t('Hmodule.xzhw')" filterable clearable style="margin-left: 18px;width: 100%;margin-bottom: 0" @visible-change="updatebatch($event,scope)" @change="$refs.editable.updateStatus(scope)"> <el-select v-model="scope.row.locationId" :value="scope.row.locationId" :placeholder="$t('Hmodule.xzhw')" filterable clearable style="margin-left: 18px;width: 100%;margin-bottom: 0" @visible-change="updatebatch($event,scope)" @change="$refs.editable.updateStatus(scope)">
<el-option <el-option

View file

@ -164,8 +164,8 @@ export default {
}, },
filterno(status) { filterno(status) {
const statusMap = { const statusMap = {
1: '老客户', 1: _that.$t('update4.bdkh'),
2: '新客户' 2: _that.$t('update4.fbdkh')
} }
return statusMap[status] return statusMap[status]
} }

View file

@ -172,8 +172,8 @@ export default {
}, },
filterno(status) { filterno(status) {
const statusMap = { const statusMap = {
1: '老客户', 1: _that.$t('update4.bdkh'),
2: '新客户' 2: _that.$t('update4.fbdkh')
} }
return statusMap[status] return statusMap[status]
} }

View file

@ -140,7 +140,7 @@
<el-editable-column :label="$t('Hmodule.xh')" min-width="55" align="center" type="index"/> <el-editable-column :label="$t('Hmodule.xh')" min-width="55" align="center" type="index"/>
<el-editable-column v-if="personalForm.sourceType === '1'" :label="$t('Hmodule.hw')" prop="locationName" align="center" min-width="150px"/> <el-editable-column v-if="personalForm.sourceType === '1'" :label="$t('Hmodule.hw')" prop="locationName" align="center" min-width="150px"/>
<el-editable-column v-if="personalForm.sourceType === '1'" :label="$t('Hmodule.pc')" prop="batch" align="center" min-width="150px"/> <el-editable-column v-if="personalForm.sourceType === '1'" :label="$t('Hmodule.pc')" prop="batch" align="center" min-width="150px"/>
<el-editable-column v-if="personalForm.sourceType === '2'" :edit-render="{type: 'visible'}" :label="$t('Hmodule.hw')" prop="locationId" align="center" min-width="170px"> <el-editable-column v-if="personalForm.sourceType === '2'" :edit-render="{name: 'ElSelect', type: 'default'}" :label="$t('Hmodule.hw')" prop="locationId" align="center" min-width="170px">
<template slot="edit" slot-scope="scope"> <template slot="edit" slot-scope="scope">
<el-select v-model="scope.row.locationId" :value="scope.row.locationId" :placeholder="$t('Hmodule.xzhw')" filterable clearable style="width: 100%;" @visible-change="updatebatch($event,scope)" @change="$refs.editable.updateStatus(scope)"> <el-select v-model="scope.row.locationId" :value="scope.row.locationId" :placeholder="$t('Hmodule.xzhw')" filterable clearable style="width: 100%;" @visible-change="updatebatch($event,scope)" @change="$refs.editable.updateStatus(scope)">
<el-option <el-option

View file

@ -161,8 +161,8 @@ export default {
}, },
filterno(status) { filterno(status) {
const statusMap = { const statusMap = {
1: '老客户', 1: _that.$t('update4.bdkh'),
2: '新客户' 2: _that.$t('update4.fbdkh')
} }
return statusMap[status] return statusMap[status]
} }

View file

@ -169,8 +169,8 @@ export default {
}, },
filterno(status) { filterno(status) {
const statusMap = { const statusMap = {
1: '老客户', 1: _that.$t('update4.bdkh'),
2: '新客户' 2: _that.$t('update4.fbdkh')
} }
return statusMap[status] return statusMap[status]
} }

View file

@ -161,8 +161,8 @@ export default {
}, },
filterno(status) { filterno(status) {
const statusMap = { const statusMap = {
1: '老客户', 1: _that.$t('update4.bdkh'),
2: '新客户' 2: _that.$t('update4.fbdkh')
} }
return statusMap[status] return statusMap[status]
} }

View file

@ -169,8 +169,8 @@ export default {
}, },
filterno(status) { filterno(status) {
const statusMap = { const statusMap = {
1: '老客户', 1: _that.$t('update4.bdkh'),
2: '新客户' 2: _that.$t('update4.fbdkh')
} }
return statusMap[status] return statusMap[status]
} }

View file

@ -625,7 +625,6 @@ export default {
} }
}, },
planQuantity(row) { planQuantity(row) {
console.log('行', row)
if (row.planQuantity !== null && row.planQuantity !== '' && row.planQuantity !== undefined) { if (row.planQuantity !== null && row.planQuantity !== '' && row.planQuantity !== undefined) {
return Number(row.planQuantity).toFixed(6) return Number(row.planQuantity).toFixed(6)
} else { } else {
@ -725,8 +724,9 @@ export default {
for (let i = scope.row.temp; i < this.list2.length; i++) { for (let i = scope.row.temp; i < this.list2.length; i++) {
console.log(this.list2[i].requireDate) console.log(this.list2[i].requireDate)
if (this.list2[i].planDeliveryDate !== null && this.list2[i].planDeliveryDate !== '' && this.list2[i].planDeliveryDate !== undefined) { if (this.list2[i].planDeliveryDate !== null && this.list2[i].planDeliveryDate !== '' && this.list2[i].planDeliveryDate !== undefined) {
console.log(111) // console.log(111)
this.list2[i].planDeliveryDate = scope.row.planDeliveryDate // this.list2[i].planDeliveryDate = scope.row.planDeliveryDate
continue
} else { } else {
console.log(222) console.log(222)
this.list2[i].planDeliveryDate = scope.row.planDeliveryDate this.list2[i].planDeliveryDate = scope.row.planDeliveryDate
@ -747,7 +747,7 @@ export default {
newparms.supplierName = suppdata.data.data.content[i].supplierName newparms.supplierName = suppdata.data.data.content[i].supplierName
newparms.supplierId = suppdata.data.data.content[i].supplierId newparms.supplierId = suppdata.data.data.content[i].supplierId
newparms.planQuantity = suppdata.data.data.content[i].quantity newparms.planQuantity = suppdata.data.data.content[i].quantity
this.$refs.editable.insertAt(newparms) this.$refs.editable.insertAt(newparms, -1)
} }
this.$refs.editable.remove(scope.row) this.$refs.editable.remove(scope.row)
} }

View file

@ -100,7 +100,7 @@
@selection-change="handleSelectionChange"> @selection-change="handleSelectionChange">
<el-editable-column type="selection" width="55" align="center"/> <el-editable-column type="selection" width="55" align="center"/>
<el-editable-column label="编号" width="55" align="center" type="index"/> <el-editable-column label="编号" width="55" align="center" type="index"/>
<el-editable-column :edit-render="{type: 'default'}" :label="$t('Hmodule.hw')" prop="locationId" align="center" width="200px"> <el-editable-column :edit-render="{name: 'ElSelect', type: 'default'}" :label="$t('Hmodule.hw')" prop="locationId" align="center" width="200px">
<template slot-scope="scope"> <template slot-scope="scope">
<el-select v-model="scope.row.locationId" :value="scope.row.locationId" :placeholder="$t('Hmodule.xzhw')" filterable clearable style="margin-left: 18px;width: 100%;margin-bottom: 0" @visible-change="updatebatch($event,scope)"> <el-select v-model="scope.row.locationId" :value="scope.row.locationId" :placeholder="$t('Hmodule.xzhw')" filterable clearable style="margin-left: 18px;width: 100%;margin-bottom: 0" @visible-change="updatebatch($event,scope)">
<el-option <el-option

View file

@ -95,7 +95,7 @@
@selection-change="handleSelectionChange"> @selection-change="handleSelectionChange">
<el-editable-column type="selection" width="55" align="center"/> <el-editable-column type="selection" width="55" align="center"/>
<el-editable-column label="编号" width="55" align="center" type="index"/> <el-editable-column label="编号" width="55" align="center" type="index"/>
<el-editable-column :edit-render="{type: 'default'}" :label="$t('Hmodule.hw')" prop="locationId" align="center" width="200px"> <el-editable-column :edit-render="{name: 'ElSelect', type: 'default'}" :label="$t('Hmodule.hw')" prop="locationId" align="center" width="200px">
<template slot-scope="scope" edit="scope"> <template slot-scope="scope" edit="scope">
<el-select v-model="scope.row.locationId" :value="scope.row.locationId" :placeholder="$t('Hmodule.xzhw')" filterable clearable style="margin-left: 18px;width: 100%;margin-bottom: 0" @visible-change="updatebatch($event,scope)" @change="changelocation(scope.row)"> <el-select v-model="scope.row.locationId" :value="scope.row.locationId" :placeholder="$t('Hmodule.xzhw')" filterable clearable style="margin-left: 18px;width: 100%;margin-bottom: 0" @visible-change="updatebatch($event,scope)" @change="changelocation(scope.row)">
<el-option <el-option

View file

@ -126,7 +126,7 @@
<el-editable-column type="index" align="center" fixed label="编号" width="150px" /> <el-editable-column type="index" align="center" fixed label="编号" width="150px" />
<el-editable-column :label="$t('Hmodule.wpbh')" prop="productCode" fixed align="center" width="150px"/> <el-editable-column :label="$t('Hmodule.wpbh')" prop="productCode" fixed align="center" width="150px"/>
<el-editable-column :label="$t('Hmodule.wpmc')" prop="productName" fixed align="center" width="150px"/> <el-editable-column :label="$t('Hmodule.wpmc')" prop="productName" fixed align="center" width="150px"/>
<el-editable-column :edit-render="{type: 'default'}" :label="$t('Hmodule.hw')" prop="locationId" align="center" width="200px"> <el-editable-column :edit-render="{name: 'ElSelect', type: 'default'}" :label="$t('Hmodule.hw')" prop="locationId" align="center" width="200px">
<!-- <template slot="edit" slot-scope="scope">--> <!-- <template slot="edit" slot-scope="scope">-->
<!-- <el-select v-model="scope.row.locationCode" :value="scope.row.locationCode" :placeholder="$t('Hmodule.xzhw')" filterable clearable style="margin-left: 18px;width: 100%;margin-bottom: 0" @visible-change="updatebatch($event,scope)">--> <!-- <el-select v-model="scope.row.locationCode" :value="scope.row.locationCode" :placeholder="$t('Hmodule.xzhw')" filterable clearable style="margin-left: 18px;width: 100%;margin-bottom: 0" @visible-change="updatebatch($event,scope)">-->
<!-- <el-option--> <!-- <el-option-->

View file

@ -122,7 +122,7 @@
</template> </template>
</el-editable-column> </el-editable-column>
<el-editable-column :label="$t('Hmodule.wpmc')" prop="productName" fixed align="center" width="150px"/> <el-editable-column :label="$t('Hmodule.wpmc')" prop="productName" fixed align="center" width="150px"/>
<el-editable-column :edit-render="{type: 'default'}" :label="$t('Hmodule.hw')" prop="locationId" align="center" width="200px"> <el-editable-column :edit-render="{name: 'ElSelect', type: 'default'}" :label="$t('Hmodule.hw')" prop="locationId" align="center" width="200px">
<template slot-scope="scope"> <template slot-scope="scope">
<el-select v-model="scope.row.locationId" :value="scope.row.locationId" :placeholder="$t('Hmodule.xzhw')" filterable clearable style="width: 100%;" @visible-change="updatebatch($event,scope)"> <el-select v-model="scope.row.locationId" :value="scope.row.locationId" :placeholder="$t('Hmodule.xzhw')" filterable clearable style="width: 100%;" @visible-change="updatebatch($event,scope)">
<el-option <el-option

View file

@ -89,7 +89,7 @@
style="width: 100%"> style="width: 100%">
<el-editable-column type="selection" width="55" align="center"/> <el-editable-column type="selection" width="55" align="center"/>
<el-editable-column label="编号" width="55" align="center" type="index"/> <el-editable-column label="编号" width="55" align="center" type="index"/>
<el-editable-column :edit-render="{type: 'default'}" :label="$t('Hmodule.hw')" prop="locationId" align="center" width="200px"> <el-editable-column :edit-render="{name: 'ElSelect', type: 'default'}" :label="$t('Hmodule.hw')" prop="locationId" align="center" width="200px">
<template slot-scope="scope"> <template slot-scope="scope">
<el-select v-model="scope.row.locationId" :value="scope.row.locationId" :placeholder="$t('Hmodule.xzhw')" filterable clearable style="width: 100%;" @visible-change="updatebatch($event,scope)"> <el-select v-model="scope.row.locationId" :value="scope.row.locationId" :placeholder="$t('Hmodule.xzhw')" filterable clearable style="width: 100%;" @visible-change="updatebatch($event,scope)">
<el-option <el-option

View file

@ -96,7 +96,7 @@
style="width: 100%"> style="width: 100%">
<el-editable-column type="selection" width="55" align="center"/> <el-editable-column type="selection" width="55" align="center"/>
<el-editable-column label="编号" width="55" align="center" type="index"/> <el-editable-column label="编号" width="55" align="center" type="index"/>
<el-editable-column :edit-render="{type: 'default'}" :label="$t('Hmodule.hw')" prop="locationId" align="center" width="200px"> <el-editable-column :edit-render="{name: 'ElSelect', type: 'default'}" :label="$t('Hmodule.hw')" prop="locationId" align="center" width="200px">
<template slot-scope="scope"> <template slot-scope="scope">
<el-select v-model="scope.row.locationId" :value="scope.row.locationId" :placeholder="$t('Hmodule.xzhw')" filterable clearable style="width: 100%;" @visible-change="updatebatch($event,scope)"> <el-select v-model="scope.row.locationId" :value="scope.row.locationId" :placeholder="$t('Hmodule.xzhw')" filterable clearable style="width: 100%;" @visible-change="updatebatch($event,scope)">
<el-option <el-option

View file

@ -209,7 +209,7 @@
<el-editable-column label="编号" width="55" align="center" type="index"/> <el-editable-column label="编号" width="55" align="center" type="index"/>
<el-editable-column :label="$t('Hmodule.wpbh')" prop="productCode" align="center" width="150px"/> <el-editable-column :label="$t('Hmodule.wpbh')" prop="productCode" align="center" width="150px"/>
<el-editable-column :label="$t('Hmodule.wpmc')" prop="productName" align="center" width="150px"/> <el-editable-column :label="$t('Hmodule.wpmc')" prop="productName" align="center" width="150px"/>
<el-editable-column :edit-render="{name: 'ElInput', type: 'visible'}" :label="$t('Hmodule.hw')" prop="locationName" align="center" min-width="150"> <el-editable-column :edit-render="{name: 'ElSelect', type: 'default'}" :label="$t('Hmodule.hw')" prop="locationName" align="center" min-width="150">
<template slot="edit" slot-scope="scope"> <template slot="edit" slot-scope="scope">
<el-select v-if="isEdit(scope.row)" v-model="scope.row.locationId" :value="scope.row.locationId" :disabled="scope.row.stat === 2" :placeholder="$t('Hmodule.xzhw')" filterable style="width: 100%;" @visible-change="updatelocaltion($event,scope)" @change="test($event,scope.row)"> <el-select v-if="isEdit(scope.row)" v-model="scope.row.locationId" :value="scope.row.locationId" :disabled="scope.row.stat === 2" :placeholder="$t('Hmodule.xzhw')" filterable style="width: 100%;" @visible-change="updatelocaltion($event,scope)" @change="test($event,scope.row)">
<el-option <el-option

View file

@ -186,7 +186,7 @@
<p>{{ getLocationData(scope.row) }}</p> <p>{{ getLocationData(scope.row) }}</p>
</template> </template>
</el-editable-column> </el-editable-column>
<el-editable-column :edit-render="{name: 'ElInput', type: 'visible'}" :label="$t('Hmodule.pc')" prop="batch" align="center" min-width="250" > <el-editable-column :edit-render="{name: 'ElSelect', type: 'visible'}" :label="$t('Hmodule.pc')" prop="batch" align="center" min-width="250" >
<template slot="edit" slot-scope="scope"> <template slot="edit" slot-scope="scope">
<el-select v-if="scope.row.batch !== '不使用'" v-model="scope.row.batch" :value="scope.row.batch" :disabled="scope.row.stat === 2" :placeholder="$t('Hmodule.xcpc')" filterable style="width: 100%;" @visible-change="updatebatch2($event,scope)"> <el-select v-if="scope.row.batch !== '不使用'" v-model="scope.row.batch" :value="scope.row.batch" :disabled="scope.row.stat === 2" :placeholder="$t('Hmodule.xcpc')" filterable style="width: 100%;" @visible-change="updatebatch2($event,scope)">
<el-option <el-option

View file

@ -161,8 +161,8 @@ export default {
}, },
filterno(status) { filterno(status) {
const statusMap = { const statusMap = {
1: '老客户', 1: _that.$t('update4.bdkh'),
2: '新客户' 2: _that.$t('update4.fbdkh')
} }
return statusMap[status] return statusMap[status]
} }

View file

@ -169,8 +169,8 @@ export default {
}, },
filterno(status) { filterno(status) {
const statusMap = { const statusMap = {
1: '老客户', 1: _that.$t('update4.bdkh'),
2: '新客户' 2: _that.$t('update4.fbdkh')
} }
return statusMap[status] return statusMap[status]
} }

Some files were not shown because too many files have changed in this diff Show more