From 35738d1b2c095b2eca0211efdc4fa59507189e6f Mon Sep 17 00:00:00 2001 From: zhy <luhan1008611> Date: 星期一, 30 十月 2023 09:33:34 +0800 Subject: [PATCH] feat: 基础信息 --- admin-web/src/views/foundation/material/edit.vue | 53 ++++++++++++++++++++++++++++------------------------- 1 files changed, 28 insertions(+), 25 deletions(-) diff --git a/admin-web/src/views/foundation/material/edit.vue b/admin-web/src/views/foundation/material/edit.vue index 1d1ad94..8f8733b 100644 --- a/admin-web/src/views/foundation/material/edit.vue +++ b/admin-web/src/views/foundation/material/edit.vue @@ -2,27 +2,29 @@ <win-md :title="setting.title" @close="close" :width="'800px'"> <el-form ref="ruleForm" :model="formData" :rules="rules" class="demo-ruleForm" label-width="100px"> <el-form-item label="鐗╁搧缂栧彿"> - <el-input v-model="formData.code88" disabled clearable maxlength="20" show-word-limit style="width: 100%"/> + <el-input v-model="formData.goodsCode" disabled clearable maxlength="20" show-word-limit style="width: 100%"/> </el-form-item> - <el-form-item label="鐗╁搧鍚嶇О" prop="name"> - <el-input v-model="formData.name" clearable maxlength="20" show-word-limit style="width: 100%"/> + <el-form-item label="鐗╁搧鍚嶇О" prop="goodsName"> + <el-input v-model="formData.goodsName" clearable maxlength="20" show-word-limit style="width: 100%"/> </el-form-item> - <el-form-item style="margin-left: -100px;" v-for="(m, i) in formData.code"> - <el-form-item label="瑙勬牸鍨嬪彿" prop="name" style="float: left;"> - <el-input v-model="m.name" clearable maxlength="20" show-word-limit style="width: 100%"/> + <el-form-item label="鍒嗙被" prop="categoryId"> + <el-input v-model="formData.categoryId" clearable maxlength="20" show-word-limit style="width: 100%"/> + </el-form-item> + <el-form-item style="margin-left: -100px;" v-for="(m, i) in formData.models"> + <el-form-item label="瑙勬牸鍨嬪彿" prop="modelName" style="float: left;"> + <el-input v-model="m.modelName" clearable maxlength="20" show-word-limit style="width: 100%"/> </el-form-item> - <el-form-item label="鍗曚綅" prop="name" style="float: left;"> - <el-input v-model="m.code" clearable maxlength="20" show-word-limit style="width: 100%"/> + <el-form-item label="鍗曚綅" prop="unit" style="float: left;"> + <el-input v-model="m.unit" clearable maxlength="20" show-word-limit style="width: 100%"/> </el-form-item> <my-button name="鏂板鍨嬪彿" type="" @click="addCode"/> <my-button name="鍒犻櫎" type="" @click="delCode(i)"/> </el-form-item> - <el-form-item label="鐘舵��"> - <el-switch - v-model="formData.status" - active-color="#0d997c" - inactive-color="#C0CCDA"> - </el-switch> + <el-form-item label="鐘舵��" prop="states"> + <el-radio-group v-model="formData.states"> + <el-radio :label="1" border>鍚敤</el-radio> + <el-radio :label="0" border>绂佺敤</el-radio> + </el-radio-group> </el-form-item> </el-form> <div slot="footer" align="center" class="dialog-footer"> @@ -54,13 +56,14 @@ radio1: '', code: '', name: '', - status: true, + states: '', summary: '', - code:[ + categoryId: null, + models:[ { - name:'12', - code:'13' - }, + modelName:'', + unit:'' + } ] }, rules: { @@ -77,15 +80,15 @@ }, methods: { addCode(){ - this.formData.code.push( + this.formData.models.push( { - name:'', - code:'' + modelName:'', + unit:'' } ) }, delCode(index){ - this.formData.code.splice(index, 1) + this.formData.models.splice(index, 1) }, getEditInfo(id){ @@ -99,7 +102,7 @@ const params = Object.assign({}, this.formData) if(this.setting.id){ // 缂栬緫鎺ュ彛 - finsystenant.edit(params).then(res => { + finsystenant.editcode(params).then(res => { if (res) { this.$message.success('淇濆瓨鎴愬姛锛�') this.close() @@ -110,7 +113,7 @@ }) }else{ params.orgId = this.setting.orgId - finsystenant.add(params).then(res => { + finsystenant.addcode(params).then(res => { if (res) { this.$message.success('淇濆瓨鎴愬姛锛�') this.close() -- Gitblit v1.9.1