新购各模块相关问题自测修改

This commit is contained in:
FrancisHu 2024-08-28 17:54:27 +08:00
parent fae739066f
commit e71d449f50
17 changed files with 187 additions and 91 deletions

View File

@ -45,6 +45,7 @@
:options="item.f_selList"
:props="item.optionProps"
:show-all-levels="false"
clearable
@change="handleCasAdd($event, item.f_model, cascaderFunc, extraTableProp)"
style="width: 240px"
/>
@ -64,6 +65,16 @@
value-format="yyyy-MM-dd"
type="date"
/>
<el-date-picker
v-if="item.f_type === 'dateRange'"
v-model="queryParams[item.f_model]"
style="width: 240px"
type="daterange"
value-format="yyyy-MM-dd"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
/>
<el-input-number
v-if="item.f_type === 'num'"
v-model="queryParams[item.f_model]"
@ -331,6 +342,12 @@ export default {
methods: {
/** 获取列表数据 */
async getTableList() {
if(this.queryParams.time && this.queryParams.time.length !== 0) {
this.queryParams.startTime = this.queryParams.time[0]
this.queryParams.endTime = this.queryParams.time[1]
delete this.queryParams.time
}
console.log(this.queryParams)
if(Object.keys(this.formRules).length !== 0) {
this.$refs.queryFormRef.validate(async valid => {
if (valid) {
@ -393,6 +410,7 @@ export default {
func,
prop
) {
if(e.length !== 0) {
this.queryParams[val] = e[e.length - 1]
let setObj = {}
//
@ -400,8 +418,8 @@ export default {
Object.assign(setObj, prop)
}
// id
/* this.$set(setObj, 'id', this.idCount)
this.idCount++ */
this.$set(setObj, 'id', this.idCount)
this.idCount++
//
func({
id: e[e.length - 1]
@ -415,6 +433,7 @@ export default {
}
this.tableList.unshift(setObj)
console.log(this.tableList)
}
},
/** 动态设置操作列的列宽 */
getOperatorWidth() {

View File

@ -182,7 +182,7 @@ export function download(url, params, filename, config) {
transformRequest: [(params) => {
return tansParams(params)
}],
headers: { 'Content-Type': 'application/x-www-form-urlencoded', encryptResponse: false},
headers: { 'Content-Type': 'application/x-www-form-urlencoded', encryptResponse: false },
responseType: 'blob',
...config
}).then(async(data) => {

View File

@ -1,6 +1,6 @@
export const formLabel = [
{ f_label: '工程名称', f_model: 'name', f_type: 'ipt' },
{ f_label: '工程名称', f_model: 'keyWord', f_type: 'ipt' },
]
export const columnsList = [
{ t_props: 'name', t_label: '工程项目名称', },

View File

@ -13,7 +13,13 @@
<el-button type="primary" @click="handleAddData()"
>新建</el-button
>
<el-button @click="handleExportData(exportList, 'base/project/export', '工程清单', queryParams)"
<el-button
@click="handleExportData(
exportList,
'base/project/export',
'工程清单',
queryParams
)"
>导出</el-button
>
</template>

View File

@ -13,7 +13,7 @@
@transIdList="getIdList"
>
<template slot="btn" slot-scope="{ queryParams }">
<el-button type="primary" @click="save"
<el-button type="primary" @click="save(queryParams)"
>保存</el-button>
<!-- <el-button @click="handleExportData(queryParams, 'base/agreement/export', '物资清单')"
>导出</el-button>-->
@ -115,6 +115,9 @@ import {
queryPurchaseArrivalListApi,
addArrivalApi
} from '@/api/purchase/arrival'
import {
queryPurchaseArrivalListInnerApi
} from '@/api/purchase/arrival'
import ReportManage from '../components/report-manage.vue'
export default {
name: 'AddArrival',
@ -128,10 +131,30 @@ export default {
sendCascader: {
type: Array,
default: () => null
},
sendParams: {
type: Object,
default: () => null
}
},
created() {
// console.log(this.sendRange)
console.log(this.sendParams)
if(this.sendParams) {
queryPurchaseArrivalListInnerApi({
taskId: this.sendParams.id
}).then(res => {
console.log(res)
res.rows.forEach(item => {
//
item.notaxPrice = item.notaxPrice / 100
item.purchasePrice = item.purchasePrice / 100
item.purchaseNum = item.purchaseNum / 1000
item.name = item.materialName
item.typeName = item.materialModel
this.$refs.tableRef.tableList.push(item)
})
})
}
},
mounted() {
@ -155,9 +178,7 @@ export default {
extraProp: {
purchasePrice: '',
notaxPrice: ''
},
storageDex: 1000,
priceDex: 100
}
}
},
methods: {
@ -166,35 +187,37 @@ export default {
getIdList(idList) {
this.exportList = idList
},
//
/** 删除机具 */
delMa(data) {
this.$modal
.confirm('是否确认删除所选择的数据项?')
.then(() => {
this.$refs.tableRef.tableList.forEach((item, index) => {
if(item.type === data.type) {
if(item.id === data.id) {
this.$refs.tableRef.tableList.splice(index, 1)
}
})
})
.catch(() => {})
},
save() {
/** 保存机具 */
save(params) {
console.log(params, '表单参数')
if(this.exportList.length === 0) {
this.$modal.msgError('请选择需要保存的机具')
} else {
this.exportList.forEach(item => {
item.purchaseNum = item.purchaseNum * this.storageDex
item.purchasePrice = item.purchasePrice * this.priceDex
item.notaxPrice = item.notaxPrice * this.priceDex
item.purchaseNum = item.purchaseNum * 1000
item.purchasePrice = item.purchasePrice * 100
item.notaxPrice = item.notaxPrice * 100
})
let subObj = {
arrivalTime: this.exportList[0].arrivalTime,
arrivalTime: params.arrivalTime,
// supplierId: this.exportList[0].supplierId,
productDate: this.exportList[0].productDate,
productDate: params.productDate,
// taxRate: this.exportList[0].taxRate,
// typeId: this.exportList[0].typeId,
remark: this.exportList[0].remark,
remark: params.remark,
bpmPurchaseDetailsList: this.exportList
}
//
@ -202,9 +225,9 @@ export default {
console.log(res)
this.$modal.msgSuccess('保存成功')
this.$refs.tableRef.tableList.forEach(item => {
item.purchaseNum = item.purchaseNum / this.storageDex
item.purchasePrice = item.purchasePrice / this.priceDex
item.notaxPrice = item.notaxPrice / this.priceDex
item.purchaseNum = item.purchaseNum / 1000
item.purchasePrice = item.purchasePrice / 100
item.notaxPrice = item.notaxPrice / 100
})
// this.$refs.tableRef.getTableList()
}).catch(err => {})

View File

@ -12,7 +12,11 @@
>
</TableModel>
<div style="margin-top: 50px; display: flex; justify-content: right">
<el-button type="primary" size="mini">添加</el-button>
<el-button
type="primary"
size="mini"
@click="addNoticePerson"
>添加</el-button>
</div>
</div>
</template>
@ -42,7 +46,8 @@ export default {
{ t_props: 'deptName', t_label: '所属机构' },
{ t_props: 'userRole', t_label: '角色', },
{ t_props: 'phone', t_label: '联系电话', t_width: '150px' },
]
],
userList: []
}
},
computed: {
@ -51,7 +56,15 @@ export default {
methods: {
queryAllPersonList,
getIdList(idList) {
console.log(idList)
this.userList = idList
},
addNoticePerson() {
let sendUserList = []
this.userList.forEach(item => {
sendUserList.push(item.userId)
})
//
}
},
}

View File

@ -82,7 +82,7 @@ export default {
components: { TableNoticeAdd },
created() {
console.log(this.editParams)
this.transObj = { ['taskId']: this.editParams['id'] }
this.transObj = { taskId: this.editParams.id }
this.noticeIpt = `各位同事您好请于2023-11-22在2号库进行机具验收。验收内容如下机具类型${this.editParams.purchaseMaterial}
`
},

View File

@ -8,7 +8,7 @@ export const formLabelAdd = [
{ f_label: '出厂日期', f_model: 'productDate', f_type: 'date' },
{ f_label: '税率', f_model: 'taxRate', f_type: 'num' },
{ f_label: '类型规格', f_model: 'keyWord', f_type: 'ipt' },
{ f_label: '备注', f_model: 'keyWord', f_type: 'ipt' },
{ f_label: '备注', f_model: 'remark', f_type: 'ipt' },
]
export const columnsListAdd = [
{ t_props: 'name', t_label: '物资名称', },

View File

@ -4,7 +4,8 @@ import {
export const queryStatusSelData = () => {
queryStatusSelApi().then(res => {
formLabel[3].f_selList = res.data.data.map(item => {
console.log(res.data.data)
formLabel[2].f_selList = res.data.data.map(item => {
return {
label: item.dictLabel,
value: item.dictCode
@ -14,8 +15,7 @@ export const queryStatusSelData = () => {
}
export const formLabel = [
{ f_label: '开始时间', f_model: 'startTime', f_type: 'date' },
{ f_label: '结束时间', f_model: 'endTime', f_type: 'date' },
{ f_label: '日期范围', f_model: 'time', f_type: 'dateRange' },
{ f_label: '关键字', f_model: 'keyWord', f_type: 'ipt' },
{ f_label: '状态', f_model: 'status', f_type: 'sel', f_selList: [] },
]

View File

@ -15,7 +15,7 @@
v-if="isShowComponent === 'Index'"
>
<template slot="btn" slot-scope="{ queryParams }">
<el-button type="primary" @click="isShowComponent = 'add-arrival'"
<el-button type="primary" @click="addArrival"
>设备到货新增</el-button
>
<el-button @click="handleExportData(queryParams, 'base/masupplier/export', '物资厂家清单')"
@ -41,7 +41,8 @@
<el-button
type="primary"
size="mini"
@click="handleEditData(data)"
@click="handleEdit(data)"
v-if="data.status === 47"
>编辑</el-button
>
<el-button
@ -104,6 +105,7 @@
v-if="isShowComponent === 'add-arrival'"
:send-range="factoryRange"
:send-cascader="cascaderRange"
:send-params="editParams"
>
</add-arrival>
@ -197,6 +199,7 @@ export default {
},
//
handleSubmit(id) {
this.$modal.confirm('是否确定提交').then(() => {
let idList = []
idList.push(id)
submitArrivalApi(idList).then(res => {
@ -204,9 +207,18 @@ export default {
this.$modal.msgSuccess('提交成功')
this.$refs.tableRef.getTableList()
}).catch(err => {})
})
},
goBack() {
this.isShowComponent = 'Index'
},
addArrival() {
this.editParams = undefined
this.isShowComponent = 'add-arrival'
},
handleEdit(data) {
this.editParams = data
this.isShowComponent = 'add-arrival'
}
},
data() {
@ -224,6 +236,7 @@ export default {
storageDex: 1000,
priceDex: 100,
detailParams: undefined,
editParams: undefined,
//
}

View File

@ -1,9 +1,22 @@
import {
queryStatusSelApi
} from '@/api/purchase/receive'
export const queryStatusSelData = () => {
queryStatusSelApi().then(res => {
formLabel[2].f_selList = res.data.data.map(item => {
return {
label: item.dictLabel,
value: item.dictCode
}
})
})
}
export const formLabel = [
{ f_label: '开始时间', f_model: 'startTime', f_type: 'date' },
{ f_label: '结束时间', f_model: 'endTime', f_type: 'date' },
{ f_label: '日期范围', f_model: 'time', f_type: 'dateRange' },
{ f_label: '关键字', f_model: 'keyWord', f_type: 'ipt' },
{ f_label: '状态', f_model: 'status', f_type: 'sel', f_selList: [] },
]
export const columnsList = [
{ t_props: 'arrivalTime', t_label: '到货时间', },
@ -14,7 +27,7 @@ export const columnsList = [
{ t_props: 'notaxPrice', t_label: '采购价格(不含税)', t_slot: 'notaxPrice' },
{ t_props: 'createBy', t_label: '操作人' },
{ t_props: 'createTime', t_label: '操作时间' },
{ t_props: 'statusName', t_label: '状态' },
{ t_props: 'statusName', t_label: '状态', t_slot: 'statusName' },
{ t_props: 'remark', t_label: '备注' },
]

View File

@ -54,9 +54,16 @@
</template>
<template slot="purchasePrice" slot-scope="{ data }">
{{ data.purchasePrice / 100 }}
</template><template slot="notaxPrice" slot-scope="{ data }">
</template>
<template slot="notaxPrice" slot-scope="{ data }">
{{ data.notaxPrice / 100 }}
</template>
<template slot="statusName" slot-scope="{ data }">
<span style="color: #D9001B">
{{ data.statusName }}
</span>
</template>
</TableModel>
@ -71,7 +78,7 @@
<script>
import PageHeader from '@/components/pageHeader'
import { columnsList, dialogConfig, formLabel } from './config'
import { columnsList, dialogConfig, formLabel, queryStatusSelData } from './config'
import { commonMixin } from '../mixins/common'
import ListBinding from './components/list-binding.vue'
import {
@ -83,6 +90,9 @@ export default {
name: 'arrivalBindingManage',
mixins: [commonMixin], //
components: { ListBinding, PageHeader },
created() {
queryStatusSelData()
},
methods: {
queryPurchaseBindListApi,
goBack() {

View File

@ -4,7 +4,7 @@ import {
export const queryStatusSelData = () => {
queryStatusSelApi().then(res => {
formLabel[3].f_selList = res.data.data.map(item => {
formLabel[2].f_selList = res.data.data.map(item => {
return {
label: item.dictLabel,
value: item.dictCode
@ -14,8 +14,7 @@ export const queryStatusSelData = () => {
}
export const formLabel = [
{ f_label: '开始时间', f_model: 'startTime', f_type: 'date' },
{ f_label: '结束时间', f_model: 'endTime', f_type: 'date' },
{ f_label: '日期范围', f_model: 'time', f_type: 'dateRange' },
{ f_label: '关键字', f_model: 'keyWord', f_type: 'ipt' },
{ f_label: '状态', f_model: 'status', f_type: 'sel', f_selList: [] },
]

View File

@ -173,6 +173,7 @@ export default {
},
//
confirmArrival(id) {
this.$modal.confirm('是否确认到货').then(() => {
let idList = []
idList.push(id)
//
@ -180,12 +181,14 @@ export default {
this.$modal.msgSuccess('提交成功')
this.$refs.tableRef.getTableList()
}).catch(err => {})
})
},
//
multiConfirm() {
if(this.multiConfirmList.length === 0) {
this.$modal.msgError('请选择需要批量确认的物资')
} else {
this.$modal.confirm('是否批量确认到货').then(() => {
let idList = []
this.multiConfirmList.forEach(item => {
idList.push(item.id)
@ -195,6 +198,7 @@ export default {
this.$modal.msgSuccess('提交成功')
this.$refs.tableRef.getTableList()
}).catch(err => {})
})
}
},
toggleDetail(data) {

View File

@ -27,9 +27,7 @@ export const commonMixin = {
/** 删除 */
handleDeleteData(id, method) {
this.$modal.confirm('是否确定删除').then(() => {
console.log('确定删除--', id)
method(id).then(res => {
console.log(res)
if(res.code === 200) {
this.$modal.msgSuccess('操作成功!')
this.$refs.tableRef.getTableList()

View File

@ -4,7 +4,7 @@ import {
export const queryStatusSelData = () => {
queryStatusSelApi().then(res => {
formLabel[3].f_selList = res.data.data.map(item => {
formLabel[2].f_selList = res.data.data.map(item => {
return {
label: item.dictLabel,
value: item.dictCode
@ -14,8 +14,7 @@ export const queryStatusSelData = () => {
}
export const formLabel = [
{ f_label: '开始时间', f_model: 'startTime', f_type: 'date' },
{ f_label: '结束时间', f_model: 'endTime', f_type: 'date' },
{ f_label: '日期范围', f_model: 'time', f_type: 'dateRange' },
{ f_label: '关键字', f_model: 'keyWord', f_type: 'ipt' },
{ f_label: '状态', f_model: 'status', f_type: 'sel', f_selList: [] },
]

View File

@ -4,7 +4,7 @@ import {
export const queryStatusSelData = () => {
queryStatusSelApi().then(res => {
formLabel[3].f_selList = res.data.data.map(item => {
formLabel[2].f_selList = res.data.data.map(item => {
return {
label: item.dictLabel,
value: item.dictCode
@ -14,8 +14,7 @@ export const queryStatusSelData = () => {
}
export const formLabel = [
{ f_label: '开始时间', f_model: 'startTime', f_type: 'date' },
{ f_label: '结束时间', f_model: 'endTime', f_type: 'date' },
{ f_label: '日期范围', f_model: 'time', f_type: 'dateRange' },
{ f_label: '关键字', f_model: 'keyWord', f_type: 'ipt' },
{ f_label: '状态', f_model: 'status', f_type: 'sel', f_selList: [] },
]