diff --git a/src/api/purchase/arrival.js b/src/api/purchase/arrival.js
index ef8653d..31cce0b 100644
--- a/src/api/purchase/arrival.js
+++ b/src/api/purchase/arrival.js
@@ -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)
}
diff --git a/src/api/purchase/confirm.js b/src/api/purchase/confirm.js
new file mode 100644
index 0000000..a105e5f
--- /dev/null
+++ b/src/api/purchase/confirm.js
@@ -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)
+}
+
+
+
diff --git a/src/components/TableModel/index.vue b/src/components/TableModel/index.vue
index 3222de2..f707c97 100644
--- a/src/components/TableModel/index.vue
+++ b/src/components/TableModel/index.vue
@@ -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() {
diff --git a/src/views/purchase/arrival/components/add-arrival.vue b/src/views/purchase/arrival/components/add-arrival.vue
index 0d90392..51aec5c 100644
--- a/src/views/purchase/arrival/components/add-arrival.vue
+++ b/src/views/purchase/arrival/components/add-arrival.vue
@@ -41,6 +41,9 @@
{{ data.typeName }}
+
+
+
@@ -78,20 +81,20 @@
报告管理
-
@@ -102,7 +105,7 @@
+
+
diff --git a/src/views/purchase/arrival/components/see-detail.vue b/src/views/purchase/arrival/components/see-detail.vue
new file mode 100644
index 0000000..49a5a7f
--- /dev/null
+++ b/src/views/purchase/arrival/components/see-detail.vue
@@ -0,0 +1,124 @@
+
+
+
+
+
+
+ {{ data.purchaseNum / storageDex }}
+
+
+ {{ data.purchasePrice / priceDex }}
+
+
+ {{ data.notaxPrice / priceDex }}
+
+
+
+ {{ data.statusName }}
+
+
+
+
+
+
+
+
+
diff --git a/src/views/purchase/arrival/config-add.js b/src/views/purchase/arrival/config-add.js
index 827fd3b..f6707e0 100644
--- a/src/views/purchase/arrival/config-add.js
+++ b/src/views/purchase/arrival/config-add.js
@@ -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' },
diff --git a/src/views/purchase/arrival/config-arrival.js b/src/views/purchase/arrival/config-arrival.js
index 428cec9..a19d18b 100644
--- a/src/views/purchase/arrival/config-arrival.js
+++ b/src/views/purchase/arrival/config-arrival.js
@@ -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,
diff --git a/src/views/purchase/arrival/config-detail.js b/src/views/purchase/arrival/config-detail.js
new file mode 100644
index 0000000..bf1fc4a
--- /dev/null
+++ b/src/views/purchase/arrival/config-detail.js
@@ -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' },
+]
diff --git a/src/views/purchase/arrival/config.js b/src/views/purchase/arrival/config.js
index 931b342..411141c 100644
--- a/src/views/purchase/arrival/config.js
+++ b/src/views/purchase/arrival/config.js
@@ -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 = {
diff --git a/src/views/purchase/arrival/index.vue b/src/views/purchase/arrival/index.vue
index ae067e8..149357b 100644
--- a/src/views/purchase/arrival/index.vue
+++ b/src/views/purchase/arrival/index.vue
@@ -24,6 +24,19 @@
+ 查看
+ 提交
删除
-
+
+
+ {{ data.purchaseNum / storageDex }}
+
+
+ {{ data.purchasePrice / priceDex }}
+
+
+ {{ data.notaxPrice / priceDex }}
+
+
+
+ {{ data.statusName }}
+
+
@@ -73,6 +100,13 @@
+
+
+
+
@@ -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
}
},
}
diff --git a/src/views/purchase/confirm/config.js b/src/views/purchase/confirm/config.js
index fe946b9..f9bfe89 100644
--- a/src/views/purchase/confirm/config.js
+++ b/src/views/purchase/confirm/config.js
@@ -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 = {
diff --git a/src/views/purchase/confirm/index.vue b/src/views/purchase/confirm/index.vue
index 11eea05..4f8cc4e 100644
--- a/src/views/purchase/confirm/index.vue
+++ b/src/views/purchase/confirm/index.vue
@@ -5,7 +5,7 @@
@@ -18,12 +18,24 @@
+ 查看
+ 到货确认
- 删除
+ >-->
+
+ {{ data.purchaseNum / storageDex }}
+
+
+ {{ data.purchasePrice / priceDex }}
+
+
+ {{ data.notaxPrice / priceDex }}
+
+
+
+ {{ data.statusName }}
+
+
@@ -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,
}
},
}
diff --git a/src/views/purchase/mixins/common.js b/src/views/purchase/mixins/common.js
index c588f84..52db2a2 100644
--- a/src/views/purchase/mixins/common.js
+++ b/src/views/purchase/mixins/common.js
@@ -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
diff --git a/vue.config.js b/vue.config.js
index 6e7f751..636c4e0 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -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: {