From 63a5da9d6be10bbd910812c423bdfad7ae2945e5 Mon Sep 17 00:00:00 2001 From: zuozhengqing <a13193816592@163.com> Date: 星期二, 09 四月 2024 11:24:16 +0800 Subject: [PATCH] Merge branch 'master' of ssh://192.168.5.5:29418/silk/silk-web into zzq --- src/views/productManage/silkRegisterForm/addPage.vue | 679 ++++++++++++++---------- src/api/productManage/silkRegisterForm.js | 20 src/components/makepager/TableCommonView.vue | 10 src/views/productManage/silkRegisterForm/index.vue | 65 +- src/router/product/index.js | 2 src/components/makepager/CommonFormTableView.vue | 691 +++++++++++++++++-------- src/components/layout/components/appsidebar/index.vue | 2 src/views/productManage/silkInspectForm/index.vue | 83 +- src/api/productManage/silkInspectForm.js | 44 src/views/reportManage/payableSalaryReport/index.vue | 2 10 files changed, 984 insertions(+), 614 deletions(-) diff --git a/src/api/productManage/silkInspectForm.js b/src/api/productManage/silkInspectForm.js index de9a91f..a0b0629 100644 --- a/src/api/productManage/silkInspectForm.js +++ b/src/api/productManage/silkInspectForm.js @@ -1,42 +1,34 @@ import request from "@/common/untils/request.js" +// 绾ゅ害妫�楠屽垪琛� +export function getInspectCheckList(data) { + return request({ + url: "/api-jl/v1/fineness/check?page="+ data.page+"&pageSize="+data.pageSize+"&keyword="+data.keyword, + method: "get", + data + }) +} -// 璺熻繘璁板綍鍒楄〃 -export function getFollowRecordList(data) { +//淇濆瓨绾ゅ害妫�楠� +export function saveCheck(data) { return request({ - url: "/api/followRecord/list", + url: "/api-jl/v1/fineness/check", method: "post", data }) } -// 娣诲姞璺熻繘璁板綍 -export function getAddFollowRecord(data) { +// 绾ゅ害妫�楠岀殑璇︽儏 +export function getCheckDetails(data) { return request({ - url: "/api/followRecord/add", - method: "post", + url: "/api-jl/v1/fineness/check/"+data.id, + method: "get", data }) } -// 鍒犻櫎璺熻繘璁板綍 -export function getDeleteFollowRecord(data) { +// 绾ゅ害妫�楠屽垹闄� +export function getInspectCheckDelete(data) { return request({ - url: "/api/followRecord/delete", + url: "/api-jl/v1/fineness/check/"+data.id, method: "delete", data - }) -} -// 鏇存柊璺熻繘璁板綍 -export function getUpdateFollowRecord(data) { - return request({ - url: "/api/followRecord/update", - method: "put", - data - }) -} - -// 鑱旂郴鏂瑰紡鍒楄〃 -export function getContactInfoList() { - return request({ - url: "/api/contactInformation/list", - method: "get" }) } diff --git a/src/api/productManage/silkRegisterForm.js b/src/api/productManage/silkRegisterForm.js index 5b05747..95b4d92 100644 --- a/src/api/productManage/silkRegisterForm.js +++ b/src/api/productManage/silkRegisterForm.js @@ -1,18 +1,26 @@ import request from "@/common/untils/request.js" - // 绾ゅ害鐧昏鍒楄〃 export function getRegisterList(data) { return request({ - url: "/api-jl/v1/fineness/register?page="+ data.page+"&pageSize="+data.pageSize, + url: "/api-jl/v1/fineness/register?page="+ data.page+"&pageSize="+data.pageSize+"&keyword="+data.keyword, method: "get", data }) } + //淇濆瓨绾ゅ害鐧昏 export function saveRegister(data) { return request({ url: "/api-jl/v1/fineness/register", method: "post", + data + }) +} +// 绾ゅ害鐧昏琛ㄧ殑璇︽儏 +export function getRegisterDetails(data) { + return request({ + url: "/api-jl/v1/fineness/register/"+data.id, + method: "get", data }) } @@ -32,6 +40,14 @@ data }) } +// 绾ゅ害鐧昏琛� 缁勫埆鐨勬暟鎹� +export function getWorkshopManageList(data) { + return request({ + url: "/api-jl/v1/system/getWorkshopManageList", + method: "get", + data + }) +} // 鏇存柊璺熻繘璁板綍 export function getUpdateFollowRecord(data) { return request({ diff --git a/src/components/layout/components/appsidebar/index.vue b/src/components/layout/components/appsidebar/index.vue index 899306f..399cc40 100644 --- a/src/components/layout/components/appsidebar/index.vue +++ b/src/components/layout/components/appsidebar/index.vue @@ -21,7 +21,7 @@ <i class="el-icon-user-solid icon"></i> <span>绯荤粺璁剧疆</span> </template> - <el-menu-item index="/systemSetting/silkStandardSetting">鐢熶笣瀹氱骇鏍囧噯</el-menu-item> + <el-menu-item index="/systemSetting/silkStandardSetting">鐢熶笣鏍囧噯璁剧疆</el-menu-item> <el-menu-item index="/systemSetting/silkPriceStandard">鐢熶笣瀹氫环鏍囧噯</el-menu-item> <el-menu-item index="/systemSetting/workshopManage">杞﹂棿绠$悊</el-menu-item> <el-menu-item index="/systemSetting/dataDictionary">鏁版嵁瀛楀吀</el-menu-item> diff --git a/src/components/makepager/CommonFormTableView.vue b/src/components/makepager/CommonFormTableView.vue index e3a49c1..2877fc2 100644 --- a/src/components/makepager/CommonFormTableView.vue +++ b/src/components/makepager/CommonFormTableView.vue @@ -2,28 +2,33 @@ <div class="page-view"> <el-form ref="form" :model="tableList" :show-message="false" label-position="right"> <el-table + ref="fromTable" + :border="isBorder" :data="tableList.tableData" - style="width: 100%" :show-summary="showSummary.show" :summary-method="getSummaries" :span-method="arraySpanMethod" + style="width: 100%" + :header-cell-style="{ background: '#f1f3f8', color: tableList.headerColor?tableList.headerColor:'#000009', 'font-size': '14px', 'font-family': 'PingFangSC' }" + @selection-change="handleSelectionChange" + :row-key="(row) => row.productId" > + <el-table-column v-if="selectBox" type="selection" :reserve-selection="true" width="40" align="center"> + </el-table-column> + <el-table-column v-if="tableList.isReturn" type="index" label="#" width="50" align="center"></el-table-column> + <el-table-column - type="index" - v-if="tableList.tableColumn && tableList.tableColumn.length > 0" - label="缂栧彿" - width="50" align="center" - ></el-table-column> - <el-table-column v-for="(item, i) in tableList.tableColumn" :key="i" :prop="item.prop" :label="item.label" :width="item.width" :min-width="item.min" - align="center" - > + show-overflow-tooltip + :sortable="item.sortable" + > + <!-- 鎵�鏈夌殑琛ㄦ牸淇敼涓哄彲閰嶇疆琛ㄥご鐨勪箣鍚� v-if淇敼涓簐-if="item.isShowColumn" --> <!-- 琛ㄥご鏍峰紡 --> <template slot="header"> <span v-if="item.isRequird" style="color: #f56c6c">*</span> @@ -31,59 +36,168 @@ </template> <!-- column鏍峰紡 --> <template slot-scope="scope"> - <!-- <template v-if="!detailEnter"> --> - <el-form-item - v-if="item.input" - label=" " - :prop="'tableData.' + scope.$index + '.' + item.prop" - :rules="[{ required: item.isRequird ? true : false, message: '杈撳叆涓嶈兘涓虹┖' }]" - > - <el-input - v-model.trim="scope.row[item.prop]" - maxlength="50" - size="mini" - @change=" - (val) => { - commonInputChange(val, item.prop, scope.row) - } - " - ></el-input> - </el-form-item> - <el-form-item v-else-if="item.productName" label=" " :prop="'tableData.' + scope.$index + '.' + item.prop"> - <div class="custom-name"> - <el-autocomplete - v-model="scope.row[item.prop]" - :fetch-suggestions="querySearchAsync" - value-key="name" - style="width: calc(100% - 70px)" + <template v-if="!detailEnter"> + <el-form-item + v-if="item.input" + label=" " + :prop="'tableData.' + scope.$index + '.' + item.prop" + :rules="[{ required: item.isRequird ? true : false, message: '杈撳叆涓嶈兘涓虹┖' }]" + > + <el-input + v-model.trim="scope.row[item.prop]" + maxlength="50" size="mini" - @select=" + :disabled="!isOperate" + @change=" (val) => { - handleSelectClient(val, item.prop, scope.row) + commonInputChange(val, item.prop, scope.row, scope) } " - ></el-autocomplete> - <div class="common-select-btn" @click="selClientClick(scope.row, item.prop, scope)"> - <i class="el-icon-circle-plus-outline" title="閫夋嫨"></i> + ></el-input> + </el-form-item> + <el-form-item + v-else-if="item.productName" + label=" " + :prop="'tableData.' + scope.$index + '.' + item.prop" + > + <div class="custom-name"> + <el-autocomplete + v-model="scope.row[item.prop]" + :fetch-suggestions="querySearchAsync" + value-key="name" + :disabled="!isOperate" + size="mini" + @select=" + (val) => { + handleSelectClient(val, item.prop, scope.row) + } + " + ></el-autocomplete> + + <div + v-if="scope.row[item.prop] && scope.row[item.prop].length > 0 && isOperate" + class="common-select-btn" + @click="handleEditClient(scope, item.prop)" + > + <i class="el-icon-edit" title="缂栬緫"></i> + </div> + <div + v-if="scope.row[item.prop] && scope.row[item.prop].length > 0 && isOperate" + class="common-select-btn" + @click="clearupClient(scope)" + > + <i class="el-icon-remove-outline" title="娓呴櫎"></i> + </div> + <div class="common-select-btn" v-else @click="selClientClick(scope, item.prop)"> + <i class="el-icon-circle-plus-outline" title="閫夋嫨"></i> + </div> </div> - <div class="common-select-btn" @click="clearupClient(scope.row, scope)"> - <i class="el-icon-remove-outline" title="娓呴櫎"></i> - </div> - <div class="common-select-btn" v-if="scope.$index != 0" @click="deleteClient(scope.row, scope)"> - <i class="el-icon-delete" title="鍒犻櫎"></i> - </div> - </div> - </el-form-item> + </el-form-item> + <el-form-item + v-else-if="item.date" + label=" " + :prop="'tableData.' + scope.$index + '.' + item.prop" + :rules="[{ required: item.isRequird ? true : false, message: '杈撳叆涓嶈兘涓虹┖' }]" + > + <!-- <el-input v-model.trim="scope.row[item.prop]" maxlength="50" size="mini"></el-input> --> + <el-date-picker + :disabled="!isOperate" + v-model="scope.row[item.prop]" + type="date" + size="mini" + style="width: 110px" + > + </el-date-picker> + </el-form-item> + <el-form-item + v-else-if="item.inputNumber" + label=" " + :prop="'tableData.' + scope.$index + '.' + item.prop" + :rules="[{ required: item.isRequird ? true : false, message: '杈撳叆涓嶈兘涓虹┖' }]" + > + <el-input-number + v-model="scope.row[item.prop]" + placeholder="" + :min="0" + :controls="false" + :disabled="!isOperate" + size="mini" + style="width: 100%; margin-right: 5px" + @change=" + (val) => { + commonInputChange(val, item.prop, scope.row, scope) + } + " + ></el-input-number> + </el-form-item> + <el-form-item + v-else-if="item.inputFloat" + label=" " + :prop="'tableData.' + scope.$index + '.' + item.prop" + :rules="[{ required: item.isRequird ? true : false, message: '杈撳叆涓嶈兘涓虹┖' }]" + > + <el-input-number + v-model="scope.row[item.prop]" + placeholder="" + :min="0" + :precision="2" + :disabled="!isOperate" + :controls="false" + size="mini" + style="width: 100%; margin-right: 5px" + @change=" + (val) => { + commonInputChange(val, item.prop, scope.row, scope) + } + " + ></el-input-number> + </el-form-item> + <span v-else> + <template> + {{ scope.row[item.prop] }} + </template> + </span> + </template> <el-form-item - v-else-if="item.date" - label=" " - :prop="'tableData.' + scope.$index + '.' + item.prop" - :rules="[{ required: item.isRequird ? true : false, message: '杈撳叆涓嶈兘涓虹┖' }]" - > - <!-- <el-input v-model.trim="scope.row[item.prop]" maxlength="50" size="mini"></el-input> --> - <el-date-picker v-model="scope.row[item.prop]" type="date" size="mini" style="width: 110px"> - </el-date-picker> - </el-form-item> + v-else-if="item.input" + label=" " + :prop="'tableData.' + scope.$index + '.' + item.prop" + :rules="[{ required: item.isRequird ? true : false, message: '杈撳叆涓嶈兘涓虹┖' }]" + > + <el-input + v-model.trim="scope.row[item.prop]" + maxlength="50" + size="mini" + :disabled="!isOperate" + @change=" + (val) => { + commonInputChange(val, item.prop, scope.row, scope) + } + " + ></el-input> + </el-form-item> + <el-form-item + v-else-if="item.inputFloat" + label=" " + :prop="'tableData.' + scope.$index + '.' + item.prop" + :rules="[{ required: item.isRequird ? true : false, message: '杈撳叆涓嶈兘涓虹┖' }]" + > + <el-input-number + v-model="scope.row[item.prop]" + placeholder="" + :min="0" + :precision="2" + :disabled="!isOperate" + :controls="false" + size="mini" + style="width: 100%; margin-right: 5px" + @change=" + (val) => { + commonInputChange(val, item.prop, scope.row, scope) + } + " + ></el-input-number> + </el-form-item> <el-form-item v-else-if="item.inputNumber" label=" " @@ -95,96 +209,113 @@ placeholder="" :min="0" :controls="false" + :disabled="!isOperate" size="mini" style="width: 100%; margin-right: 5px" @change=" (val) => { - commonInputChange(val, item.prop, scope.row) + commonInputChange(val, item.prop, scope.row, scope) } " ></el-input-number> </el-form-item> - <el-form-item - v-else-if="item.inputFloat" - label=" " - :prop="'tableData.' + scope.$index + '.' + item.prop" - :rules="[{ required: item.isRequird ? true : false, message: '杈撳叆涓嶈兘涓虹┖' }]" - > - <template v-if="item.multiply"> - <el-input-number - :value="scope.row[showSummary.multiply[0]] * scope.row[showSummary.multiply[1]]" - placeholder="" - :disabled="item.disabled" - :min="0" - :precision="2" - :controls="false" - size="mini" - style="width: 100%; margin-right: 5px" - @input=" - (val) => { - commonInputChange(val, item.prop, scope.row) - } - " - ></el-input-number> - </template> - <template v-else> - <el-input-number - v-model="scope.row[item.prop]" - placeholder="" - :min="0" - :precision="2" - :controls="false" - size="mini" - style="width: 100%; margin-right: 5px" - @change=" - (val) => { - commonInputChange(val, item.prop, scope.row) - } - " - ></el-input-number> - </template> - </el-form-item> - <span v-else>{{ scope.row[item.prop] }}</span> - <!-- </template> --> - <!-- <span v-else>{{ scope.row[item.prop] }}</span> --> + <span v-else style="text-align: right">{{ scope.row[item.prop] }}</span> </template> </el-table-column> + <el-table-column label="鎿嶄綔" width="70" v-if="!detailEnter" align="center" fixed='right'> + <template slot-scope="scope"> + + <el-button type="text" size="small" :disabled="!isOperate" @click="deleteClick(scope)">鍒犻櫎</el-button> + </template> + </el-table-column> + <slot name="tableButton" /> </el-table> + <div class="styleBtn" v-if="colOpenShow"> + <i @click="checkCol()" class="label">...</i> + <el-checkbox-group v-model="showcol" v-show="iscolopen" class="checkbox-group" @change="selectCheckBoxList"> + <el-checkbox v-for="item in tableList.allcol" :label="item" :key="item">{{ item }} </el-checkbox> + </el-checkbox-group> + </div> </el-form> - <div v-if="!detailEnter" style="margin: 10px"> - <el-button size="small" type="primary" @click="add">鏂板</el-button> - <el-button size="small" type="primary" @click="empty">娓呯┖</el-button> + <el-button style="margin: 10px" size="small" type="primary" @click="add">鏂板</el-button> + <div v-if="!detailEnter" style="margin: 10px" > + <el-button size="small" type="primary" :disabled="!isOperate" @click="add">鏂板</el-button> + <!-- <el-button size="small" type="primary" disabled>瀵煎叆鏄庣粏</el-button> --> + <el-button size="small" type="primary" :disabled="!isOperate" @click="empty">娓呯┖</el-button> + <el-button size="small" type="primary" @click="recalculate" :disabled="isRecalculate && !isOperate ? false : true" + >閲嶇畻</el-button + > </div> - <!-- 浜у搧鍚嶇О --> - <SelectCommonDialog + <div v-if="false && (showSummary.total || showSummary.refundable)" style="height: 42px; line-height: 42px"> + <el-row :gutter="10"> + <el-col v-if="showSummary.total" :span="3" :offset="21"> + <span style="font-weight: bold">鍚堣</span> + <span style="margin-left: 10px">{{ total }}</span> + </el-col> + <el-col v-if="showSummary.refundable" :span="3" :offset="21"> + <span style="font-weight: bold">搴旈��娆�</span> + <span style="margin-left: 10px">0.00</span> + </el-col> + </el-row> + </div> + <!-- 鍚堝悓璁㈠崟 --> + <!-- <SelectCommonDialog v-if="editSelCommonConfig.editVisible" :edit-common-config="editSelCommonConfig" - :sign="sign" + :selectBoxList="tableList.tableData" @selClient="selClient" - /> + @getSelectArray="getSelectArray" + /> --> </div> </template> <script> -import { getProductListFromGrpc, getProductList } from "@/api/productManage/product" -import SelectCommonDialog from "@/views/other/commonDialog/SelectCommonDialog" +// import { getProductList } from "@/api/common/other" +// import SelectCommonDialog from "@/views/other/commonDialog/SelectCommonDialog" export default { name: "CommmonFormTableView", - components: { SelectCommonDialog }, + // components: { SelectCommonDialog }, props: { detailEnter: { type: Boolean, default: false }, - sign: { + // 鏄惁鍙互閰嶇疆鍒楄〃 琛ㄥご + colOpenShow: { + type: Boolean, + default: false, + }, + selectBox: { + type: Boolean, + default: false + }, + // 閭d釜椤甸潰 鐢ㄦ潵鍒ゆ柇璁$畻鏂瑰紡 + pageName: { type: String, default: "" + }, + // 鍒楄〃鏂板鏄惁澶氶�� + addTypeIdMultiple: { + type: Boolean, + default: false + }, + // 鏄惁鍙互鎿嶄綔 娣诲姞绛� + isOperate: { + type: Boolean, + default: true + }, + isBorder:{ + type: Boolean, + default: false }, productTableList: { type: Object, default: () => { return { tableData: [], // 鎺ュ彛杩斿洖鏁版嵁 + isReturn: false, + allcol: [], + showcol: [], tableColumn: [ // table琛ㄥ崟 { label: "", prop: "", min: 200, tooltip: true } @@ -200,15 +331,9 @@ total: false, refundable: false, sumProp: [], - multiply: [], - titleProp: ["#", "浜у搧鍚嶇О"], mergeNumber: 1 } } - }, - recalculateShow: { - type: [Boolean], - defalut: true } }, data() { @@ -218,40 +343,88 @@ tableList: [], editSelCommonConfig: { editVisible: false, + isSelectBox: false, title: "", infomation: {} }, - productIndex: 0 + productIndex: 0, + isRecalculate: true, + iscolopen: false, + showcol: [], + mergeNumber:1 } }, created() { - this.getProductList() - this.tableList = this.productTableList + if (!this.selectBox) { + this.getProductList() + } + this.getTableInfo() + }, + watch:{ + "productTableList": { + handler() { + this.showcol = this.productTableList.showcol + this.getTableInfo() + }, + immediate: true + }, + "productTableList.showcol": { + handler(newVal) { + this.showcol = newVal + this.getMergeNumber() + }, + immediate: true + }, }, computed: {}, - watch: { - productTableList() { - this.tableList = this.productTableList - } - }, methods: { + getMergeNumber(){ + let pattern=new RegExp("[0-9]+"); + if(pattern.test(this.showSummary.mergeNumber)){ + this.mergeNumber=this.showSummary.mergeNumber + }else{ + for(let i in this.showcol){ + if(this.showcol[i]==this.showSummary.mergeNumber){ + this.mergeNumber=Number(i)+1; + } + } + } + }, + checkCol() { + this.iscolopen = !this.iscolopen + }, + selectCheckBoxList(val) { + this.getMergeNumber() + this.$emit("selTableCol", val) + }, + getTableInfo(){ + this.tableList = this.productTableList + if (this.tableList.tableData.length === 1 && this.tableList.tableData[0].name === "") { + this.isRecalculate = false + } else { + this.isRecalculate = true + } + }, // 浜у搧鍚嶇О async getProductList() { - let fn = this.sign == "purchase" ? getProductList : getProductListFromGrpc - await fn({ - page: 1, - pageSize: 100 - }).then((res) => { - if (res.data.code === 200) { - if (res.data.data.list && res.data.data.list.length > 0) { - this.productList = res.data.data.list - } - } - }) + // await getProductList({ + // productName: "", + // productNumber: "", + // page: 1, + // pageSize: 100 + // }).then((res) => { + // console.log(res, "浜у搧鍚嶇О") + // if (res.code === 200) { + // if (res.data.data && res.data.data.length > 0) { + // this.productList = res.data.data + // } + // } + // }) }, handleReserve(row) { return row._id ? row._id : row.id }, + // 澶氶�� handleSelectionChange(val) { this.$emit("getSelectArray", val) }, @@ -262,11 +435,11 @@ if (this.$refs.table) { var current = this.$refs.table.querySelector(".el-table__footer-wrapper").querySelector(".el-table__footer") var cell = current.rows[0].cells - for (let i = 0; i < this.showSummary.mergeNumber; i++) { + for (let i = 0; i < this.mergeNumber; i++) { cell[i].style.display = "none" } - cell[this.showSummary.mergeNumber].classList.remove("is-left") - cell[this.showSummary.mergeNumber].colSpan = this.showSummary.mergeNumber.toString() + cell[this.mergeNumber].classList.remove("is-left") + cell[this.mergeNumber].colSpan = this.mergeNumber.toString() } }) } @@ -277,13 +450,17 @@ const sums = [] columns.forEach((column, index) => { // // 鏇存敼琛屽悕绉� - if (index === this.showSummary.mergeNumber) { - sums[index] = "灏忚:" + if (index === this.mergeNumber) { + sums[index] = this.showSummary.totalLabel?this.showSummary.totalLabel:"灏忚:" return } - const title = this.showSummary.titleProp + const title = ["#", "浜у搧鍚嶇О", "浜у搧缂栧彿", "鍗曚綅", "閿�鍞崟浠�", "鎴愭湰鍗曚环"] // 鍘婚櫎鏌愪簺涓嶉渶瑕佽绠楃殑鏁版嵁 if (title.includes(column.label)) { + sums[index] = "" + return + } + if (this.pageName == "quotation" && column.label == "姣涘埄") { sums[index] = "" return } @@ -305,12 +482,10 @@ } if (column.property === "total") { this.total = sums[index] - this.$emit("getSummaries", this.total) } }) return sums }, - // 鏁板瓧鎹㈣涓洪噾棰濇樉绀烘牸寮� number_format(number, decimals, dec_point, thousands_sep) { decimals = 2 //杩欓噷榛樿璁剧疆淇濈暀涓や綅灏忔暟锛屼篃鍙互娉ㄩ噴杩欏彞閲囩敤浼犲叆鐨勫弬鏁� @@ -341,16 +516,72 @@ }, // 鏂板 add() { - this.$emit("addProductClick") + if (this.addTypeIdMultiple) { + this.productIndex = this.tableList.tableData.length + this.editSelCommonConfig.title = "浜у搧鍚嶇О" + this.editSelCommonConfig.isSelectBox = true + this.editSelCommonConfig.editVisible = true + } else { + this.$emit("addProductClick") + } }, - commonInputChange(val, prop, row) { - console.log(val, prop) - console.log(row) - this.$emit("inputContent", val, prop, row) + commonInputChange(val, prop, row, scope) { + if (prop === "amount") { + this.tableList.tableData.map((ite) => { + if (ite.name === row.name) { + ite.total = row.amount * row.price + } + }) + } + if (this.pageName == "quotation" && prop == "cost" && scope.row.cost) { + let value = scope.row.cost + let reg2 = /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/ + if (!reg2.test(value) || value == 0) { + this.$message.error("鎴愭湰鍗曚环闇�瑕佸~鍐欏ぇ浜�0鐨�2浣嶅皬鏁帮紒") + return true + } + this.$forceUpdate() + } + if (this.pageName == "quotation") { + if (prop == "price" || prop == "cost") { + if (scope.row.price && scope.row.cost) { + let profit = Number(scope.row.price) - Number(scope.row.cost) + scope.row.profit = profit + "" + let margin = (((Number(scope.row.price) - Number(scope.row.cost)) * 100) / Number(scope.row.cost)).toFixed( + 2 + ) + scope.row.margin = margin + "" + } + } + } + this.$emit("inputContent", val, prop, row, scope) }, // 娓呯┖ empty() { + this.isRecalculate = false this.$emit("emptyProductClick") + }, + // 鍒犻櫎 + deleteClick(scope) { + this.tableList.tableData.splice(scope.$index, 1) + this.$forceUpdate() + this.$message.success("鍒犻櫎鎴愬姛锛�") + this.$emit("deleteClick", scope) + }, + // 閲嶇畻 + recalculate() { + this.$confirm("纭畾瑕侀噸绠楁槑缁嗘墍鏈夎?", "鎻愮ず", { + confirmButtonText: "纭畾", + cancelButtonText: "鍙栨秷", + type: "warning" + }) + .then(() => { + this.$emit("recalculateProductClick") + this.tableList.tableData.map((ite) => { + ite.total = ite.amount ? ite.amount * ite.price : 1 * ite.price + }) + }) + .catch(() => {}) }, // 閫夋嫨浜у搧鍚嶇О鐩稿叧鏂规硶 querySearchAsync(queryString, cb) { @@ -365,116 +596,82 @@ }, handleSelectClient(item, prop, row) { // this.clientId = item.id + this.isRecalculate = true console.log(item, prop, row) this.tableList.tableData.map((ite) => { if (ite.name === item.name) { - ite.ID = row.ID ite.amount = item.amount || 1 ite.number = item.number - ite.purchasePrice = item.purchasePrice + ite.price = item.price + ite.total = item.amount ? item.amount * item.price : 1 * item.price ite.unit = item.unit - ite.deliveryTime = item.deliveryTime - ite.shippingDuration = item.shippingDuration - ite.modelNumber = item.modelNumber } }) - if (this.detailEnter) { - this.setEditName(item, row.ID) - } }, - setEditName(item, ID) { - let selRow = { - ID: ID, - deliveryTime: item.deliveryTime, - maximumStock: item.maximumStock, - minimumStock: item.minimumStock, - modelNumber: item.modelNumber, - name: item.name, - number: item.number, - productType: item.productType, - purchasePrice: item.purchasePrice, - remark: item.remark, - shippingDuration: item.shippingDuration, - specifications: item.specifications, - supplierId: item.supplierId, - unit: item.unit - } - this.$emit("selCommonName", selRow) - }, - selClientClick(row, prop, scope) { - console.log(row, prop) + // 鏂板 + selClientClick(scope, prop) { + console.log(scope, prop) this.productIndex = scope.$index this.editSelCommonConfig.title = "浜у搧鍚嶇О" + this.editSelCommonConfig.isSelectBox = true + this.editSelCommonConfig.editVisible = true + }, + // 缂栬緫 + handleEditClient(scope, prop) { + console.log(scope, prop) + this.productIndex = scope.$index + this.editSelCommonConfig.title = "浜у搧鍚嶇О" + this.editSelCommonConfig.isSelectBox = false this.editSelCommonConfig.editVisible = true }, selClient(item) { - console.log(item) - console.log(this.tableList.tableData) - if (this.detailEnter) { - this.tableList.tableData.map((ite) => { - ite.ID - ite.name = item.name - ite.amount = item.amount || 1 - ite.number = item.number - ite.purchasePrice = item.purchasePrice - ite.unit = item.unit - ite.deliveryTime = item.deliveryTime - ite.shippingDuration = item.shippingDuration - }) - this.setEditName(item, this.tableList.tableData[0].ID) - } else { + let list = this.tableList.tableData.map((item) => item.number) + if (list.findIndex((v) => v == item.number) == -1) { + this.isRecalculate = true + // this.editConfig.infomation.client_name = row.name this.tableList.tableData.map((ite, index) => { if (index === this.productIndex) { ite.name = item.name - ite.productId = item.ID ite.amount = item.amount || 1 ite.number = item.number - ite.purchasePrice = item.purchasePrice + ite.price = item.price + ite.total = item.amount ? item.amount * item.price : 1 * item.price ite.unit = item.unit - ite.deliveryTime = item.deliveryTime - ite.shippingDuration = item.shippingDuration - this.$set(this.tableList.tableData, index, ite) - this.$forceUpdate() } }) - - console.log(this.tableList.tableData, "=====chanp") + } else { + this.$message.error("涓嶈兘閫夋嫨閲嶅鐨勪骇鍝侊紝 璇烽噸鏂伴�夋嫨") } }, + getSelectArray(val) { + this.$emit("getSelectArray", val, this.productIndex) + }, // 娓呴櫎宸查�夋嫨鐢ㄦ埛 - clearupClient(row, scope) { + clearupClient(scope) { this.productIndex = scope.$index this.tableList.tableData.map((ite, index) => { - console.log(scope.$index) - if (scope.$index && scope.$index >= 0) { - if (index === this.productIndex) { - ite.name = "" - ite.amount = 1 - ite.number = "" - ite.purchasePrice = 0 - ite.unit = "" - ite.deliveryTime = 0 - ite.shippingDuration = 0 - } - } else { + if (index === this.productIndex) { ite.name = "" ite.amount = 1 ite.number = "" - ite.purchasePrice = 0 + ite.price = 0 + ite.total = 0 ite.unit = "" - ite.deliveryTime = 0 - ite.shippingDuration = 0 } }) this.$emit("clearupProduct", this.tableList.tableData) - }, - deleteClient(row, scope) { - if (this.tableList.tableData.length == 1) { - this.$message.error("鑷冲皯淇濈暀涓�鏉★紝涓嶈兘鍒櫎浜嗭紒") - return true - } - this.tableList.tableData.splice(scope.$index, 1) } + // 澶氶�夎缃凡閫変腑 + // toggleSelection(rows) { + // console.log("88888888888888888888888888888888888888888") + // console.log(rows) + // if (rows) { + // rows.forEach((row) => { + // this.$refs.fromTable.toggleRowSelection(row, true) + // console.log(row) + // }) + // } + // } } } </script> @@ -482,7 +679,10 @@ <!-- Add "scoped" attribute to limit CSS to this component only --> <style lang="scss" scoped> .page-view { - min-width: 100px; + position: relative; + .el-form{ + height:calc(100% - 120px); + } .el-form-item { margin-bottom: 0; .custom-name { @@ -511,8 +711,47 @@ .el-table th.el-table__cell > .cell { padding: 0 5px; } + .el-table__fixed-footer-wrapper tbody td.el-table__cell{ + background:#fff; + } .el-input__inner { - text-align: left; + // text-align: left; + text-align: center !important; + } + .styleBtn { + position: absolute; + width: 30px; + height: 48px; + // line-height: 26px; + // background: #06c062; + top: 0; + right: -6px; + z-index: 11; + .label { + position: absolute; + top: 11px; + font-size: 20px; + // line-height: 5px; + cursor: pointer; + color: #000; + transform: rotate(-90deg); + } + .checkbox-group { + width: 160px; + height: 180px; + overflow: auto; + display: flex; + flex-direction: column; + line-height: 25px; + background: #ffffff; + border-radius: 16px; + padding: 12px; + position: absolute; + right: 0; + top: 30px; + z-index: 99; + box-shadow: 0 0 2px 2px #f8f8f8; + } } } </style> diff --git a/src/components/makepager/TableCommonView.vue b/src/components/makepager/TableCommonView.vue index c61b4fa..350d107 100644 --- a/src/components/makepager/TableCommonView.vue +++ b/src/components/makepager/TableCommonView.vue @@ -20,7 +20,13 @@ :row-class-name="tableRowClassName" > <el-table-column v-if="selectBox" type="selection" width="40" :selectable="selectable"> </el-table-column> - <el-table-column v-if="tableList.selectIndex" type="index" label="搴忓彿" width="50"></el-table-column> + <el-table-column + v-if="tableList.selectIndex" + type="index" + label="搴忓彿" + width="50" + :fixed="tableList.isFixed" + ></el-table-column> <el-table-column v-for="(item, i) in tableList.tableColumn" :key="i" @@ -30,6 +36,7 @@ :min-width="item.min" show-overflow-tooltip :sortable="item.sortable" + :fixed="item.fixed" v-if="item.isShowColumn" > @@ -169,6 +176,7 @@ default: () => { return { selectIndex: true, + isFixed: false, tableInfomation: [], // 鎺ュ彛杩斿洖鏁版嵁 showcol: [], allcol: [], diff --git a/src/router/product/index.js b/src/router/product/index.js index 047b313..8d31951 100644 --- a/src/router/product/index.js +++ b/src/router/product/index.js @@ -29,7 +29,7 @@ name: "silkRegisterAddPage", component: silkRegisterAddPage, meta: { - title: "鏂板绾ゅ害鐧昏琛�/绾ゅ害妫�楠岃〃" + title: "绾ゅ害鐧昏琛�/绾ゅ害妫�楠岃〃" } }, { diff --git a/src/views/productManage/silkInspectForm/index.vue b/src/views/productManage/silkInspectForm/index.vue index 5bc971f..42c3c14 100644 --- a/src/views/productManage/silkInspectForm/index.vue +++ b/src/views/productManage/silkInspectForm/index.vue @@ -11,7 +11,7 @@ @searchClick="onFilterSearch" > <template slot="leftButton"> - <el-button size="small" type="primary" @click="addBtnClick">鏂板缓</el-button> + <!-- <el-button size="small" type="primary" @click="addBtnClick">鏂板缓</el-button> --> <el-button size="small" type="primary" @click="printClick">鎵撳嵃</el-button> </template> </CommonSearch> @@ -30,8 +30,8 @@ <template slot="tableButton"> <el-table-column label="鎿嶄綔" width="90" fixed="right"> <template slot-scope="scope"> - <el-button @click="handleClick(scope.row)" type="text" size="small">缂栬緫</el-button> - <el-button @click="delClick(scope.row.id)" type="text" size="small">鍒犻櫎</el-button> + <el-button @click="handleClick(scope.row)" type="text" size="small">淇敼</el-button> + <el-button @click="delClick(scope.row.ID)" type="text" size="small">鍒犻櫎</el-button> </template> </el-table-column> </template> @@ -46,7 +46,7 @@ </template> <script> -import { getFollowRecordList, getDeleteFollowRecord } from "@/api/productManage/silkInspectForm.js" +import { getInspectCheckList, getInspectCheckDelete } from "@/api/productManage/silkInspectForm.js" import pageMixin from "@/components/makepager/pager/mixin/pageMixin" export default { @@ -61,25 +61,20 @@ tableList: {}, loading: false, searchOptions: [], - editConfig: { - visible: false, - title: "鏂板缓", - infomation: {} - }, - search_map: {}, + keyword: '', tableColumn: [ - { label: "缂栧彿", prop: "topic", min: 120, default: true }, // 涓婚 - { label: "杞﹂棿", prop: "client_name", min: 190, }, // 瀹㈡埛鍚嶇О - { label: "杞︾粍", prop: "contact_name", min: 100, }, // 鑱旂郴浜哄鍚� - { label: "鏃ユ湡", prop: "client_status", min: 100 }, // 瀹㈡埛鐘舵�� - { label: "骞冲潎绾ゅ害", prop: "contact_information_name", min: 100 }, // 鑱旂郴鏂瑰紡 - { label: "鍏噺绾ゅ害", prop: "follow_time", min: 130 }, // 鑱旂郴浜烘棩鏈� - { label: "鍋忓樊", prop: "next_follow_time", min: 130 }, // 涓嬫鍥炶鏃ユ湡 - { label: "鎬诲樊", prop: "member_name", min: 110 }, // 璐熻矗浜� - { label: "杞︾粍绛夌骇", prop: "member_name", min: 110 }, // 璐熻矗浜� - { label: "娓呮磥", prop: "member_name", min: 110 }, // 璐熻矗浜� - { label: "娲佸噣", prop: "member_name", min: 110 }, // 璐熻矗浜� - { label: "瑙勬牸", prop: "member_name", min: 110 }, // 璐熻矗浜� + { label: "缂栧彿", prop: "number", min: 120, default: true }, + { label: "杞﹂棿", prop: "name", min: 190, }, + { label: "杞︾粍", prop: "workshopGroup", min: 100, }, + { label: "鏃ユ湡", prop: "finishDate", min: 100 }, + { label: "骞冲潎绾ゅ害", prop: "averageFineness", min: 100 }, + { label: "鍏噺绾ゅ害", prop: "measureFineness", min: 130 }, + { label: "鍋忓樊", prop: "deviation", min: 130 }, + { label: "鎬诲樊", prop: "totalDeviation", min: 110 }, + { label: "杞︾粍绛夌骇", prop: "finenessGrade", min: 110 }, + { label: "娓呮磥", prop: "cleanliness", min: 110 }, + { label: "娲佸噣", prop: "purity", min: 110 }, + { label: "瑙勬牸", prop: "spec", min: 110 }, ], showCol: [ "缂栧彿", @@ -99,7 +94,7 @@ }, created() { this.setTable() - this.getData(this.search_map) + this.getData(this.keyword) }, computed: { }, @@ -135,24 +130,23 @@ // 璇锋眰鏁版嵁 async getData() { this.loading = true - await getFollowRecordList({ - search_map: this.search_map, + await getInspectCheckList({ + keyword: this.keyword, page: this.pagerOptions.currPage, pageSize: this.pagerOptions.pageSize }) .then((res) => { console.log(res) if (res.code === 200) { - if (res.data.list && res.data.list.length > 0) { - const list = res.data.list.map((item) => { + if (res.data&& res.data.length > 0) { + const list = res.data.map((item) => { return { ...item, - client_name: item.client.name, - contact_name: item.contact.name, - client_status: item.client_status.name, - phone: item.contact.phone, - member_name: item.member.username, - contact_information_name: item.contact_information.name + number: item.finenessRegister.number, + name: item.finenessRegister.name, + workshopGroup: item.finenessRegister.workshopGroup, + finishDate: item.finenessRegister.finishDate, + spec:item.finenessRegister.spec, } }) this.tableList.tableInfomation = list || [] @@ -173,7 +167,7 @@ }, // 鎼滅储 onFilterSearch(searchText) { - this.search_map.client_name = searchText ?? "" + this.keyword= searchText ?? "" this.pagerOptions.currPage = 1 this.getData() }, @@ -189,23 +183,26 @@ }, // 缂栬緫 handleClick(row) { - console.log(row) - this.editConfig.title = "缂栬緫" - let config=JSON.parse(JSON.stringify(row)); - config.client_status_id=config.client_status_id?config.client_status_id:null - config.contact_information_id=config.contact_information_id?config.contact_information_id:null - this.editConfig.infomation = { ...config, sale_chance_name:row.sale_chance.name, sales_leads_name: "" } - this.editConfig.visible = true + this.$router.push({ + path:"/productManage/silkRegisterForm/addPage", + query:{ + activeName:'second', + inspectID:row.ID, + id:row.finenessRegisterID, + number:row.number, + } + }); }, // 鍒犻櫎 delClick(id) { - this.$confirm("鏄惁纭鍒犻櫎?", "璀﹀憡", { + debugger + this.$confirm("璇风‘璁ゆ槸鍚﹀垹闄わ紝鍒犻櫎鎿嶄綔涓嶅彲鎾ら攢??", "璀﹀憡", { confirmButtonText: "纭畾", cancelButtonText: "鍙栨秷", type: "warning" }) .then(() => { - getDeleteFollowRecord({ ids: [id] }).then((response) => { + getInspectCheckDelete({ id: id }).then((response) => { if (response.code === 200) { this.$message.success("鍒犻櫎鎴愬姛") this.getData() diff --git a/src/views/productManage/silkRegisterForm/addPage.vue b/src/views/productManage/silkRegisterForm/addPage.vue index 62f66a8..d227d14 100644 --- a/src/views/productManage/silkRegisterForm/addPage.vue +++ b/src/views/productManage/silkRegisterForm/addPage.vue @@ -3,7 +3,7 @@ <div class="tab-view"> <el-tabs v-model="activeName" @tab-click="tabsClick"> <el-tab-pane label="绾ゅ害鐧昏琛�" name="first"></el-tab-pane> - <el-tab-pane label="绾ゅ害妫�楠岃〃" name="second"></el-tab-pane> + <el-tab-pane label="绾ゅ害妫�楠岃〃" :disabled='!registerId&&!isRegisterSave' name="second"></el-tab-pane> </el-tabs> </div> <template v-if="activeName == 'first'"> @@ -13,7 +13,8 @@ placeholder="璇疯緭鍏ュ叧閿瘝" @searchClick="onFilterSearch"> <template slot="leftButton"> <el-button size="small" type="primary" @click="cancelClickOne">鏀惧純</el-button> - <el-button size="small" type="primary" @click="saveClickOne('form')">淇濆瓨</el-button> + <el-button size="small" type="primary" :loading="isAddloading" + @click="saveClickOne('form')">淇濆瓨</el-button> </template> </CommonSearch> </div> @@ -47,13 +48,13 @@ </el-select> </el-form-item> <el-form-item label="瑙勬牸" prop="spec" class="form-item"> - <el-input v-model="form.spec" placeholder="璇疯緭鍏�"> - </el-input> - <!-- <el-select v-model="form.spec" placeholder="璇烽�夋嫨" class="select-width"> - <el-option v-for="item in deliveryTypeList" :key="item.id" :label="item.name" - :value="item.id"> + <el-select v-model="form.spec" placeholder="璇烽�夋嫨" class="select-width"> + <el-option v-for="item in specList" :key="item.ID" :label="item.name" + :value="item.name"> </el-option> - </el-select> --> + </el-select> + <!-- <el-input v-model="form.spec" placeholder="璇疯緭鍏�"> + </el-input> --> </el-form-item> <el-form-item label="缁勫埆" prop="workshopGroup" class="form-item"> <el-select v-model="form.workshopGroup" placeholder="璇烽�夋嫨" class="select-width"> @@ -61,21 +62,23 @@ :value="item.ID"> </el-option> </el-select> + </el-form-item> <el-form-item label="鍥炴暟" prop='circle' class="form-item"> <el-row> <el-col :span="11"> - <el-form-item label="" @input="inputStart" label-width="0" prop="startCircle" class="select-width"> - <el-input v-model.number="form.startCircle" placeholder="璇疯緭鍏�" show-word-limit - class="select-width"></el-input> + <el-form-item label="" @input="inputStart" label-width="0" prop="startCircle" + class="select-width"> + <el-input v-model.number="form.startCircle" placeholder="璇疯緭鍏�" show-word-limit + class="select-width"></el-input> </el-form-item> </el-col> <el-col :span="2" style="margin:0 auto;text-align:center;">-</el-col> <el-col :span="11"> <el-form-item label="" label-width="0" prop="endCircle" class="select-width"> - <el-input v-model.number="form.endCircle" @input="inputStart" placeholder="璇疯緭鍏�" show-word-limit - class="select-width"></el-input> + <el-input v-model.number="form.endCircle" @input="inputStart" placeholder="璇疯緭鍏�" + show-word-limit class="select-width"></el-input> </el-form-item> </el-col> </el-row> @@ -86,9 +89,14 @@ </el-form-item> </el-form> <div class="list-view"> - <TableCommonView ref="tableListRef" :colOpenShow="false" v-loading="loading" :table-list="tableList" + <!-- <TableCommonView ref="tableListRef" :colOpenShow="false" v-loading="loading" :table-list="tableList" @selTableCol="selTableCol"> - </TableCommonView> + </TableCommonView> --> + <!-- 淇敼涓鸿緭鍏� --> + <CommonFormTableView ref="commonFormTableView" :detail-enter="isView ? true : false" + :selectBox="false" :detailEnter="true" :show-summary="showSummary" + :product-table-list="tableList" @inputContent="inputContent" + @addProductClick="addProductClick"></CommonFormTableView> </div> </div> <div class="body-r"> @@ -98,47 +106,48 @@ </div> </template> <template v-if="activeName == 'second'"> - <!-- <div class="body-two body" v-if="activeName == 'second'"> + <div class="filter"> + <div class="filter-card"> + <!-- <CommonSearch :show-add="false" :show-download="false" :amount-view="false" :show-action-btn="false" + placeholder="璇疯緭鍏ュ叧閿瘝" @searchClick="onFilterSearch"> + <template slot="leftButton"> --> + <el-button size="small" type="primary" @click="cancelClickTwo">鏀惧純</el-button> + <el-button size="small" type="primary" :loading="isAddloading" + @click="saveClickOne('form')">淇濆瓨</el-button> + <!-- </template> +</CommonSearch> --> + </div> + </div> + <div class="body-two body"> <div class="body-two-t">绾ゅ害妫�楠岃〃</div> - <el-form ref="form" class="form-box" :model="form" :rules="rules" label-position="right" label-width="60px"> + <el-form ref="form" class="form-box" :model="form" :rules="rules" label-position="right" + label-width="60px"> <div class="form-box-t"> - <el-form-item label="缂栧彿" prop="clientName" class="form-item"> - 1234546677 + <el-form-item label="缂栧彿" prop="number" class="form-item"> + {{ form.number }} </el-form-item> - <el-form-item label="杞﹂棿" prop="deliverType" class="form-item"> - <el-select v-model="form.deliverType" placeholder="璇烽�夋嫨"> - <el-option v-for="item in deliveryTypeList" :key="item.id" :label="item.name" - :value="item.id"> - </el-option> - </el-select> + <el-form-item label="杞﹂棿" prop="name" class="form-item"> + {{ form.name }} </el-form-item> - <el-form-item label="缁勫埆" prop="deliverType" class="form-item"> - <el-select v-model="form.deliverType" placeholder="璇烽�夋嫨" style="width: 100%"> - <el-option v-for="item in deliveryTypeList" :key="item.id" :label="item.name" - :value="item.id"> - </el-option> - </el-select> + <el-form-item label="缁勫埆" prop="workshopGroup" class="form-item"> + {{ form.workshopGroup }} </el-form-item> - <el-form-item label="鍥炴暟" prop="amount" class="form-item"> - <el-input v-model.number="form.amount" placeholder="璇疯緭鍏�" show-word-limit - style="width: 100%"></el-input> + <el-form-item label="鍥炴暟" prop="circle" class="form-item"> + {{ form.circle }} </el-form-item> - <el-form-item label="瑙勬牸" prop="clientName" class="form-item"> - <el-input v-model="form.clientName" placeholder="璇疯緭鍏�"> - </el-input> + <el-form-item label="瑙勬牸" prop="spec" class="form-item"> + {{ form.spec }} </el-form-item> - <el-form-item label="鏃ユ湡" prop="signTime" class="form-item"> - <el-date-picker v-model="form.signTime" value-format="yyyy-MM-dd" type="date" placeholder="閫夋嫨鏃ユ湡" - style="width:100%"> - </el-date-picker> + <el-form-item label="鏃ユ湡" prop="finishDate" class="form-item"> + {{ form.finishDate }} </el-form-item> </div> <div class="list-view"> <el-table ref="multipleTable" :data="tableTwoList.tableInfomation" tooltip-effect="dark" style="width: 100%"> - <el-table-column label="杞﹀彿" prop="templateName" width="100"> + <el-table-column label="杞﹀彿" prop="ID" width="100"> </el-table-column> - <el-table-column label="涓嬪樊绾ゅ害" prop="name" width="100" align="center"> + <el-table-column label="涓嬪樊绾ゅ害" prop="name1" width="100" align="center"> <template v-for="(item, i) in tableTwoList.lower"> <el-table-column align="center" :key="i" :prop="item.prop" :label="item.label" :width="item.width" :min-width="item.min" show-overflow-tooltip @@ -146,7 +155,7 @@ </el-table-column> </template> </el-table-column> - <el-table-column label="鐩殑绾ゅ害" prop="name" width="100" align="center"> + <el-table-column label="鐩殑绾ゅ害" prop="name2" width="100" align="center"> <template v-for="(item, i) in tableTwoList.objective"> <el-table-column align="center" :key="i" :prop="item.prop" :label="item.label" :width="item.width" :min-width="item.min" show-overflow-tooltip @@ -154,7 +163,7 @@ </el-table-column> </template> </el-table-column> - <el-table-column label="涓婂樊绾ゅ害" prop="name" width="100" align="center"> + <el-table-column label="涓婂樊绾ゅ害" prop="name3" width="100" align="center"> <template v-for="(item, i) in tableTwoList.upper"> <el-table-column align="center" :key="i" :prop="item.prop" :label="item.label" :width="item.width" :min-width="item.min" show-overflow-tooltip @@ -162,9 +171,9 @@ </el-table-column> </template> </el-table-column> - <el-table-column prop="valueRange" label="鍋忓樊" width="120"> + <el-table-column prop="deviation" label="鍋忓樊" width="120"> </el-table-column> - <el-table-column prop="unit" label="鎬诲樊" show-overflow-tooltip> + <el-table-column prop="totalDeviation" label="鎬诲樊" show-overflow-tooltip> </el-table-column> <el-table-column prop="valueRange" label="閲庣氦" width="120"> </el-table-column> @@ -172,102 +181,88 @@ </el-table-column> <el-table-column prop="valueRange" label="鐗归噹" width="120"> </el-table-column> - <el-table-column prop="unit" label="绛夌骇" show-overflow-tooltip> + <el-table-column prop="finenessGrade" label="绛夌骇" show-overflow-tooltip> </el-table-column> - <el-table-column prop="valueRange" label="II搴�" width="120"> + <el-table-column prop="twiceChange" label="II搴�" width="120"> </el-table-column> - <el-table-column prop="unit" label="娓呮磥" show-overflow-tooltip> + <el-table-column prop="cleanliness" label="娓呮磥" show-overflow-tooltip> </el-table-column> - <el-table-column prop="valueRange" label="娲佸噣" width="120"> + <el-table-column prop="purity" label="娲佸噣" width="120"> </el-table-column> - <el-table-column prop="unit" label="澶囨敞" show-overflow-tooltip> + <el-table-column prop="remark" label="澶囨敞" show-overflow-tooltip> </el-table-column> </el-table> </div> <div class="form-box-b"> - <el-form-item label="骞冲潎绾ゅ害" prop="clientName" class="form-item-two" label-width="100px"> - 1234546677 + <el-form-item label="骞冲潎绾ゅ害" prop="averageFineness" class="form-item-two" label-width="100px"> + {{ form.averageFineness }} </el-form-item> - <el-form-item label="鍏噺绾ゅ害" prop="deliverType" class="form-item" label-width="100px"> - <el-input v-model="form.clientName" placeholder="璇疯緭鍏�"> + <el-form-item label="鍏噺绾ゅ害" prop="measureFineness" class="form-item" label-width="100px"> + <el-input v-model="form.measureFineness" placeholder="璇疯緭鍏�"> </el-input> </el-form-item> - <el-form-item label="鍋忓樊" prop="clientName" class="form-item-two"> - 0.98 + <el-form-item label="鍋忓樊" prop="deviation" class="form-item-two"> + {{ form.deviation }} </el-form-item> - <el-form-item label="鎬诲樊" prop="clientName" class="form-item-two"> - 0.98 + <el-form-item label="鎬诲樊" prop="totalDeviation" class="form-item-two"> + {{ form.totalDeviation }} </el-form-item> - <el-form-item label="杞︾粍绛夌骇" prop="deliverType" class="form-item-two" label-width="100px"> - 4A + <el-form-item label="杞︾粍绛夌骇" prop="finenessGrade" class="form-item-two" label-width="100px"> + {{ form.finenessGrade }} </el-form-item> - <el-form-item label="II搴�" prop="amount" class="form-item"> - <el-input v-model="form.clientName" placeholder="璇疯緭鍏�"> + <el-form-item label="II搴�" prop="twiceChange" class="form-item"> + <el-input v-model="form.twiceChange" placeholder="璇疯緭鍏�"> </el-input> </el-form-item> - <el-form-item label="娓呮磥" prop="clientName" class="form-item"> - <el-input v-model="form.clientName" placeholder="璇疯緭鍏�"> + <el-form-item label="娓呮磥" prop="cleanliness" class="form-item"> + <el-input v-model="form.cleanliness" placeholder="璇疯緭鍏�"> </el-input> </el-form-item> - <el-form-item label="娲佸噣" prop="signTime" class="form-item"> - <el-input v-model="form.clientName" placeholder="璇疯緭鍏�"> + <el-form-item label="娲佸噣" prop="purity" class="form-item"> + <el-input v-model="form.purity" placeholder="璇疯緭鍏�"> </el-input> </el-form-item> - <el-form-item label="搴勫彛宸ヨ壓鍗曠紪鍙�" prop="signTime" class="form-item" label-width="110px"> - <el-input v-model="form.clientName" placeholder="璇疯緭鍏�"> + <el-form-item label="搴勫彛宸ヨ壓鍗曠紪鍙�" prop="marketProcessOrderNumber" class="form-item" + label-width="110px"> + <el-input v-model="form.marketProcessOrderNumber" placeholder="璇疯緭鍏�"> </el-input> </el-form-item> - <el-form-item label="妫�楠屽憳" prop="signTime" class="form-item"> - <el-input v-model="form.clientName" placeholder="璇疯緭鍏�"> + <el-form-item label="妫�楠屽憳" prop="inspector" class="form-item"> + <el-input v-model="form.inspector" placeholder="璇疯緭鍏�"> </el-input> </el-form-item> </div> </el-form> - </div> --> + </div> </template> </div> </template> - + <script> -import { getRegisterList,saveRegister,getDictList } from "@/api/productManage/silkRegisterForm.js" +import { saveRegister, getDictList, getWorkshopManageList, getRegisterDetails } from "@/api/productManage/silkRegisterForm.js" +import { getCheckDetails, saveCheck, } from "@/api/productManage/silkInspectForm.js" import pageMixin from "@/components/makepager/pager/mixin/pageMixin" +import CommonFormTableView from "@/components/makepager/CommonFormTableView" export default { name: "silkRegisterAddPage", props: {}, mixins: [pageMixin], components: { + CommonFormTableView, }, computed: {}, data() { return { - tableList: {}, loading: false, activeName: "first", searchOptions: [], - search_map: {}, - is_public: true, - tableColumn: [ - { label: "杞﹀彿", prop: "position", min: 100, default: true }, // 瀹㈡埛鍚嶇О - { label: "绾ゅ害鍊�", prop: "fineness", default: true }, // 閿�鍞礋璐d汉 - { label: "鏁伴噺", prop: "quantity", default: true }, // 閲嶈绾у埆 - { label: "绾ゅ害鍚堣", prop: "sum", min: 90, default: true }, // 涓嬫鍥炶鏃ユ湡 - ], - showCol: ['杞﹀彿', '绾ゅ害鍊�', '鏁伴噺', '绾ゅ害鍚堣'], - marketList:[], //搴勫彛 - nameList:[], //杞﹂棿 - workshopGroupList:[], //缁勫埆 + keyword: '', + marketList: [], //搴勫彛 + nameList: [], //杞﹂棿 + workshopGroupList: [], //缁勫埆 deliveryTypeList: [], + specList: [], //瑙勬牸 form: { - number:'', - finishDate:'', - market:'', - name:'', - spec:'', - workshopGroup:'', - circle:'', - startCircle:'', - endCircle:'', - position:'', }, rules: { number: [ @@ -276,14 +271,16 @@ finishDate: [ { required: true, message: "璇烽�夋嫨", trigger: ["change", 'blur'] }, ], + // 杞﹂棿 搴旇true name: [ { required: true, message: "璇烽�夋嫨", trigger: ["change", 'blur'] }, ], spec: [ { required: true, message: "璇峰~鍐�", trigger: ["change", 'blur'] }, ], + // 缁勫埆 搴旇true workshopGroup: [ - { required: true, message: "璇烽�夋嫨", trigger: ["change", 'blur'] }, + { required: false, message: "璇烽�夋嫨", trigger: ["change", 'blur'] }, ], circle: [ { required: true, message: "璇峰~鍐�", trigger: ["change", 'blur'] }, @@ -300,199 +297,280 @@ }, tableTwoList: { tableInfomation: [], - lower: [ - { label: "14", prop: "name", min: 100, default: true }, - { label: "14.5", prop: "member_name", default: true }, - { label: "15", prop: "client_level", default: true }, - { label: "15.5", prop: "next_visit_time", min: 90, default: true }, - { label: "16", prop: "name", min: 100, default: true }, - { label: "16.5", prop: "member_name", default: true }, - { label: "17", prop: "client_level", default: true }, - { label: "17.5", prop: "next_visit_time", min: 90, default: true }, - { label: "18", prop: "client_level", default: true }, - { label: "18.5", prop: "next_visit_time", min: 90, default: true }, + lower: [], + objective: [], + upper: [], + }, + // 鏂板绾ゅ害鐧昏琛� + isAddloading: false, + isView: true, + showSummary: { + show: true, + total: true, + totalLabel: '鍚堣:', + sumProp: ["fineness", "quantity", 'sum'], + mergeNumber: 0 + }, + productId: 1, + tableList: { + allcol: [], + headerColor: 'red', + showcol: ['杞﹀彿', '绾ゅ害鍊�', '鏁伴噺', '绾ゅ害鍚堣'], + tableData: [ + { + productId: 1, + position: null, + fineness: null, + quantity: null, + sum: null, + } ], - objective: [ - { label: "19", prop: "name", min: 100, default: true }, - { label: "19.5", prop: "member_name", default: true }, - { label: "20", prop: "client_level", default: true }, - { label: "20.5", prop: "next_visit_time", min: 90, default: true }, - { label: "21", prop: "name", min: 100, default: true }, - ], - upper: [ - { label: "21.5", prop: "name", min: 100, default: true }, - { label: "22", prop: "member_name", default: true }, - { label: "22.5", prop: "next_visit_time", min: 90, default: true }, - { label: "23", prop: "name", min: 100, default: true }, - { label: "23.5", prop: "member_name", default: true }, - { label: "24", prop: "client_level", default: true }, - { label: "24.5", prop: "next_visit_time", min: 90, default: true }, - { label: "25", prop: "client_level", default: true }, - { label: "25.5", prop: "next_visit_time", min: 90, default: true }, - { label: "26", prop: "client_level", default: true }, - { label: "26.5", prop: "next_visit_time", min: 90, default: true }, + tableColumn: [ + { label: "杞﹀彿", prop: "position", inputNumber: true, isRequird: true, }, // 瀹㈡埛鍚嶇О + { label: "绾ゅ害鍊�", prop: "fineness", inputNumber: true, isRequird: true, }, // 閿�鍞礋璐d汉 + { label: "鏁伴噺", prop: "quantity", inputNumber: true, isRequird: true, }, // 閲嶈绾у埆 + { label: "绾ゅ害鍚堣", prop: "sum", inputNumber: true, isRequird: true, }, // 涓嬫鍥炶鏃ユ湡 ], }, + tableData: [], + registerId: '', + inspectID: '', + isRegisterSave:false, } }, created() { let query = this.$route.query; if (query) { this.activeName = query.activeName ? query.activeName : "first"; + this.registerId = query.id ? query.id : ""; + this.inspectID = query.inspectID ? query.inspectID : ""; } - this.setTable() this.getSelectDataList() - this.search_map = { - is_public: this.is_public - } - this.getData() + this.keyword = '' + this.getDetailsData() }, methods: { - getSelectDataList(){ + getDetailsData(id) { + if (this.activeName == 'first') { + this.form = { + number: '', + finishDate: '', + market: '', + name: '', + spec: '', + workshopGroup: '', + circle: '', + startCircle: '', + endCircle: '', + position: '', + } + if (this.registerId) { + getRegisterDetails({ id: id ? id : this.registerId }).then((response) => { + if (response.code === 200) { + let config = JSON.parse(JSON.stringify(response.data ? response.data : {})); + this.form = config; + this.tableList.tableData = config.finenessList ? config.finenessList : [] + } + }) + } + } else { + this.form = { + number: '', + name: '', + workshopGroup: '', + circle: '', + spec: '', + finishDate: '', + averageFineness: '', + measureFineness: '', + deviation: '', + totalDeviation: '', + finenessGrade: '', + twiceChange: '', + cleanliness: '', + purity: '', + marketProcessOrderNumber: '', + inspector: '', + } + if (this.inspectID) { + getCheckDetails({ id: id ? id : this.inspectID }).then((response) => { + if (response.code === 200) { + let config = JSON.parse(JSON.stringify(response.data.info ? response.data.info : {})); + this.form = config; + this.form.number = config.finenessRegister.number + this.form.name = config.finenessRegister.name + this.form.workshopGroup = config.finenessRegister.workshopGroup + this.form.spec = config.finenessRegister.spec + this.form.finishDate = config.finenessRegister.finishDate + this.form.circle = config.finenessRegister.circle + this.getTableHeader() + this.tableTwoList.tableInfomation = response.data.items ? response.data.items : [] + } + }) + } + } + }, + getTableHeader(){ + let lowNumber; + let topNumber; + if(this.form.spec){ + lowNumber=Number(this.form.spec.split('/')[0]) + topNumber=Number(this.form.spec.split('/')[1]) + } + this.tableTwoList.objective=[] + this.tableTwoList.lower=[] + this.tableTwoList.upper=[] + if(lowNumber&&topNumber){ + for(let i = 0; i <lowNumber; i++){ + let item={ + label: lowNumber+i*0.5+'', + prop: lowNumber+i*0.5+'', + min: 100, + default: true + } + this.tableTwoList.objective.push(item) + if(lowNumber+i*0.5==topNumber){ + break; + } + } + let lowStart=lowNumber-5 + for(let i = 0; i <lowStart; i++){ + let item={ + label: lowStart+i*0.5+'', + prop: lowStart+i*0.5+'', + min: 100, + default: true + } + this.tableTwoList.lower.push(item) + if(lowStart+i*0.5==(lowNumber-0.5)){ + break; + } + } + let topEnd=topNumber+5 + for(let i = 1; i <topNumber; i++){ + let item={ + label: topNumber+i*0.5+'', + prop: topNumber+i*0.5+'', + min: 100, + default: true + } + this.tableTwoList.upper.push(item) + if(topNumber+i*0.5==topEnd){ + break; + } + } + } + this.$forceUpdate() + }, + getSelectDataList() { //杞﹂棿 - getDictList({ - dictType: 0, - }).then((res) => { - if (res.code == 200) { - this.nameList=res.data||[] - } - }) - //缁勫埆 getDictList({ dictType: 1, }).then((res) => { - if (res.code == 200) { - this.workshopGroupList=res.data||[] - } - }) - //搴勫彛 - getDictList({ - dictType: 2, + if (res.code == 200) { + this.nameList = res.data || [] + } + }) + //瑙勬牸 + getDictList({ + dictType: 3, }).then((res) => { - if (res.code == 200) { - this.marketList=res.data||[] - } - }) - }, - inputStart(){ - this.form.circle=this.form.startCircle+'-'+this.form.endCircle - }, - setTable() { - this.tableList = { - selectIndex: false, - headerColor: 'red', - tableInfomation: [], - allcol: [], - showcol: this.showCol, - tableColumn: this.setColumnVisible(this.showCol) - } - this.tableList.allcol = this.tableList.tableColumn.filter(ele => !ele.default).map(ele => ele.label); - this.searchOptions = [] - for (let i = 0; i < this.tableList.tableColumn.length; i++) { - const label = this.tableList.tableColumn[i].label - const value = this.tableList.tableColumn[i].prop - this.searchOptions.push({ value: value, label: label }) - } - }, - setColumnVisible(showCol) { - return this.tableColumn.map(ele => { - return { - ...ele, - isShowColumn: showCol.includes(ele.label) + if (res.code == 200) { + this.specList = res.data || [] + } + }) + //缁勫埆 + getWorkshopManageList().then((res) => { + if (res.code == 200) { + this.workshopGroupList = res.data || [] + } + }) + //搴勫彛 + getDictList({ + dictType: 0, + }).then((res) => { + if (res.code == 200) { + this.marketList = res.data || [] } }) }, - selTableCol(val) { - this.showcol = val; - this.tableList.tableColumn = this.setColumnVisible(val); + inputStart() { + this.form.circle = this.form.startCircle + '-' + this.form.endCircle }, - // 璇锋眰鏁版嵁 - async getData() { - this.loading = true - await getRegisterList({ - search_map: this.search_map, - page: this.pagerOptions.currPage, - pageSize: this.pagerOptions.pageSize + // 浜у搧鏂板 + addProductClick() { + this.productId++ + this.tableData.push({ + productId: this.productId, + position: '', + fineness: 0, + quantity: 0, + sum: "", }) - .then((res) => { - console.log(res) - if (res.code === 200) { - if (res.data.list && res.data.list.length > 0) { - const list = res.data.list.map((item) => { - let contact_name = "" - let contact_phone = "" - let contact_id = 0 - let contact_wechat = "" - let contact_email = "" - let position = "" - if (item.contacts.length !== 0) { - for (let i = 0; i < item.contacts.length; i++) { - if (item.contacts[i].is_first) { - contact_name = item.contacts[i].name - contact_phone = item.contacts[i].phone - contact_id = item.contacts[i].id - contact_wechat = item.contacts[i].wechat - contact_email = item.contacts[i].email - position = item.contacts[i].position - } - } - } - return { - ...item, - contact_name: contact_name, - contact_phone: contact_phone, - client_level: item.client_level.name, - client_status: item.client_status.name, - contact_id: contact_id, - member_name: item.member.username, - contact_wechat: contact_wechat, - contact_email: contact_email, - position: position - } - }) - this.tableList.tableInfomation = list || [] - this.tableTwoList.tableInfomation = [] - this.pagerOptions.totalCount = res.data.count - } else { - this.tableList.tableInfomation = [] - } - } else { - this.tableList.tableInfomation = [] - this.tableTwoList.tableInfomation = [] - } - this.loading = false - }) - .catch((err) => { - console.log(err) - this.tableList.tableInfomation = [] - this.loading = false - }) + this.tableList.tableData = this.tableData + this.showSummary.show = true }, - tabsClick(tab) { - console.log(tab.name) - if (tab.name === "first") { - this.is_public = true - } else { - this.is_public = false - } - this.search_map = { - is_public: this.is_public - } - this.pagerOptions.currPage = 1 - this.getData() + // 浜у搧鍒楄〃杈撳叆 + inputContent(val, prop, row) { + this.productId = row.productId + this.tableData.map((item) => { + if (item.productId === row.productId) { + item[prop] = val + } + }) + }, + tabsClick() { + // if (tab.name === "first") { + // this.is_public = true + // } else { + // this.is_public = false + // } + this.$router.push({ + path:"/productManage/silkRegisterForm/addPage", + query:{ + activeName:this.activeName, + inspectID:this.inspectID, + id:this.registerId, + } + }); + this.getDetailsData() + this.keyword = '' }, // 鎼滅储 onFilterSearch(searchText) { - this.search_map = { - is_public: this.is_public, - name: searchText - } + this.keyword = searchText || '' this.pagerOptions.currPage = 1 this.getData() }, // 绾ゅ害鐧昏琛� // 鏀惧純 cancelClickOne() { + if (this.activeName == 'first') { + this.form = { + number: '', + finishDate: '', + market: '', + name: '', + spec: '', + workshopGroup: '', + circle: '', + startCircle: '', + endCircle: '', + position: '', + } + this.$refs.form.resetFields(); + this.productId = 1 + this.tableList.tableData = [{ + productId: 1, + position: '', + fineness: 0, + quantity: 0, + sum: "", + }] + } + }, + // 绾ゅ害妫�楠岃〃 + cancelClickTwo() { }, // 淇濆瓨 @@ -500,21 +578,65 @@ this.$refs[formName].validate((valid) => { if (valid) { let form = JSON.parse(JSON.stringify(this.form)); - delete form.circle - let params = { - finenessList: this.tableList.tableInfomation, - ...form - } - saveRegister(params).then((res) => { - if (res.code == 200) { - this.$message({ - message: "淇濆瓨鎴愬姛锛�", - type: "success", - }); + // params.workshopGroup=Number(params.workshopGroup) + this.isAddloading = true + if (this.activeName == 'first') { + delete form.circle + let finenessList = JSON.parse(JSON.stringify(this.tableList.tableData)); + for (let i in finenessList) { + delete finenessList[i].productId } - }); + let params = { + finenessList: finenessList, + ...form + } + // 缂栬緫 + if (this.inspectID) { + params.ID = this.form.ID?this.form.ID:Number(this.inspectID) + } + saveRegister(params).then((res) => { + if (res.code == 200) { + this.isRegisterSave=true; + this.$message({ + message: "淇濆瓨鎴愬姛锛�", + type: "success", + }); + this.$router.push({ + path:"/productManage/silkRegisterForm", + }); + } + this.isAddloading = false + }).catch(() => { + setTimeout(() => { + this.isAddloading = false; + }, 3000); + }) + } else { + let paramsTwo = { + ...form + } + // 缂栬緫 + if (this.registerId) { + paramsTwo.ID = this.form.ID?this.form.ID:Number(this.registerId) + } + saveCheck(paramsTwo).then((res) => { + if (res.code == 200) { + this.$message({ + message: "淇濆瓨鎴愬姛锛�", + type: "success", + }); + } + this.isAddloading = false + }).catch(() => { + setTimeout(() => { + this.isAddloading = false; + }, 3000); + }) + } + } else { console.log('error submit!!'); + return false; } }); @@ -530,8 +652,8 @@ } } </script> - - <!-- Add "scoped" attribute to limit CSS to this component only --> + +<!-- Add "scoped" attribute to limit CSS to this component only --> <style lang="scss" scoped> ::v-deep { .el-tabs--top .el-tabs__item.is-top:nth-child(2) { @@ -570,7 +692,7 @@ box-sizing: border-box; padding: 10px 10px; border-radius: 12px; - height: calc(100% - 139px - 10px); + height: calc(100% - 139px - 10px - 20px); width: calc(100% - 20px); margin: 0 auto; margin-top: 10px; @@ -605,14 +727,16 @@ &:nth-of-type(3n) { margin-right: 0; } - .select-width{ - width:100%; + + .select-width { + width: 100%; } } } .list-view { height: calc(100% - 0px); + min-height: 200px; overflow: hidden; } } @@ -702,5 +826,4 @@ } } } -</style> - \ No newline at end of file +</style> \ No newline at end of file diff --git a/src/views/productManage/silkRegisterForm/index.vue b/src/views/productManage/silkRegisterForm/index.vue index f301c9d..d7c6e67 100644 --- a/src/views/productManage/silkRegisterForm/index.vue +++ b/src/views/productManage/silkRegisterForm/index.vue @@ -30,8 +30,8 @@ <template slot="tableButton"> <el-table-column label="鎿嶄綔" width="90" fixed="right"> <template slot-scope="scope"> - <el-button @click="handleClick(scope.row)" type="text" size="small">缂栬緫</el-button> - <el-button @click="delClick(scope.row.id)" type="text" size="small">鍒犻櫎</el-button> + <el-button @click="handleClick(scope.row)" type="text" size="small">淇敼</el-button> + <el-button @click="delClick(scope.row.ID)" type="text" size="small">鍒犻櫎</el-button> </template> </el-table-column> </template> @@ -46,7 +46,7 @@ </template> <script> -import { getRegisterList, getDeleteRegister } from "@/api/productManage/silkRegisterForm.js" +import { getRegisterList,getDeleteRegister } from "@/api/productManage/silkRegisterForm.js" import pageMixin from "@/components/makepager/pager/mixin/pageMixin" export default { @@ -61,12 +61,7 @@ tableList: {}, loading: false, searchOptions: [], - editConfig: { - visible: false, - title: "鏂板缓", - infomation: {} - }, - search_map: {}, + keyword: '', tableColumn: [ { label: "缂栧彿", prop: "number", min: 120, default: true }, // 涓婚 { label: "钀戒笣鏃堕棿", prop: "finishDate", min: 190, }, // 瀹㈡埛鍚嶇О @@ -91,7 +86,7 @@ }, created() { this.setTable() - this.getData(this.search_map) + this.getData(this.keyword) }, computed: { }, @@ -128,27 +123,27 @@ async getData() { this.loading = true await getRegisterList({ - search_map: this.search_map, + keyword: this.keyword, page: this.pagerOptions.currPage, pageSize: this.pagerOptions.pageSize }) .then((res) => { console.log(res) if (res.code === 200) { - if (res.data.list && res.data.list.length > 0) { - const list = res.data.list.map((item) => { - return { - ...item, - client_name: item.client.name, - contact_name: item.contact.name, - client_status: item.client_status.name, - phone: item.contact.phone, - member_name: item.member.username, - contact_information_name: item.contact_information.name - } - }) - this.tableList.tableInfomation = list || [] - this.pagerOptions.totalCount = res.data.count + if (res.data && res.data.length > 0) { + // const list = res.data.map((item) => { + // return { + // ...item, + // client_name: item.client.name, + // contact_name: item.contact.name, + // client_status: item.client_status.name, + // phone: item.contact.phone, + // member_name: item.member.username, + // contact_information_name: item.contact_information.name + // } + // }) + this.tableList.tableInfomation = res.data || [] + this.pagerOptions.totalCount = res.count } else { this.tableList.tableInfomation = [] } @@ -165,7 +160,7 @@ }, // 鎼滅储 onFilterSearch(searchText) { - this.search_map.client_name = searchText ?? "" + this.keyword = searchText ?? "" this.pagerOptions.currPage = 1 this.getData() }, @@ -181,23 +176,23 @@ }, // 缂栬緫 handleClick(row) { - console.log(row) - this.editConfig.title = "缂栬緫" - let config=JSON.parse(JSON.stringify(row)); - config.client_status_id=config.client_status_id?config.client_status_id:null - config.contact_information_id=config.contact_information_id?config.contact_information_id:null - this.editConfig.infomation = { ...config, sale_chance_name:row.sale_chance.name, sales_leads_name: "" } - this.editConfig.visible = true + this.$router.push({ + path:"/productManage/silkRegisterForm/addPage", + query:{ + id:row.ID, + activeName:'first' + } + }); }, // 鍒犻櫎 delClick(id) { - this.$confirm("鏄惁纭鍒犻櫎?", "璀﹀憡", { + this.$confirm("璇风‘璁ゆ槸鍚﹀垹闄わ紝鍒犻櫎鎿嶄綔涓嶅彲鎾ら攢?", "璀﹀憡", { confirmButtonText: "纭畾", cancelButtonText: "鍙栨秷", type: "warning" }) .then(() => { - getDeleteRegister({ ids: id }).then((response) => { + getDeleteRegister({ id: id }).then((response) => { if (response.code === 200) { this.$message.success("鍒犻櫎鎴愬姛") this.getData() diff --git a/src/views/reportManage/payableSalaryReport/index.vue b/src/views/reportManage/payableSalaryReport/index.vue index 597d66b..cf609d3 100644 --- a/src/views/reportManage/payableSalaryReport/index.vue +++ b/src/views/reportManage/payableSalaryReport/index.vue @@ -93,7 +93,7 @@ setTable() { this.tableList = { selectIndex: true, - fixed: true, + isFixed: true, tableInfomation: [{ name: "寮犱笁" }, { name: "lisi" }, { name: "鐜嬩簲" }], allcol: [], showcol: this.showCol, -- Gitblit v1.8.0