新购到货相关模块修改

This commit is contained in:
FrancisHu 2024-08-21 19:56:17 +08:00
parent f7e6a328b0
commit 4b65169ad2
16 changed files with 531 additions and 120 deletions

View File

@ -5,7 +5,14 @@ import request from '@/utils/request'
/** 新购到货查询 */
export const queryPurchaseArrivalListApi = (data) => {
return request.get('/purchase/bpm_purchase_info/list', {
return request.get('/task/purchase/arrival/list', {
params: data
})
}
/** 新购到货里层查询 */
export const queryPurchaseArrivalListInnerApi = (data) => {
return request.get('/task/purchase/arrival/detailsList', {
params: data
})
}
@ -19,21 +26,31 @@ export const queryFactoryListApi = (data) => {
/** 类型规格查询 */
export const queryTypeListApi = (data) => {
return request.get('/purchase/bpm_purchase_info/cascader', {
return request.get('/task/purchase/arrival/cascader', {
params: data
})
}
/** 根据value查询单位 */
export const queryMeterByVal = (data) => {
return request.get(`/purchase/bpm_purchase_info/cascaderById`, {
return request.get(`/task/purchase/arrival/cascaderById`, {
params: data
})
}
/** 提交新增到货 */
export const submitArrivalApi = (data) => {
return request.put('/task/purchase/arrival/commit', data)
}
/** 删除新增到货 */
export const delArrivalApi = (id) => {
return request.delete(`/task/purchase/arrival/delete/${id}`)
}
/** 新购到货新增 */
export const addArrivalApi = (data) => {
return request.post('/purchase/bpm_purchase_info/add', data)
return request.post('/task/purchase/arrival/add', data)
}

View File

@ -0,0 +1,50 @@
/**
* 新购确认管理页面 API
*/
import request from '@/utils/request'
/** 新购确认查询 */
export const queryPurchaseConfirmListApi = (data) => {
return request.get('/task/purchase/arrival/list', {
params: data
})
}
/** 厂家查询 */
export const queryFactoryListApi = (data) => {
return request.get('/base/maHouse/all', {
params: data
})
}
/** 类型规格查询 */
export const queryTypeListApi = (data) => {
return request.get('/task/arrival/cascader', {
params: data
})
}
/** 根据value查询单位 */
export const queryMeterByVal = (data) => {
return request.get(`/task/arrival/cascaderById`, {
params: data
})
}
/** 提交到货确认 */
export const confirmArrivalApi = (data) => {
return request.put('/task/purchase/arrival/confirm', data)
}
/** 删除新增到货 */
export const delArrivalApi = (id) => {
return request.delete(`/task/arrival/delete/${id}`, {})
}
/** 新购到货新增 */
export const addArrivalApi = (data) => {
return request.post('/task/arrival/add', data)
}

View File

@ -197,6 +197,11 @@ export default {
type: Boolean,
default: true,
},
/** 传递参数 */
sendParams: {
type: Object,
default: () => null
},
/** 是否显示查询按钮 */
showSearchBtn: {
type: Boolean,
@ -267,6 +272,7 @@ export default {
},
created() {
console.log(this.sendParams)
this.columCheckList = this.columnsList.map(e => {
this.$set(e, 'checked', true)
return e
@ -275,15 +281,23 @@ export default {
this.formLabel.map(e => {
this.$set(this.queryParams, e.f_model, '')
//
this.$set(this.formRules, e.f_rule, [
{
required: true,
message: `请填写${e.f_label}`,
trigger: 'blur'
}
])
if(e.f_rule) {
this.$set(this.formRules, e.f_rule, [
{
required: true,
message: `请填写${e.f_label}`,
trigger: 'blur'
}
])
}
})
// Object.assign(this.queryParams, this.sendParams)
if(this.sendParams !== null) {
Object.assign(this.queryParams, this.sendParams)
/* for(let key in this.sendParams) {
console.log(key, this.sendParams[key])
this.$set(this.queryParams, key, this.sendParams[key])
} */
}
this.getTableList()
},
updated() {
@ -293,10 +307,10 @@ export default {
methods: {
/** 获取列表数据 */
async getTableList() {
if(Object.keys(this.formRules).length !== 0) {
this.$refs.queryFormRef.validate(async valid => {
if (valid) {
this.loading = true
console.log(this.queryParams)
const res = await this.requestApi(this.queryParams)
this.loading = false
console.log(res, '列表数据')
@ -311,6 +325,21 @@ export default {
}
}
})
} else {
this.loading = true
const res = await this.requestApi(this.queryParams)
this.loading = false
console.log(res, '列表数据')
if (res.code === 200) {
if (res.data) {
this.tableList = res.data.rows
this.total = res.data.total
} else {
this.tableList = res.rows
this.total = res.total
}
}
}
},
/** 查询按钮 */
handleQuery() {
@ -336,7 +365,6 @@ export default {
func,
prop
) {
console.log(prop)
this.queryParams[val] = e[e.length - 1]
let setObj = {}
//
@ -344,13 +372,12 @@ 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]
}).then(res => {
console.log(res)
this.$set(setObj, 'name', res.data.parentName)
this.$set(setObj, 'unitName', res.data.unitName)
this.$set(setObj, 'typeName', res.data.name)
@ -360,7 +387,6 @@ export default {
}
this.tableList.unshift(setObj)
console.log(this.tableList)
},
/** 动态设置操作列的列宽 */
getOperatorWidth() {

View File

@ -41,6 +41,9 @@
<template slot="typeId" slot-scope="{ data }">
{{ data.typeName }}
</template>
<template slot="purchaseNum" slot-scope="{ data }">
<el-input v-model="data.purchaseNum"></el-input>
</template>
<template slot="purchasePrice" slot-scope="{ data }">
<el-input v-model="data.purchasePrice"></el-input>
</template>
@ -78,20 +81,20 @@
<template slot="files" slot-scope="{ data }">
<h5
style="color: #02A7F0; cursor: pointer; font-weight: normal"
@click="handleEditData(data)"
@click="handleEditDataArrival(data)"
>报告管理</h5>
</template>
</TableModel>
<!-- 弹框 -->
<DialogModel
:dialogConfig="dialogConfig"
@closeDialogOuter="closeDialogOuter"
:dialogConfig="dialogConfigArrival"
@closeDialogOuter="closeDialogOuterArrival"
>
<template slot="outerContent">
<!-- 新增以及修改数据的表单组件 -->
<FormArrival
@closeDialog="closeDialog"
<ReportManage
@closeDialog="closeDialogOuterArrival"
:editParams="editParams"
/>
</template>
@ -102,7 +105,7 @@
<script>
import { columnsListAdd, dialogConfigAdd } from '../config-add'
import { dialogConfig } from '../config-arrival'
import { columnsListArrival, dialogConfigArrival } from '../config-arrival'
import { commonMixin } from '../../mixins/common'
import {
queryFactoryListApi,
@ -112,10 +115,10 @@ import {
queryPurchaseArrivalListApi,
addArrivalApi
} from '@/api/purchase/arrival'
import FormArrival from '../components/form-arrival.vue'
import ReportManage from '../components/report-manage.vue'
export default {
name: 'AddArrival',
components: { FormArrival },
components: { ReportManage },
mixins: [commonMixin], //
props: {
sendRange: {
@ -143,15 +146,17 @@ export default {
{ f_label: '类型规格', f_model: 'typeId', f_type: 'selCas', f_rule: 'typeId', f_selList: this.sendCascader },
{ f_label: '备注', f_model: 'remark', f_type: 'ipt' },
],
dialogConfig,
columnsListAdd,
dialogConfigAdd,
columnsListArrival,
dialogConfigArrival,
exportList: [],
editDialogTitle: '新购验收报告管理', //
extraProp: {
purchasePrice: '',
notaxPrice: ''
},
storageDex: 1000,
priceDex: 100
}
},
@ -179,28 +184,29 @@ export default {
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.bpmPurchaseDetailsList = {
name: item.name,
typeId: item.typeId,
unitName: item.unitName,
purchasePrice: item.purchasePrice,
notaxPrice: item.notaxPrice,
taxRate: item.taxRate,
supplierId: item.supplierId,
productDate: item.productDate
}
})
console.log(this.exportList)
let subObj = {
arrivalTime: this.exportList[0].arrivalTime,
// supplierId: this.exportList[0].supplierId,
productDate: this.exportList[0].productDate,
// taxRate: this.exportList[0].taxRate,
// typeId: this.exportList[0].typeId,
remark: this.exportList[0].remark,
bpmPurchaseDetailsList: this.exportList
}
//
addArrivalApi(this.exportList).then(res => {
addArrivalApi(subObj).then(res => {
console.log(res)
this.exportList.forEach(item => {
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
})
// this.$refs.tableRef.getTableList()
}).catch(err => {})
}
}

View File

@ -1,46 +1,11 @@
<template>
<!-- 协议管理 新增编辑 表单组件 -->
<div>
<TableModel
:columnsList="columnsList"
:show-btn-crews="false"
ref="tableRef"
:show-sel="false"
>
<template slot="handle" slot-scope="{ data }">
<el-button
type="primary"
size="mini"
>查看</el-button
>
<el-button
type="danger"
size="mini"
>上传</el-button
>
</template>
<!-- <template slot="picUrl" slot-scope="{ data }">
&lt;!&ndash; <img :src="data.picUrl" style="width: 50px; height: 50px" alt="">&ndash;&gt;
<h4
style="color: #02A7F0; cursor: pointer"
v-if="data.picUrl === '' || data.picUrl === null"
@click="handleEditData(data)"
>上传</h4>
<h4
style="color: #02A7F0; cursor: pointer"
v-else
@click="openUrl(data.picUrl)"
>查看</h4>
</template>
<template slot="phone" slot-scope="{ data }">
{{ phoneCrypto(data.phone) }}
</template>-->
</TableModel>
123
</div>
</template>
<script>
import { columnsList } from '../config-arrival'
import {
fileUpLoad,
imgUpLoad
@ -61,7 +26,6 @@ export default {
},
data() {
return {
columnsList,
subSort: '', // 1 / 2
//
picList: [],

View File

@ -0,0 +1,116 @@
<template>
<!-- 协议管理 新增编辑 表单组件 -->
<div>
<TableModel
:columnsList="columnsListArrival"
:show-btn-crews="false"
ref="tableRef"
:show-sel="false"
>
<template slot="handle" slot-scope="{ data }">
<el-button
type="primary"
size="mini"
>查看</el-button
>
<el-button
type="danger"
size="mini"
>上传</el-button
>
</template>
<!-- <template slot="picUrl" slot-scope="{ data }">
&lt;!&ndash; <img :src="data.picUrl" style="width: 50px; height: 50px" alt="">&ndash;&gt;
<h4
style="color: #02A7F0; cursor: pointer"
v-if="data.picUrl === '' || data.picUrl === null"
@click="handleEditData(data)"
>上传</h4>
<h4
style="color: #02A7F0; cursor: pointer"
v-else
@click="openUrl(data.picUrl)"
>查看</h4>
</template>
<template slot="phone" slot-scope="{ data }">
{{ phoneCrypto(data.phone) }}
</template>-->
</TableModel>
</div>
</template>
<script>
import { columnsListArrival } from '../config-arrival'
import {
fileUpLoad,
imgUpLoad
} from '@/api/system/upload'
export default {
name: 'FormSupplier',
props: {
editParams: {
type: Object,
default: () => null,
},
},
created() {
},
mounted() {
console.log(this.editParams)
},
data() {
return {
columnsListArrival,
subSort: '', // 1 / 2
//
picList: [],
//
picNameList: [],
//
fileList: [],
}
},
computed: {
//1
uploadDisabled() {
return this.picList.length > 1
},
},
methods: {
/** 上传图片/文件 */
uploadData(param) {
console.log(param)
imgUpLoad(param).then(res => {
console.log(res)
this.picList.push(res.data.url)
this.picNameList.push(res.data.name.split('_')[0])
}).catch(err => {})
},
/** 移除文件 */
handleRemove(file) {
console.log(file)
console.log(this.picNameList)
this.picList = []
// this.fileList = this.fileList.filter(item => item.uid !== e.uid)
},
/** 文件超出1个 */
fileExceed() {
this.$modal.msgError('最多上传1张图片')
},
/** 确认按钮 */
onSubmit() {
},
},
}
</script>
<style scoped>
::v-deep .el-select {
width: 100%;
}
::v-deep .el-form-item__label{
font-weight: normal;
}
</style>

View File

@ -0,0 +1,124 @@
<template>
<!-- 协议管理 新增编辑 表单组件 -->
<div>
<TableModel
:columnsList="columnsListDetail"
:show-btn-crews="false"
ref="tableRef"
:send-params="transObj"
:request-api="queryPurchaseArrivalListInnerApi"
:show-sel="false"
>
<!-- <template slot="handle" slot-scope="{ data }">
<el-button
type="primary"
size="mini"
>查看</el-button
>
<el-button
type="danger"
size="mini"
>上传</el-button
>
</template>-->
<template slot="purchaseNum" slot-scope="{ data }">
{{ data.purchaseNum / storageDex }}
</template>
<template slot="purchasePrice" slot-scope="{ data }">
{{ data.purchasePrice / priceDex }}
</template>
<template slot="notaxPrice" slot-scope="{ data }">
{{ data.notaxPrice / priceDex }}
</template>
<template slot="status" slot-scope="{ data }">
<span style="color: #D9001B">
{{ data.statusName }}
</span>
</template>
</TableModel>
</div>
</template>
<script>
import { columnsListDetail } from '../config-detail'
import {
fileUpLoad,
imgUpLoad
} from '@/api/system/upload'
import {
queryPurchaseArrivalListInnerApi
} from '@/api/purchase/arrival'
export default {
name: 'SeeDetail',
props: {
editParams: {
type: Object,
default: () => null,
},
},
created() {
this.transObj = { ['id']: this.editParams['id'] }
console.log(this.transObj)
},
mounted() {
},
data() {
return {
columnsListDetail,
subSort: '', // 1 / 2
//
picList: [],
//
picNameList: [],
//
fileList: [],
transObj: {},
storageDex: 1000,
priceDex: 100
}
},
computed: {
//1
uploadDisabled() {
return this.picList.length > 1
},
},
methods: {
queryPurchaseArrivalListInnerApi,
/** 上传图片/文件 */
uploadData(param) {
console.log(param)
imgUpLoad(param).then(res => {
console.log(res)
this.picList.push(res.data.url)
this.picNameList.push(res.data.name.split('_')[0])
}).catch(err => {})
},
/** 移除文件 */
handleRemove(file) {
console.log(file)
console.log(this.picNameList)
this.picList = []
// this.fileList = this.fileList.filter(item => item.uid !== e.uid)
},
/** 文件超出1个 */
fileExceed() {
this.$modal.msgError('最多上传1张图片')
},
/** 确认按钮 */
onSubmit() {
},
},
}
</script>
<style scoped>
::v-deep .el-select {
width: 100%;
}
::v-deep .el-form-item__label{
font-weight: normal;
}
</style>

View File

@ -14,6 +14,7 @@ export const columnsListAdd = [
{ t_props: 'name', t_label: '物资名称', },
{ t_props: 'typeId', t_label: '规格型号', t_slot: 'typeId' },
{ t_props: 'unitName', t_label: '单位' },
{ t_props: 'purchaseNum', t_label: '采购数量', t_slot: 'purchaseNum' },
{ t_props: 'purchasePrice', t_label: '单价(含税)', t_slot: 'purchasePrice' },
{ t_props: 'notaxPrice', t_label: '单价(不含税)', t_slot: 'notaxPrice' },
{ t_props: 'taxRate', t_label: '税率', t_slot: 'taxRate' },

View File

@ -1,4 +1,4 @@
export const columnsList = [
export const columnsListArrival = [
{ t_props: 'name', t_label: '报告类型', },
{ t_props: 'typeId', t_label: '合格证', },
{ t_props: 'unitName', t_label: '类型名称' },
@ -7,7 +7,7 @@ export const columnsList = [
{ t_props: 'taxRate', t_label: '截止有效期', },
]
export const dialogConfig = {
export const dialogConfigArrival = {
outerWidth: '80%',
outerTitle: '',
outerVisible: false,

View File

@ -0,0 +1,12 @@
export const columnsListDetail = [
{ t_props: 'name', t_label: '物资名称', },
{ t_props: 'typeId', t_label: '规格型号', t_slot: 'typeId' },
{ t_props: 'unitName', t_label: '单位' },
{ t_props: 'purchaseNum', t_label: '采购数量', t_slot: 'purchaseNum' },
{ t_props: 'purchasePrice', t_label: '单价(含税)', t_slot: 'purchasePrice' },
{ t_props: 'notaxPrice', t_label: '单价(不含税)', t_slot: 'notaxPrice' },
{ t_props: 'taxRate', t_label: '税率', t_slot: 'taxRate' },
{ t_props: 'supplierId', t_label: '物资厂家', t_slot: 'supplierId' },
{ t_props: 'productDate', t_label: '出厂日期', t_slot: 'productDate' },
{ t_props: 'files', t_label: '相关配套资料', t_slot: 'files' },
]

View File

@ -6,17 +6,16 @@ export const formLabel = [
{ f_label: '状态', f_model: 'keyWord', f_type: 'ipt' },
]
export const columnsList = [
{ t_props: 'name', t_label: '到货时间', },
{ t_props: 'address', t_label: '采购单号' },
{ t_props: 'companyMan', t_label: '采购物资' },
{ t_props: 'mainPerson', t_label: '采购数量' },
{ t_props: 'phone', t_label: '采购价格(含税)', },
{ t_props: 'scopeBusiness', t_label: '采购价格(不含税)' },
{ t_props: 'picUrl', t_label: '税率', },
{ t_props: 'notes', t_label: '操作人' },
{ t_props: 'notes', t_label: '操作时间' },
{ t_props: 'notes', t_label: '状态' },
{ t_props: 'notes', t_label: '备注' },
{ t_props: 'arrivalTime', t_label: '到货时间', },
{ t_props: 'purchaseCode', t_label: '采购单号' },
{ t_props: 'purchaseMaterial', t_label: '采购物资', },
{ t_props: 'purchaseNum', t_label: '采购数量', t_slot: 'purchaseNum' },
{ t_props: 'purchasePrice', t_label: '采购价格(含税)', t_slot: 'purchasePrice' },
{ t_props: 'notaxPrice', t_label: '采购价格(不含税)', t_slot: 'notaxPrice' },
{ t_props: 'createBy', t_label: '操作人' },
{ t_props: 'createTime', t_label: '操作时间' },
{ t_props: 'status', t_label: '状态', t_slot: 'status' },
{ t_props: 'remark', t_label: '备注' },
]
export const dialogConfig = {

View File

@ -24,6 +24,19 @@
</template>
<template slot="handle" slot-scope="{ data }">
<el-button
type="primary"
size="mini"
@click="seeDetail(data)"
>查看</el-button
>
<el-button
type="success"
size="mini"
@click="handleSubmit(data.id)"
v-if="data.status === 47"
>提交</el-button
>
<el-button
type="primary"
size="mini"
@ -33,11 +46,11 @@
<el-button
type="danger"
size="mini"
@click="handleDeleteData(data.id)"
@click="handleDeleteData(data.id, delArrivalApi)"
>删除</el-button
>
</template>
<template slot="picUrl" slot-scope="{ data }">
<!-- <template slot="picUrl" slot-scope="{ data }">
<h4
style="color: #02A7F0; cursor: pointer"
v-if="data.picUrl === '' || data.picUrl === null"
@ -48,7 +61,21 @@
v-else
@click="openUrl(data.picUrl)"
>查看</h4>
</template>
</template>-->
<template slot="purchaseNum" slot-scope="{ data }">
{{ data.purchaseNum / storageDex }}
</template>
<template slot="purchasePrice" slot-scope="{ data }">
{{ data.purchasePrice / priceDex }}
</template>
<template slot="notaxPrice" slot-scope="{ data }">
{{ data.notaxPrice / priceDex }}
</template>
<template slot="status" slot-scope="{ data }">
<span style="color: #D9001B">
{{ data.statusName }}
</span>
</template>
</TableModel>
<!-- 新增以及修改时的弹框 -->
@ -73,6 +100,13 @@
</add-arrival>
<see-detail
v-if="isShowComponent === 'see-detail'"
:edit-params="detailParams"
>
</see-detail>
</div>
</template>
@ -82,9 +116,12 @@ import { columnsList, dialogConfig, formLabel } from './config'
import { commonMixin } from '../mixins/common'
import FormArrival from './components/form-arrival.vue'
import AddArrival from './components/add-arrival.vue'
import SeeDetail from './components/see-detail.vue'
import {
queryPurchaseArrivalListApi,
queryTypeListApi
queryTypeListApi,
submitArrivalApi,
delArrivalApi
} from '@/api/purchase/arrival'
import {
querySupplierListApi
@ -92,7 +129,7 @@ import {
export default {
name: 'purchaseArrivalManage',
mixins: [commonMixin], //
components: { FormArrival, PageHeader, AddArrival },
components: { FormArrival, PageHeader, AddArrival, SeeDetail },
created() {
//
querySupplierListApi().then(res => {
@ -127,6 +164,23 @@ export default {
},
methods: {
queryPurchaseArrivalListApi,
delArrivalApi,
//
seeDetail(data) {
console.log(data)
this.detailParams = data
this.isShowComponent = 'see-detail'
},
//
handleSubmit(id) {
let idList = []
idList.push(id)
submitArrivalApi(idList).then(res => {
console.log(res)
this.$modal.msgSuccess('提交成功')
this.$refs.tableRef.getTableList()
}).catch(err => {})
},
goBack() {
this.isShowComponent = 'Index'
}
@ -141,7 +195,10 @@ export default {
addDialogTitle: '新建到货管理', //
editDialogTitle: '修改到货管理', //
factoryRange: [],
cascaderRange: []
cascaderRange: [],
storageDex: 1000,
priceDex: 100,
detailParams: undefined
}
},
}

View File

@ -6,17 +6,16 @@ export const formLabel = [
{ f_label: '状态', f_model: 'keyWord', f_type: 'ipt' },
]
export const columnsList = [
{ t_props: 'name', t_label: '到货时间', },
{ t_props: 'address', t_label: '采购单号' },
{ t_props: 'companyMan', t_label: '采购物资' },
{ t_props: 'mainPerson', t_label: '采购数量' },
{ t_props: 'phone', t_label: '采购价格(含税)', },
{ t_props: 'scopeBusiness', t_label: '采购价格(不含税)' },
{ t_props: 'picUrl', t_label: '税率', },
{ t_props: 'notes', t_label: '操作人' },
{ t_props: 'notes', t_label: '操作时间' },
{ t_props: 'notes', t_label: '状态' },
{ t_props: 'notes', t_label: '备注' },
{ t_props: 'arrivalTime', t_label: '到货时间', },
{ t_props: 'purchaseCode', t_label: '采购单号' },
{ t_props: 'purchaseMaterial', t_label: '采购物资', },
{ t_props: 'purchaseNum', t_label: '采购数量', t_slot: 'purchaseNum' },
{ t_props: 'purchasePrice', t_label: '采购价格(含税)', t_slot: 'purchasePrice' },
{ t_props: 'notaxPrice', t_label: '采购价格(不含税)', t_slot: 'notaxPrice' },
{ t_props: 'createBy', t_label: '操作人' },
{ t_props: 'createTime', t_label: '操作时间' },
{ t_props: 'status', t_label: '状态', t_slot: 'status' },
{ t_props: 'remark', t_label: '备注' },
]
export const dialogConfig = {

View File

@ -5,7 +5,7 @@
<TableModel
:formLabel="formLabel"
:columnsList="columnsList"
:request-api="queryStorageConfigListApi"
:request-api="queryPurchaseConfirmListApi"
ref="tableRef"
>
<template slot="btn" slot-scope="{ queryParams }">
@ -18,12 +18,24 @@
</template>
<template slot="handle" slot-scope="{ data }">
<el-button
type="primary"
size="mini"
>查看</el-button
>
<el-button
type="primary"
size="mini"
@click="confirmArrival(data.id)"
v-if="data.status === 48"
>到货确认</el-button
>
<!-- <el-button
type="warning"
size="mini"
>解绑</el-button
>-->
<el-button
<!-- <el-button
type="primary"
size="mini"
@click="handleEditData(data)"
@ -34,7 +46,7 @@
size="mini"
@click="handleDeleteData(data.id, delStorageConfigListApi)"
>删除</el-button
>
>-->
</template>
<!-- <template slot="isActive" slot-scope="{ data }">
{{ data.isActive == '1' ? '启用' : '不启用' }}
@ -42,6 +54,20 @@
<template slot="phone" slot-scope="{ data }">
{{ phoneCrypto(data.phone) }}
</template>-->
<template slot="purchaseNum" slot-scope="{ data }">
{{ data.purchaseNum / storageDex }}
</template>
<template slot="purchasePrice" slot-scope="{ data }">
{{ data.purchasePrice / priceDex }}
</template>
<template slot="notaxPrice" slot-scope="{ data }">
{{ data.notaxPrice / priceDex }}
</template>
<template slot="status" slot-scope="{ data }">
<span style="color: #D9001B">
{{ data.statusName }}
</span>
</template>
</TableModel>
<!-- 新增以及修改时的弹框 -->
@ -65,17 +91,26 @@ import { columnsList, dialogConfig, formLabel } from './config'
import { commonMixin } from '../mixins/common'
import FormConfirm from './components/form-confirm.vue'
import {
queryStorageConfigListApi,
delStorageConfigListApi
} from '@/api/material/storageConfig'
queryPurchaseConfirmListApi,
confirmArrivalApi
} from '@/api/purchase/confirm'
export default {
name: 'arrivalConfirmManage',
mixins: [commonMixin], //
components: { FormConfirm },
methods: {
queryStorageConfigListApi,
delStorageConfigListApi
queryPurchaseConfirmListApi,
//
confirmArrival(id) {
let idList = []
idList.push(id)
confirmArrivalApi(idList).then(res => {
console.log(res)
this.$modal.msgSuccess('提交成功')
this.$refs.tableRef.getTableList()
}).catch(err => {})
}
},
data() {
return {
@ -84,6 +119,8 @@ export default {
dialogConfig,
addDialogTitle: '新建仓库', //
editDialogTitle: '修改仓库', //
storageDex: 1000,
priceDex: 100,
}
},
}

View File

@ -57,10 +57,10 @@ export const commonMixin = {
this.dialogConfig.outerTitle = this.editDialogTitle
this.dialogConfig.outerVisible = true
},
handleEditDataAdd(data) {
handleEditDataArrival(data) {
this.editParams = data
this.dialogConfigAdd.outerTitle = this.editDialogTitle
this.dialogConfigAdd.outerVisible = true
this.dialogConfigArrival.outerTitle = this.editDialogTitle
this.dialogConfigArrival.outerVisible = true
},
/** 导入数据 */
handleImportData() {
@ -80,6 +80,9 @@ export const commonMixin = {
closeDialogOuter() {
this.dialogConfig.outerVisible = false
},
closeDialogOuterArrival() {
this.dialogConfigArrival.outerVisible = false
},
/** 关闭内侧弹框 */
closeDialogInner() {
this.dialogConfig.innerVisible = false

View File

@ -36,7 +36,7 @@ module.exports = {
// detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: {
// target: `http://192.168.2.13:18080`, // 代理的后台ip 端口 解决请求跨域
target: `http://192.168.2.19:18080`, // 阮
target: `http://192.168.0.234:18080`, // 阮
// target: `http://192.168.2.21:18080`, // 马
changeOrigin: true,
pathRewrite: {