From 8a221b8af639b03122158e660d1852c400083a2c Mon Sep 17 00:00:00 2001 From: bonus <1203338439@qq.com> Date: Fri, 23 Aug 2024 10:41:02 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E8=B4=AD=E7=BC=96=E7=A0=81=E7=BB=91?= =?UTF-8?q?=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 1 + src/api/purchase/binding.js | 4 + .../binding/components/form-binding.vue | 340 ++++++++++++------ .../binding/components/list-binding.vue | 90 +++-- src/views/purchase/binding/config.js | 2 +- src/views/purchase/binding/index.vue | 1 - vue.config.js | 4 +- 7 files changed, 280 insertions(+), 162 deletions(-) diff --git a/README.md b/README.md index 2a25a47..71ce329 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,7 @@ npm install # 建议不要直接使用 cnpm 安装依赖,会有各种诡异的 bug。可以通过如下操作解决 npm 下载速度慢的问题 npm install --registry=https://registry.npmmirror.com + # 启动服务 npm run dev ``` diff --git a/src/api/purchase/binding.js b/src/api/purchase/binding.js index 75d382a..08e4514 100644 --- a/src/api/purchase/binding.js +++ b/src/api/purchase/binding.js @@ -15,6 +15,10 @@ export const queryPurchaseBindDetailsApi = (data) => { params: data }) } +/** 编码绑定提交 */ +export const submitCodeBindApi = (data) => { + return request.post('/task/purchase/bind/addBind', data) +} diff --git a/src/views/purchase/binding/components/form-binding.vue b/src/views/purchase/binding/components/form-binding.vue index ac4df7c..e3f4f4c 100644 --- a/src/views/purchase/binding/components/form-binding.vue +++ b/src/views/purchase/binding/components/form-binding.vue @@ -1,153 +1,271 @@ @@ -156,7 +274,7 @@ export default { ::v-deep .el-select { width: 100%; } -::v-deep .el-form-item__label{ - font-weight: normal; +::v-deep .el-form-item__label { + font-weight: normal; } diff --git a/src/views/purchase/binding/components/list-binding.vue b/src/views/purchase/binding/components/list-binding.vue index eaa54bf..71d9359 100644 --- a/src/views/purchase/binding/components/list-binding.vue +++ b/src/views/purchase/binding/components/list-binding.vue @@ -1,44 +1,34 @@ @@ -47,29 +37,34 @@ import PageHeader from '@/components/pageHeader' import { columnsList, dialogConfig, formLabel } from '../config-bind-list' import { commonMixin } from '../../mixins/common' -import { - queryPurchaseBindDetailsApi -} from '@/api/purchase/binding' +import { queryPurchaseBindDetailsApi } from '@/api/purchase/binding' // api +import FormBinding from './form-binding.vue' export default { name: 'arrivalBindingManage', mixins: [commonMixin], // 混入公共方法和数据 - components: { PageHeader }, - props:{ - sendParams: { - type: Object, - default: () => null, - } + components: { PageHeader, FormBinding }, + props: { + sendParams: { + type: Object, + default: () => null, + }, }, created() { - console.log(this.sendParams,'this.sendParams') + console.log(this.sendParams, 'this.sendParams') }, methods: { - queryPurchaseBindDetailsApi, - goBack() { - this.isShowComponent = 'Index' - } - + queryPurchaseBindDetailsApi, + goBack() { + this.isShowComponent = 'Index' + }, + /** 绑定按钮 */ + handleBindOpt(data) { + console.log('data', data) + this.rowData = data + this.dialogConfig.outerVisible = true + this.dialogConfig.outerTitle = '绑定' + }, }, data() { return { @@ -78,7 +73,8 @@ export default { dialogConfig, isShowComponent: 'Index', pageContent: '新购绑定物资列表', - sendData: undefined + sendData: undefined, + rowData: null, // 绑定的当前行数据 } }, } diff --git a/src/views/purchase/binding/config.js b/src/views/purchase/binding/config.js index 1781ec6..834c0d5 100644 --- a/src/views/purchase/binding/config.js +++ b/src/views/purchase/binding/config.js @@ -3,7 +3,7 @@ export const formLabel = [ { f_label: '开始时间', f_model: 'startTime', f_type: 'date' }, { f_label: '结束时间', f_model: 'endTime', f_type: 'date' }, { f_label: '关键字', f_model: 'keyWord', f_type: 'ipt' }, - { f_label: '状态', f_model: 'keyWord', f_type: 'ipt' }, + ] export const columnsList = [ { t_props: 'arrivalTime', t_label: '到货时间', }, diff --git a/src/views/purchase/binding/index.vue b/src/views/purchase/binding/index.vue index e51c51b..76f38d4 100644 --- a/src/views/purchase/binding/index.vue +++ b/src/views/purchase/binding/index.vue @@ -49,7 +49,6 @@ v-if="isShowComponent === 'list-binding'" :sendParams='sendParams' > - diff --git a/vue.config.js b/vue.config.js index f916877..f836496 100644 --- a/vue.config.js +++ b/vue.config.js @@ -36,8 +36,8 @@ 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.0.234:18080`, // 阮 - target: `http://192.168.2.21:18080`, // 马 + target: `http://localhost:18080`, // 阮 + // target: `http://192.168.2.21:18080`, // 马 changeOrigin: true, pathRewrite: { ['^' + process.env.VUE_APP_BASE_API]: ''