From d80dac4da5796b9090ffc27407efad1a1d1e0adc Mon Sep 17 00:00:00 2001 From: cuijian <cuijian@xalxzn.com> Date: 星期四, 15 五月 2025 16:26:12 +0800 Subject: [PATCH] 工具分类及工具信息页面 --- src/views/tms/modules/toolsClassify/ToolsClassifyModal.vue | 60 src/views/tms/modules/baseTools/BaseToolsListLeft.vue | 322 +++ src/views/tms/modules/baseTools/ParaBladeModal.vue | 514 ++++ src/views/tms/modules/toolsClassify/ToolsClassifyListLeft.vue | 322 +++ src/views/tms/modules/baseTools/ToolsConfigPropertyList.vue | 60 src/views/tms/modules/baseTools/BaseToolsForm.vue | 187 + src/views/tms/ToolsClassifyList.vue | 39 src/views/tms/modules/baseTools/ParaMillToolModal.vue | 569 +++++ src/views/tms/modules/baseTools/ParaTurningToolsModal.vue | 584 +++++ src/views/tms/modules/baseTools/BaseToolsModal.vue | 60 src/views/tms/modules/baseTools/ParaThreadingToolModal.vue | 507 ++++ src/views/tms/modules/baseTools/ParaThreadingToolList.vue | 72 src/views/tms/modules/baseTools/BaseToolsListRight.vue | 568 +++++ src/views/tms/modules/baseTools/ParaCommonToolList.vue | 57 src/views/tms/BaseToolsList.vue | 39 src/views/tms/modules/baseTools/ParaHoleToolsModal.vue | 555 +++++ src/views/tms/modules/baseTools/ParaCommonToolModal.vue | 342 +++ src/views/tms/modules/toolsClassify/ToolsClassifyListRight.vue | 466 ++++ src/views/tms/modules/baseTools/ParaTurningToolsList.vue | 85 src/views/tms/modules/toolsClassify/ToolsClassifyForm.vue | 240 ++ src/views/tms/modules/baseTools/ParaBladeList.vue | 73 src/views/tms/modules/baseTools/ParaHoleToolsList.vue | 81 src/views/tms/modules/baseTools/ParaMillToolList.vue | 82 src/views/tms/modules/baseTools/ToolsConfigPropertyModal.vue | 342 +++ 24 files changed, 6,226 insertions(+), 0 deletions(-) diff --git a/src/views/tms/BaseToolsList.vue b/src/views/tms/BaseToolsList.vue new file mode 100644 index 0000000..0384f1a --- /dev/null +++ b/src/views/tms/BaseToolsList.vue @@ -0,0 +1,39 @@ +<template> + <a-row + type="flex" + :gutter="16" + > + <a-col + :md="5" + :sm="24" + > + <base-tools-list-left /> + </a-col> + <a-col + :md="24-5" + :sm="24" + > + <base-tools-list-right /> + </a-col> + </a-row> +</template> + +<script> +import BaseToolsListLeft from './modules/baseTools/BaseToolsListLeft' +import BaseToolsListRight from './modules/baseTools/BaseToolsListRight' +export default { + name: 'BaseToolsList', + components: { BaseToolsListLeft, BaseToolsListRight }, + data() { + return { + description: '宸ュ叿淇℃伅', + currentOrgCode: '' + } + }, + methods: {} +} +</script> + +<style scoped> +@import '~@assets/less/common.less'; +</style> \ No newline at end of file diff --git a/src/views/tms/ToolsClassifyList.vue b/src/views/tms/ToolsClassifyList.vue new file mode 100644 index 0000000..858f790 --- /dev/null +++ b/src/views/tms/ToolsClassifyList.vue @@ -0,0 +1,39 @@ +<template> + <a-row + type="flex" + :gutter="16" + > + <a-col + :md="5" + :sm="24" + > + <tools-classify-list-left /> + </a-col> + <a-col + :md="24-5" + :sm="24" + > + <tools-classify-list-right /> + </a-col> + </a-row> +</template> + +<script> +import ToolsClassifyListLeft from './modules/toolsClassify/ToolsClassifyListLeft' +import ToolsClassifyListRight from './modules/toolsClassify/ToolsClassifyListRight' +export default { + name: 'ToolsClassifyList', + components: { ToolsClassifyListLeft, ToolsClassifyListRight }, + data() { + return { + description: '宸ュ叿鍒嗙被', + currentOrgCode: '' + } + }, + methods: {} +} +</script> + +<style scoped> +@import '~@assets/less/common.less'; +</style> \ No newline at end of file diff --git a/src/views/tms/modules/baseTools/BaseToolsForm.vue b/src/views/tms/modules/baseTools/BaseToolsForm.vue new file mode 100644 index 0000000..89de55d --- /dev/null +++ b/src/views/tms/modules/baseTools/BaseToolsForm.vue @@ -0,0 +1,187 @@ +<template> + <a-spin :spinning="confirmLoading"> + <j-form-container :disabled="formDisabled"> + <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail"> + <a-row> + <a-col :span="12"> + <a-form-model-item label="涓婄骇鍒嗙被缂栧彿" :labelCol="labelCol" :wrapperCol="wrapperCol"> + <a-input :disabled="true" v-model="model.parentNum" placeholder="璇疯緭鍏ヤ笂绾у垎绫荤紪鍙�" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item label="涓婄骇鍒嗙被鍚嶇О" :labelCol="labelCol" :wrapperCol="wrapperCol"> + <a-input :disabled="true" v-model="model.parentName" placeholder="璇疯緭鍏ヤ笂绾у垎绫诲悕绉�" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item label="鍒嗙被缂栫爜" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="classifyId"> + <a-input v-model="model.classifyId" placeholder="璇疯緭鍏ュ垎绫荤紪鐮�" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item label="鍒嗙被鍚嶇О" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="typeName"> + <a-input v-model="model.typeName" placeholder="璇疯緭鍏ュ垎绫诲悕绉�" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item label="鏄惁涓哄彾瀛愯妭鐐�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="leafFlag"> + <a-radio-group v-model="model.leafFlag" placeholder="璇烽�夋嫨鏄惁鍙跺瓙鑺傜偣" @change="leafFlagChange"> + <a-radio :value="'1'">鏄�</a-radio> + <a-radio :value="'2'">鍚�</a-radio> + </a-radio-group> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item label="鏄剧ず搴忓彿" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="seq"> + <a-input-number v-model="model.seq" placeholder="璇疯緭鍏ユ樉绀哄簭鍙�" style="width:100%" ></a-input-number> + </a-form-model-item> + </a-col> + <a-col :span="24" v-show="paraTypeFlagShow"> + <a-form-model-item label="鍙傛暟妯℃澘" :labelCol="{span:3}" :wrapperCol="{span:20}" prop="paraTypeFlag"> + <j-dict-select-tag + type="list" + v-model="model.paraTypeFlag" + :triggerChange="true" + dictCode="tool_para_type" + placeholder="璇烽�夋嫨鍙傛暟妯℃澘" + @change="handleTypeChange" + /> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="澶囨敞" :labelCol="{span:3}" :wrapperCol="{span:20}" prop="remark"> + <a-textarea v-model="model.remark" placeholder="璇疯緭鍏ュ娉�" ></a-textarea> + </a-form-model-item> + </a-col> + </a-row> + </a-form-model> + </j-form-container> + </a-spin> +</template> + +<script> + + import { httpAction, getAction } from '@/api/manage' + import { validateDuplicateValue } from '@/utils/util' + import JDictSelectTag from '@/components/dict/JDictSelectTag' + + export default { + name: 'ToolsClassifyForm', + components: { + JDictSelectTag, + }, + props: { + //琛ㄥ崟绂佺敤 + disabled: { + type: Boolean, + default: false, + required: false + } + }, + data () { + return { + paraTypeFlagShow:false, + model:{ + }, + labelCol: { + xs: { span: 24 }, + sm: { span: 6 }, + }, + wrapperCol: { + xs: { span: 24 }, + sm: { span: 16 }, + }, + confirmLoading: false, + validatorRules: { + classifyId: [ + { required: true, message: '璇疯緭鍏ュ伐鍏峰垎绫荤紪鍙�!'}, + ], + typeName: [ + { required: true, message: '璇疯緭鍏ュ伐鍏峰垎绫诲悕绉�!'}, + ], + leafFlag: [ + { required: true, message: '璇烽�夋嫨鏄惁涓哄彾瀛愯妭鐐�!'}, + ], + seq: [ + { min: 0, message: '灞曠ず搴忓彿涓嶈兘灏忎簬0!'}, + ], + paraTypeFlag: [ + { required: true, message: '璇烽�夋嫨鍙傛暟妯℃澘!' }, + ], + }, + url: { + add: "/tms/baseTools/add", + edit: "/tms/baseTools/edit", + queryById: "/tms/baseTools/queryById" + }, + } + }, + computed: { + formDisabled(){ + return this.disabled + }, + }, + created () { + //澶囦唤model鍘熷鍊� + this.modelDefault = JSON.parse(JSON.stringify(this.model)); + }, + methods: { + add (nodeSelected) { + this.modelDefault.parentId = nodeSelected.key + this.modelDefault.parentNum = nodeSelected.entity.classifyId + this.modelDefault.parentName = nodeSelected.entity.typeName + this.edit(this.modelDefault); + }, + edit (record) { + this.model = Object.assign({}, record); + this.visible = true; + if(record.leafFlag == "1"){ + this.paraTypeFlagShow = true + } + }, + submitForm () { + const that = this; + // 瑙﹀彂琛ㄥ崟楠岃瘉 + this.$refs.form.validate(valid => { + if (valid) { + that.confirmLoading = true; + let httpurl = ''; + let method = ''; + if(!this.model.id){ + httpurl+=this.url.add; + method = 'post'; + }else{ + httpurl+=this.url.edit; + method = 'put'; + } + httpAction(httpurl,this.model,method).then((res)=>{ + if(res.success){ + that.$message.success(res.message); + that.$emit('ok'); + }else{ + that.$message.warning(res.message); + } + }).finally(() => { + that.confirmLoading = false; + }) + } + + }) + }, + //鏄惁鍙跺瓙鑺傜偣鍙樺寲鏃讹紝鎺у埗鍙傛暟妯℃澘鏄剧ず闅愯棌 + leafFlagChange(e){ + this.modelDefault.paraTypeFlag = "" + if(e.target.value == 1){ + this.paraTypeFlagShow = true + this.validatorRules.paraTypeFlag[0].required = true + }else{ + this.paraTypeFlagShow = false + this.validatorRules.paraTypeFlag[0].required = false + } + }, + handleTypeChange(value) { + + } + } + } +</script> \ No newline at end of file diff --git a/src/views/tms/modules/baseTools/BaseToolsListLeft.vue b/src/views/tms/modules/baseTools/BaseToolsListLeft.vue new file mode 100644 index 0000000..14e6efa --- /dev/null +++ b/src/views/tms/modules/baseTools/BaseToolsListLeft.vue @@ -0,0 +1,322 @@ +<template> + <a-card + :loading="cardLoading" + :bordered="false" + title="宸ュ叿淇℃伅" + style="height: 100%;" + > + <a-spin :spinning="loading"> + <a-alert + type="info" + :showIcon="true" + style="margin-right: 54px;" + > + <div slot="message"> + 褰撳墠锛�<span v-if="this.currSelected.title">{{ getCurrSelectedTitle() }}</span> + <a + v-if="this.currSelected.title" + style="margin-left: 10px" + @click="onClearSelected" + >鍙栨秷</a> + </div> + </a-alert> + <div class="drawer-bootom-button"> + <a-dropdown + :trigger="['click']" + placement="bottomCenter" + > + <a-menu slot="overlay"> + <a-menu-item + key="1" + @click="expandAll" + >灞曞紑鎵�鏈�</a-menu-item> + <a-menu-item + key="2" + @click="closeAll" + >鍚堝苟鎵�鏈�</a-menu-item> + <a-menu-item + key="3" + @click="refreshTree" + >鍒锋柊</a-menu-item> + </a-menu> + <a-button> + <a-icon type="bars" /> + </a-button> + </a-dropdown> + </div> + + <a-input-search + @search="handleSearch" + style="width:100%;margin-top: 10px" + placeholder="妫�绱㈠伐鍏峰垎绫�" + allowClear + v-model="searchInput" + @change="handleChange" + /> + + <!-- showLine --> + <a-tree + :checkStrictly="checkStrictly" + :expandedKeys.sync="expandedKeys" + :selectedKeys="selectedKeys" + :dropdownStyle="{maxHeight:'200px',overflow:'auto'}" + :treeData="treeDataSource" + :autoExpandParent="autoExpandParent" + @select="onSelect" + @expand="onExpand" + > + <template + slot="title" + slot-scope="{title, type, rfield1}" + > + <Tooltip + placement="top" + title="宸ュ叿鍒嗙被" + > + <i + v-if="type == 0" + class="action-jeecg actioncompany2" + style="font-size: 18px;" + /> + </Tooltip> + + <span v-if="title.indexOf(searchValue) > -1"> + {{ title.substr(0, title.indexOf(searchValue)) }} + <span class="replaceSearch">{{ searchValue }}</span> + {{ title.substr(title.indexOf(searchValue) + searchValue.length) }} + </span> + <span v-else>{{ title }}</span> + + </template> + </a-tree> + </a-spin> + </a-card> +</template> + +<script> +import { getAction } from '@/api/manage' +import Tooltip from 'ant-design-vue/es/tooltip' +export default { + name: 'BaseToolsListLeft', + components: { + Tooltip, + }, + props: ['value'], + data() { + return { + searchInput: '', + cardLoading: false, + loading: false, + treeDataSource: [], + selectedKeys: [], + expandedKeys: [], + url: { + factoryTreeList: '/tms/toolsClassify/loadTree', + }, + searchValue: '', + dataList: [], + autoExpandParent: true, + checkStrictly: true, + allTreeKeys: [], + currSelected: {}, + hiding: false, + } + }, + created() { + this.queryTreeData(); + this.closeAll(); + }, + methods: { + getCurrSelectedTitle() { + return !this.currSelected.title ? '' : this.currSelected.title; + }, + onClearSelected() { + this.hiding = true; + this.currSelected = {}; + this.selectedKeys = []; + }, + onSelect(selectedKeys, e) { + this.hiding = false; + let record = e.node.dataRef; + this.currSelected = Object.assign({}, record); + this.selectedKeys = [record.key]; + }, + onExpand(expandedKeys) { + this.expandedKeys = expandedKeys; + this.autoExpandParent = false; + }, + queryTreeData() { + this.loading = true; + this.cardLoading = true; + getAction(this.url.factoryTreeList).then((res) => { + if (res.success) { + this.dataList = []; + this.allTreeKeys = []; + this.treeDataSource = res.result; + this.generateList(res.result); + } else { + this.$message.warn(res.message); + } + }).finally(() => { + this.loading = false; + this.cardLoading = false; + }) + }, + + handleChange() { + let search = this.searchInput; + let expandedKeys = this.dataList + .map(item => { + if (item.title.indexOf(search) > -1) { + return this.getParentKey(item.key, this.treeDataSource); + } + return null; + }) + .filter((item, i, self) => item && self.indexOf(item) === i); + Object.assign(this, { + expandedKeys, + searchValue: search, + autoExpandParent: true, + }); + }, + handleSearch(value) { + let search = value; + let expandedKeys = this.dataList + .map(item => { + if (item.title.indexOf(search) > -1) { + return this.getParentKey(item.key, this.treeDataSource); + } + return null; + }) + .filter((item, i, self) => item && self.indexOf(item) === i); + Object.assign(this, { + expandedKeys, + searchValue: search, + autoExpandParent: true, + }); + }, + getParentKey(key, tree) { + let parentKey; + for (let i = 0; i < tree.length; i++) { + const node = tree[i]; + if (node.children) { + if (node.children.some(item => item.key === key)) { + parentKey = node.key; + } else if ( + this.getParentKey(key, node.children)) { + parentKey = this.getParentKey(key, node.children); + } + } + } + return parentKey; + }, + + generateList(data) { + for (let i = 0; i < data.length; i++) { + const node = data[i]; + const key = node.key; + const title = node.title; + this.dataList.push({ key, title: title }); + this.allTreeKeys.push(key); + if (node.children) { + this.generateList(node.children); + } + } + }, + expandAll() { + this.expandedKeys = this.allTreeKeys; + }, + closeAll() { + this.expandedKeys = this.allSiteIds; + }, + refreshTree() { + this.queryTreeData(); + } + }, + mounted() { + this.$bus.$on('queryTreeData', this.queryTreeData); + }, + //鐩戝惉 + watch: { + currSelected(val) {//鐩戝惉currSelected 鍙樺寲锛屽皢鍙樺寲鍚庣殑鏁板�间紶閫掔粰 getCurrSelected 浜嬩欢 + this.$bus.$emit('getCurrSelected', val) + }, + } +} +</script> + +<style scoped> +.replaceSearch { + color: #40a9ff; + font-weight: bold; + background-color: rgb(204, 204, 204); +} +/*闅愯棌鏍戠殑榛樿icon*/ +.ant-tree-switcher-noop { + display: none !important; +} +/*闅愯棌鏍戠殑榛樿绔栫嚎*/ +.ant-tree.ant-tree-show-line li:not(:last-child):before { + border-left: 0px; +} + +.ant-card-body .table-operator { + margin: 15px; +} + +.anty-form-btn { + width: 100%; + text-align: center; +} + +.anty-form-btn button { + margin: 0 5px; +} + +.anty-node-layout .ant-layout-header { + padding-right: 0; +} + +.header { + padding: 0 8px; +} + +.header button { + margin: 0 3px; +} + +.ant-modal-cust-warp { + height: 100%; +} + +.ant-modal-cust-warp .ant-modal-body { + height: calc(100% - 110px) !important; + overflow-y: auto; +} + +.ant-modal-cust-warp .ant-modal-content { + height: 90% !important; + overflow-y: hidden; +} + +#app .desktop { + height: auto !important; +} + +/** Button鎸夐挳闂磋窛 */ +.ant-btn { + margin-left: 3px; +} +.ant-alert { + padding: 5px 15px 5px 37px; +} +.drawer-bootom-button { + position: absolute; + top: 1px; + /* padding: 10px 16px; */ + text-align: left; + right: 0; + background: #fff; + border-radius: 0 0 2px 2px; +} +</style> \ No newline at end of file diff --git a/src/views/tms/modules/baseTools/BaseToolsListRight.vue b/src/views/tms/modules/baseTools/BaseToolsListRight.vue new file mode 100644 index 0000000..31a17e8 --- /dev/null +++ b/src/views/tms/modules/baseTools/BaseToolsListRight.vue @@ -0,0 +1,568 @@ +<template> + <a-card :bordered="false"> + <!-- 鏌ヨ鍖哄煙 --> + <div class="table-page-search-wrapper"> + <a-form layout="inline" @keyup.enter.native="searchQuery"> + <a-row :gutter="24"> + <a-col + :md="6" + :sm="8" + > + <a-form-item + label="宸ュ叿缂栧彿" + :labelCol="{span: 5}" + :wrapperCol="{span: 18, offset: 1}" + > + <a-input + placeholder="璇疯緭鍏ュ伐鍏风紪鍙锋绱�" + v-model="queryParam.toolCode" + ></a-input> + </a-form-item> + </a-col> + <a-col + :md="6" + :sm="8" + > + <a-form-item + label="鍨嬪彿/鍥惧彿" + :labelCol="{span: 5}" + :wrapperCol="{span: 18, offset: 1}" + > + <a-input + placeholder="璇疯緭鍏ュ瀷鍙�/鍥惧彿妫�绱�" + v-model="queryParam.toolModel" + ></a-input> + </a-form-item> + </a-col> + <a-col :md="6" :sm="24"> + <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> + <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button> + <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">閲嶇疆</a-button> + </span> + </a-col> + + </a-row> + </a-form> + </div> + <!-- 鏌ヨ鍖哄煙-END --> + + <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> + <div class="table-operator"> + <Tooltip + placement="top" + title="閫夋嫨宸ュ叿鍒嗙被鍚庡啀鎵ц鏂板" + > + <a-button @click="handleAdd(nodeSelected)" type="primary" icon="plus" :disabled="!nodeSelected.key || nodeSelected.entity.leafFlag === '2'">鏂板</a-button> + </Tooltip> + <a-button type="primary" icon="download" @click="handleExportXls('tms_tools_classify')">瀵煎嚭</a-button> + <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel"> + <a-button type="primary" icon="import">瀵煎叆</a-button> + </a-upload> + </div> + + <!-- table鍖哄煙-begin --> + <div> + + <a-table + ref="table" + size="middle" + :scroll="{x:true}" + bordered + rowKey="id" + :columns="columns" + :dataSource="dataSource" + :pagination="ipagination" + :loading="loading" + :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange,type:'radio'}" + class="j-table-force-nowrap" + @change="handleTableChange"> + + <template slot="htmlSlot" slot-scope="text"> + <div v-html="text"></div> + </template> + <template slot="imgSlot" slot-scope="text,record"> + <span v-if="!text" style="font-size: 12px;font-style: italic;">鏃犲浘鐗�</span> + <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/> + </template> + <template slot="fileSlot" slot-scope="text"> + <span v-if="!text" style="font-size: 12px;font-style: italic;">鏃犳枃浠�</span> + <a-button + v-else + :ghost="true" + type="primary" + icon="download" + size="small" + @click="downloadFile(text)"> + 涓嬭浇 + </a-button> + </template> + + <span slot="action" slot-scope="text, record"> + <a @click="handleEdit(record)">缂栬緫</a> + + <a-divider type="vertical" /> + <a-dropdown> + <a class="ant-dropdown-link">鏇村 <a-icon type="down" /></a> + <a-menu slot="overlay"> + <a-menu-item> + <a @click="handleDetail(record)">璇︽儏</a> + </a-menu-item> + <a-menu-item> + <a-popconfirm title="纭畾鍒犻櫎鍚�?" @confirm="() => handleDelete(record.id)"> + <a>鍒犻櫎</a> + </a-popconfirm> + </a-menu-item> + </a-menu> + </a-dropdown> + </span> + + </a-table> + </div> + + <a-tabs defaultActiveKey="1"> + <a-tab-pane key="1"> + <span slot="tab"> + <a-badge>鍙傛暟 </a-badge> + </span> + <para-hole-tools-list ref="paraHoleToolsList"></para-hole-tools-list> + <para-threading-tool-list ref="paraThreadingToolList"></para-threading-tool-list> + <para-mill-tool-list ref="paraMillToolList"></para-mill-tool-list> + <para-turning-tools-list ref="paraTurningToolsList"></para-turning-tools-list> + <para-blade-list ref="paraBladeList"></para-blade-list> + <para-common-tool-list ref="paraCommonToolList"></para-common-tool-list> + </a-tab-pane> + + <a-tab-pane + key="2" + forceRender + > + <span slot="tab"> + <a-badge>绠$悊鍙傛暟 </a-badge> + </span> + <tools-config-property-list ref="toolsConfigPropertyList"></tools-config-property-list> + </a-tab-pane> + </a-tabs> + + <base-tools-modal ref="modalForm" @ok="modalFormOk" :nodeSelected="nodeSelected"></base-tools-modal> + <para-hole-tools-modal ref="paraHoleToolsModal" @ok="modalFormOk" :nodeSelected="nodeSelected"></para-hole-tools-modal> + <para-threading-tool-modal ref="paraThreadingToolModal"></para-threading-tool-modal> + <para-mill-tool-modal ref="paraMillToolModal"></para-mill-tool-modal> + <para-turning-tools-modal ref="paraTurningToolsModal"></para-turning-tools-modal> + <para-blade-modal ref="paraBladeModal"></para-blade-modal> + <para-common-tool-modal ref="paraCommonToolModal"></para-common-tool-modal> + </a-card> +</template> + +<script> + + import '@/assets/less/TableExpand.less' + import { mixinDevice } from '@/utils/mixin' + import { JeecgListMixin } from '@/mixins/JeecgListMixin' + import BaseToolsModal from './BaseToolsModal' + import Tooltip from 'ant-design-vue/es/tooltip' + import { getAction, postAction, deleteAction, requestPut } from '@api/manage' + import ParaHoleToolsModal from './ParaHoleToolsModal' + import ParaMillToolModal from './ParaMillToolModal' + import ParaThreadingToolModal from './ParaThreadingToolModal' + import ParaTurningToolsModal from './ParaTurningToolsModal' + import ToolsConfigPropertyModal from './ToolsConfigPropertyModal' + import ParaCommonToolModal from './ParaCommonToolModal' + import ParaBladeModal from './ParaBladeModal' + import ParaHoleToolsList from './ParaHoleToolsList' + import ToolsConfigPropertyList from './ToolsConfigPropertyList' + import ParaMillToolList from './ParaMillToolList' + import ParaThreadingToolList from './ParaThreadingToolList' + import ParaTurningToolsList from './ParaTurningToolsList' + import ParaCommonToolList from './ParaCommonToolList' + import ParaBladeList from './ParaBladeList' + + export default { + name: 'BaseToolsListRight', + mixins:[JeecgListMixin, mixinDevice], + components: { + BaseToolsModal, + Tooltip, + ParaHoleToolsModal, + ParaMillToolModal, + ParaThreadingToolModal, + ParaTurningToolsModal, + ToolsConfigPropertyModal, + ParaCommonToolModal, + ParaBladeModal, + ParaHoleToolsList, + ToolsConfigPropertyList, + ParaMillToolList, + ParaThreadingToolList, + ParaTurningToolsList, + ParaCommonToolList, + ParaBladeList + }, + data () { + return { + description: '宸ュ叿淇℃伅绠$悊椤甸潰', + // 琛ㄥご + columns: [ + { + title: '#', + dataIndex: '', + key:'rowIndex', + width:60, + align:"center", + customRender:function (t,r,index) { + return parseInt(index)+1; + } + }, + { + title:'宸ュ叿缂栫爜', + align:"center", + dataIndex: 'toolCode' + }, + { + title:'搴忓彿', + align:"center", + dataIndex: 'signCode' + }, + { + title:'涓枃鍚嶇О', + align:"center", + dataIndex: 'chineseName' + }, + { + title:'澶栨枃鍚嶇О', + align:"center", + dataIndex: 'foreignLanguageName' + }, + { + title:'鏍囨敞绾у埆', + align:"center", + dataIndex: 'standardLevel' + }, + { + title:'鏍囧噯鍙�', + align:"center", + dataIndex: 'standardCode' + }, + { + title:'鍨嬪彿/鍥惧彿', + align:"center", + dataIndex: 'toolModel' + }, + { + title:'澶囨敞', + align:"center", + dataIndex: 'remark' + }, + { + title:'鍒涘缓浜�', + align:"center", + dataIndex: 'createBy' + }, + { + title:'鍒涘缓鏃堕棿', + align:"center", + dataIndex: 'createTime', + customRender:function (text) { + return !text?"":(text.length>10?text.substr(0,10):text) + } + }, + { + title: '鎿嶄綔', + dataIndex: 'action', + align:"center", + fixed:"right", + width:147, + scopedSlots: { customRender: 'action' } + } + ], + url: { + list: "/tms/baseTools/list", + paraHolesToolsList:"/tms/baseTools/paraHolesToolsList", + paraCommonToolList:"/tms/baseTools/paraCommonToolList", + paraThreadingToolList:"/tms/baseTools/paraThreadingToolList", + paraMillToolList:"/tms/baseTools/paraMillToolList", + paraTurningToolsList:"/tms/baseTools/paraTurningToolsList", + paraBladeList:"/tms/baseTools/paraBladeList", + delete: "/tms/baseTools/delete", + deleteBatch: "/tms/baseTools/deleteBatch", + edit: '/tms/baseTools/edit', + exportXlsUrl: "/tms/baseTools/exportXls", + importExcelUrl: "tms/baseTools/importExcel", + queryParaByToolCode:"/tms/baseTools/queryByToolCode", + queryByToolCode:"/tms/toolsConfigProperty/queryByToolCode" + }, + dictOptions:{}, + superFieldList:[], + nodeSelected: {}, // 褰撳墠閫変腑鐨勮妭鐐规暟鎹� + paraTypeFlag:'', + disableMixinCreated:true + } + }, + created() { + this.$bus.$on('getCurrSelected', (data) => { + //getCurrSelected 浜嬩欢 鎺ユ敹缁勪欢浼犻�掔殑鍙傛暟 + this.nodeType = (data.type == undefined ? 0 : data.type); + this.paraTypeFlag = (data.entity == undefined ? 0 : data.entity.paraTypeFlag) + this.nodeSelected = data; + this.loadData() + this.clearPara() + }) + }, + computed: { + importExcelUrl: function(){ + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; + }, + }, + methods: { + + handleAdd(entity) { + if (!this.nodeSelected ) { + this.$message.warning('璇峰厛閫夋嫨涓�涓伐鍏峰垎绫�'); + return; + } + // 鎵撳紑鏂板妯℃�佹锛屽苟浼犻�掑綋鍓嶉�変腑鐨勮妭鐐� + if(this.paraTypeFlag === "1"){ + this.$refs.paraCommonToolModal.add(this.nodeSelected); + this.$refs.paraCommonToolModal.title = "鏂板閫氱敤鍙傛暟绫诲瀷宸ュ叿"; + this.$refs.paraCommonToolModal.disableSubmit = false; + }else if(this.paraTypeFlag === "2"){ + this.$refs.paraHoleToolsModal.add(this.nodeSelected); + this.$refs.paraHoleToolsModal.title = "鏂板瀛斿姞宸ュ伐鍏�"; + this.$refs.paraHoleToolsModal.disableSubmit = false; + }else if(this.paraTypeFlag === "3"){ + this.$refs.paraThreadingToolModal.add(this.nodeSelected); + this.$refs.paraThreadingToolModal.title = "鏂板铻虹汗宸ュ叿"; + this.$refs.paraThreadingToolModal.disableSubmit = false; + }else if(this.paraTypeFlag === "4"){ + this.$refs.paraMillToolModal.add(this.nodeSelected); + this.$refs.paraMillToolModal.title = "鏂板閾e墛宸ュ叿"; + this.$refs.paraMillToolModal.disableSubmit = false; + }else if(this.paraTypeFlag === "5"){ + this.$refs.paraTurningToolsModal.add(this.nodeSelected); + this.$refs.paraTurningToolsModal.title = "鏂板杞﹀墛宸ュ叿"; + this.$refs.paraTurningToolsModal.disableSubmit = false; + }else if(this.paraTypeFlag === "6"){ + this.$refs.paraBladeModal.add(this.nodeSelected); + this.$refs.paraBladeModal.title = "鏂板鍒�鐗�"; + this.$refs.paraBladeModal.disableSubmit = false; + } + }, + handleDelete(id) { + deleteAction(this.url.delete, {id: id}).then((res) => { + if (res.success) { + //閲嶆柊璁$畻鍒嗛〉闂 + this.loadData() + this.$message.success(res.message); + this.$bus.$emit('queryTreeData') + this.clearPara() + } else { + this.$message.warning(res.message); + } + }); + }, + modalFormOk() { + this.loadData(); // 鍒锋柊琛ㄦ牸鏁版嵁 + this.$bus.$emit('queryTreeData') //鍒锋柊宸︿晶鏍� + }, + + onSelectChange(selectedRowKeys) { + this.selectedRowKeys = selectedRowKeys; + //閫氳繃id鏌ヨ绠$悊鍙傛暟鍜屽弬鏁版暟鎹� + getAction(this.url.queryParaByToolCode, { toolCode: this.selectedRowKeys[0],paraTypeFlag:this.paraTypeFlag}).then((res) => { + if (res.success) { + if(this.paraTypeFlag === "1"){ + this.$refs.paraCommonToolList.getPara(res.result); + }else if(this.paraTypeFlag === "2"){ + this.$refs.paraHoleToolsList.getPara(res.result); + }else if(this.paraTypeFlag === "3"){ + this.$refs.paraThreadingToolList.getPara(res.result); + }else if(this.paraTypeFlag === "4"){ + this.$refs.paraMillToolList.getPara(res.result); + }else if(this.paraTypeFlag === "5"){ + this.$refs.paraTurningToolsList.getPara(res.result); + }else if(this.paraTypeFlag === "6"){ + this.$refs.paraBladeList.getPara(res.result); + } + } else { + this.$message.warning(res.message); + } + }) + getAction(this.url.queryByToolCode, { toolCode: this.selectedRowKeys[0]}).then((res) => { + if (res.success) { + this.$refs.toolsConfigPropertyList.getPara(res.result); + } else { + this.$message.warning(res.message); + } + }) + + }, + // 澶勭悊缂栬緫鎸夐挳鐐瑰嚮浜嬩欢 + handleEditSelected() { + if (this.selectedRowKeys.length === 0) { + this.$message.warning('璇烽�夋嫨涓�鏉¤褰曡繘琛岀紪杈�'); + return; + } + const selectedRecord = this.dataSource.find(item => item.id === this.selectedRowKeys[0]); + if (selectedRecord) { + this.handleEdit(selectedRecord); + } + }, + //缂栬緫 + handleEdit(record) { + if(record.paramaTableName === "1"){ + this.$refs.paraCommonToolModal.edit(record); + this.$refs.paraCommonToolModal.title = "缂栬緫"; + this.$refs.paraCommonToolModal.disableSubmit = false; + }else if(record.paramaTableName === "2"){ + this.$refs.paraHoleToolsModal.edit(record); + this.$refs.paraHoleToolsModal.title = "缂栬緫"; + this.$refs.paraHoleToolsModal.disableSubmit = false; + }else if(record.paramaTableName === "3"){ + this.$refs.paraThreadingToolModal.edit(record); + this.$refs.paraThreadingToolModal.title = "缂栬緫"; + this.$refs.paraThreadingToolModal.disableSubmit = false; + }else if(record.paramaTableName === "4"){ + this.$refs.paraMillToolModal.edit(record); + this.$refs.paraMillToolModal.title = "缂栬緫"; + this.$refs.paraMillToolModal.disableSubmit = false; + }else if(record.paramaTableName === "5"){ + this.$refs.paraTurningToolsModal.edit(record); + this.$refs.paraTurningToolsModal.title = "缂栬緫"; + this.$refs.paraTurningToolsModal.disableSubmit = false; + }else if(record.paramaTableName === "6"){ + this.$refs.paraBladeModal.edit(record); + this.$refs.paraBladeModal.title = "缂栬緫"; + this.$refs.paraBladeModal.disableSubmit = false; + } + }, + //璇︽儏 + handleDetail:function(record){ + if(record.paramaTableName === "1"){ + this.$refs.paraCommonToolModal.edit(record); + this.$refs.paraCommonToolModal.title="璇︽儏"; + this.$refs.paraCommonToolModal.disableSubmit = true; + this.$refs.paraCommonToolModal.disSeach = true; + if(this.$refs.paraCommonToolModal.removeValidate) { + this.$refs.paraCommonToolModal.removeValidate() + } + }else if(record.paramaTableName === "2"){ + this.$refs.paraHoleToolsModal.edit(record); + this.$refs.paraHoleToolsModal.title="璇︽儏"; + this.$refs.paraHoleToolsModal.disableSubmit = true; + this.$refs.paraHoleToolsModal.disSeach = true; + if(this.$refs.paraHoleToolsModal.removeValidate) { + this.$refs.paraHoleToolsModal.removeValidate() + } + }else if(record.paramaTableName === "3"){ + this.$refs.paraThreadingToolModal.edit(record); + this.$refs.paraThreadingToolModal.title="璇︽儏"; + this.$refs.paraThreadingToolModal.disableSubmit = true; + this.$refs.paraThreadingToolModal.disSeach = true; + if(this.$refs.paraThreadingToolModal.removeValidate) { + this.$refs.paraThreadingToolModal.removeValidate() + } + }else if(record.paramaTableName === "4"){ + this.$refs.paraMillToolModal.edit(record); + this.$refs.paraMillToolModal.title="璇︽儏"; + this.$refs.paraMillToolModal.disableSubmit = true; + this.$refs.paraMillToolModal.disSeach = true; + if(this.$refs.paraMillToolModal.removeValidate) { + this.$refs.paraMillToolModal.removeValidate() + } + }else if(record.paramaTableName === "5"){ + this.$refs.paraTurningToolsModal.edit(record); + this.$refs.paraTurningToolsModal.title="璇︽儏"; + this.$refs.paraTurningToolsModal.disableSubmit = true; + this.$refs.paraTurningToolsModal.disSeach = true; + if(this.$refs.paraTurningToolsModal.removeValidate) { + this.$refs.paraTurningToolsModal.removeValidate() + } + }else if(record.paramaTableName === "6"){ + this.$refs.paraBladeModal.edit(record); + this.$refs.paraBladeModal.title="璇︽儏"; + this.$refs.paraBladeModal.disableSubmit = true; + this.$refs.paraBladeModal.disSeach = true; + if(this.$refs.paraBladeModal.removeValidate) { + this.$refs.paraBladeModal.removeValidate() + } + } + }, + //绂佺敤鐘舵�佹牱寮� + tableRowClass(record, index) { + if (record.status != "1") { + return "frozenRowClass"; + } + return ""; + }, + loadData() { + let params = this.getQueryParams(); + if (this.nodeSelected && this.nodeSelected.key !== '-1') { + // 鍔犺浇閫変腑鑺傜偣鐨勫瓙绫� + params.classifyId = this.nodeSelected.key; + this.loading = true; + let httpUrl = '' + if(this.paraTypeFlag === '1'){ + httpUrl = this.url.paraCommonToolList + }else if(this.paraTypeFlag === '2'){ + httpUrl = this.url.paraHolesToolsList + }else if(this.paraTypeFlag === '3'){ + httpUrl = this.url.paraThreadingToolList + }else if(this.paraTypeFlag === '4'){ + httpUrl = this.url.paraMillToolList + }else if(this.paraTypeFlag === '5'){ + httpUrl = this.url.paraTurningToolsList + }else if(this.paraTypeFlag === '6'){ + httpUrl = this.url.paraBladeList + }else{ + this.dataSource = []; + this.clearPara() + } + getAction(httpUrl, params) + .then((res) => { + if (res.success) { + this.dataSource = res.result.records; // 鏇存柊琛ㄦ牸鏁版嵁 + } else { + this.$message.warning("璇烽�夋嫨鍙跺瓙鑺傜偣杩涜鏌ヨ"); + } + }) + .finally(() => { + this.loading = false; + }); + } else { + this.$message.warning("璇烽�夋嫨鍙跺瓙鑺傜偣杩涜鏌ヨ"); + } + }, + onClearSelected() { + this.selectedKeys = []; + this.nodeSelected = {}; // 娓呯┖閫変腑鐨勮妭鐐� + this.dataSource = []; // 娓呯┖琛ㄦ牸鏁版嵁 + }, + //閲嶇疆 + searchReset() { + this.queryParam = {} + this.loadData(1); + this.clearPara() + }, + //娓呯┖閫変腑鍙婂弬鏁� + clearPara(){ + this.selectedRowKeys = [] + this.$refs.paraCommonToolList.visable = false + this.$refs.paraHoleToolsList.visable = false + this.$refs.paraThreadingToolList.visable = false + this.$refs.paraMillToolList.visable = false + this.$refs.paraTurningToolsList.visable = false + this.$refs.paraBladeList.visable = false + this.$refs.toolsConfigPropertyList.visable = false + } + + }, + } +</script> +<style scoped> + @import '~@assets/less/common.less'; + .enable { + color: green; + } + .disable { + color: red; + } +</style> \ No newline at end of file diff --git a/src/views/tms/modules/baseTools/BaseToolsModal.vue b/src/views/tms/modules/baseTools/BaseToolsModal.vue new file mode 100644 index 0000000..f0c68d7 --- /dev/null +++ b/src/views/tms/modules/baseTools/BaseToolsModal.vue @@ -0,0 +1,60 @@ +<template> + <j-modal + :title="title" + :width="width" + :visible="visible" + switchFullscreen + @ok="handleOk" + :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" + @cancel="handleCancel" + cancelText="鍏抽棴"> + <base-tools-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></base-tools-form> + </j-modal> +</template> + +<script> + + import BaseToolsForm from './BaseToolsForm' + export default { + name: 'BaseToolsModal', + components: { + BaseToolsForm + }, + data () { + return { + title:'', + width:1200, + visible: false, + disableSubmit: false + } + }, + methods: { + add (nodeSelected) { + this.visible=true + this.$nextTick(()=>{ + this.$refs.realForm.add(nodeSelected); + }) + }, + edit (record) { + this.visible=true + this.$nextTick(()=>{ + this.$refs.realForm.edit(record); + }) + }, + close () { + this.$emit('close'); + this.visible = false; + }, + handleOk () { + this.$refs.realForm.submitForm(); + }, + submitCallback(){ + this.$emit('ok'); + this.visible = false; + }, + handleCancel () { + this.close() + } + } + } +</script> \ No newline at end of file diff --git a/src/views/tms/modules/baseTools/ParaBladeList.vue b/src/views/tms/modules/baseTools/ParaBladeList.vue new file mode 100644 index 0000000..8498951 --- /dev/null +++ b/src/views/tms/modules/baseTools/ParaBladeList.vue @@ -0,0 +1,73 @@ +<template> + <div> + <!-- 褰撳墠椤甸潰涓氬姟閮ㄥ垎 --> + <a-card :bordered="false" :title="title" v-show="visable"> + <a-descriptions title="宸ュ叿鍙傛暟璇︽儏"> + <a-descriptions-item label="鍒�鐗囧舰鐘�">{{ this.para == null || this.para.bladeShape == null ? '' : this.para.bladeShape }}</a-descriptions-item> + <a-descriptions-item label="鍒�鐗囬暱搴�">{{ this.para == null || this.para.bladeLength == null ? '' : this.para.bladeLength }}</a-descriptions-item> + <a-descriptions-item label="鍒囧墛鍒冩暟">{{ this.para == null || this.para.cuttingEdgeCount == null ? '' : this.para.cuttingEdgeCount }}</a-descriptions-item> + <a-descriptions-item label="鍒�鐗囧帤搴�">{{ this.para == null || this.para.bladeThickness == null ? '' : this.para.bladeThickness }}</a-descriptions-item> + <a-descriptions-item label="澶瑰浐鍨嬪紡">{{ this.para == null || this.para.clampingType == null ? '' : this.para.clampingType }}</a-descriptions-item> + <a-descriptions-item label="鍒�灏朢">{{ this.para == null || this.para.noseAngleR == null ? '' : this.para.noseAngleR }}</a-descriptions-item> + <a-descriptions-item label="鍒�鐗囨潗鏂�">{{ this.para == null || this.para.toolMaterial == null ? '' : this.para.toolMaterial }}</a-descriptions-item> + <a-descriptions-item label="闆朵欢鏉愭枡">{{ this.para == null || this.para.partMaterial == null ? '' : this.para.partMaterial }}</a-descriptions-item> + <a-descriptions-item label="鏄惁娑傚眰">{{ this.para == null || this.para.paintcoatFlag == null ? '' : this.para.paintcoatFlag }}</a-descriptions-item> + <a-descriptions-item label="闄勫姞鎶�鏈潯浠�">{{ this.para == null || this.para.technicalConditions == null ? '' : this.para.technicalConditions }}</a-descriptions-item> + <a-descriptions-item label="闄勫姞鎶�鏈潯浠惰鏄�">{{ this.para == null || this.para.conditionsInfo == null ? '' : this.para.conditionsInfo }}</a-descriptions-item> + <a-descriptions-item label="鍝佺墝">{{ this.para == null || this.para.brand == null ? '' : this.para.brand }}</a-descriptions-item> + <a-descriptions-item label="鍒跺紡">{{ this.para == null || this.para.types == null ? '' : this.para.types }}</a-descriptions-item> + <a-descriptions-item label="娑傚眰鏉愯川">{{ this.para == null || this.para.coatingMaterial == null ? '' : this.para.coatingMaterial }}</a-descriptions-item> + <a-descriptions-item label="鍔犲伐鍒嗙被">{{ this.para == null || this.para.processingClassify == null ? '' : this.para.processingClassify }}</a-descriptions-item> + <a-descriptions-item label="鍒�鐗囧悗瑙�">{{ this.para == null || this.para.bladePosterior == null ? '' : this.para.bladePosterior }}</a-descriptions-item> + <a-descriptions-item label="鍒囧墛鏂瑰悜">{{ this.para == null || this.para.cuttingDirection == null ? '' : this.para.cuttingDirection }}</a-descriptions-item> + <a-descriptions-item label="鍒�鐗囧搴�">{{ this.para == null || this.para.bladeWide == null ? '' : this.para.bladeWide }}</a-descriptions-item> + <a-descriptions-item label="鍒�鐗囧昂瀵�">{{ this.para == null || this.para.bladeSize == null ? '' : this.para.bladeSize }}</a-descriptions-item> + <a-descriptions-item label="鍐呭铻虹汗">{{ this.para == null || this.para.inOutThread == null ? '' : this.para.inOutThread }}</a-descriptions-item> + <a-descriptions-item label="铻虹汗鏍囧噯">{{ this.para == null || this.para.threadStandard == null ? '' : this.para.threadStandard }}</a-descriptions-item> + <a-descriptions-item label="鐗欏瀷瑙掑害">{{ this.para == null || this.para.dentalAngle == null ? '' : this.para.dentalAngle }}</a-descriptions-item> + <a-descriptions-item label="铻鸿窛">{{ this.para == null || this.para.pitch == null ? '' : this.para.pitch }}</a-descriptions-item> + <a-descriptions-item label="鏈�灏忓姞宸ュ唴铻虹汗鍏О鐩村緞">{{ this.para == null || this.para.minInternalThread == null ? '' : this.para.minInternalThread }}</a-descriptions-item> + + </a-descriptions> + + </a-card> + </div> +</template> + +<script> + +import JDictSelectTag from '@/components/dict/JDictSelectTag' +import JEllipsis from '@/components/jeecg/JEllipsis' //寮曞叆杩囬暱瑁佸壀 +import Tooltip from 'ant-design-vue/es/tooltip' +import JDate from '@/components/jeecg/JDate.vue' + +export default { + name: 'ParaHoleToolsList', + components: { + JDictSelectTag, + JEllipsis, + JDate, + Tooltip, + }, + data() { + return { + description: '宸ュ叿淇℃伅椤甸潰', + title: '', + visable:false, + para:{}, + } + }, + created() { + }, + methods: { + + getPara(record){ + this.visable = true + this.para = record + }, + }, + +} +</script> +<style lang="less" scoped> +</style> \ No newline at end of file diff --git a/src/views/tms/modules/baseTools/ParaBladeModal.vue b/src/views/tms/modules/baseTools/ParaBladeModal.vue new file mode 100644 index 0000000..3fc3dc4 --- /dev/null +++ b/src/views/tms/modules/baseTools/ParaBladeModal.vue @@ -0,0 +1,514 @@ +<template> + <j-modal + :title="title" + :width="1200" + :visible="visible" + centered + :confirmLoading="confirmLoading" + :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" + switchFullscreen + @ok="handleOk" + @cancel="handleCancel" + cancelText="鍏抽棴"> + <a-spin :spinning="confirmLoading"> + <a-form-model ref="form" :model="model" :rules="validatorRules" :labelCol="labelCol" :wrapperCol="wrapperCol"> + <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;"> 宸ュ叿鍩虹淇℃伅 + </a-divider> + + <a-row :gutter="24"> + <a-col :span="8"> + <a-form-model-item prop="classifyNum" label="宸ュ叿鍒嗙被缂栫爜"> + <a-input placeholder="璇疯緭鍏ュ伐鍏峰垎绫荤紪鐮�" v-model="model.classifyNum" :disabled="true" /> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="classifyName" label="宸ュ叿鍒嗙被鍚嶇О"> + <a-input placeholder="璇疯緭鍏ュ伐鍏峰垎绫诲悕绉�" v-model="model.classifyName" :disabled="true" /> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="toolCode" label="宸ュ叿缂栫爜"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ伐鍏风紪鐮�'" v-model="model.toolCode" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + </a-row> + + <a-row> + <a-col :span="8"> + <a-form-model-item prop="chineseName" + label="涓枃鍚嶇О"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ヤ腑鏂囧悕绉�'" v-model="model.chineseName" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="foreignLanguageName" + label="澶栨枃鍚嶇О"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ鏂囧悕绉�'" v-model="model.foreignLanguageName" :disabled="disableSubmit" /> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="toolModel" + label="鍨嬪彿/鍥惧彿"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ瀷鍙�/鍥惧彿'" v-model="model.toolModel" :disabled="disableSubmit" /> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span="8"> + <a-form-model-item prop="standardLevel" + label="鏍囨敞绾у埆"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ユ爣鍑嗙骇鍒�'" v-model="model.standardLevel" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="standardCode" label="鏍囧噯鍙�"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ユ爣鍑嗗彿'" v-model="model.standardCode" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="signCode" label="搴忓彿"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ簭鍙�'" v-model="model.signCode" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + </a-row> + + <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;"> 绠$悊鍙傛暟 + </a-divider> + + <a-row :gutter="24"> + <a-col :span="8"> + <a-form-model-item prop="applicationType" + label="宸ュ叿绫诲瀷"> + <j-dict-select-tag dict-code="equipment_category" :placeholder="disableSubmit?'':'璇烽�夋嫨宸ュ叿绫诲瀷'" + v-model="model.applicationType" :disabled="disableSubmit" /> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="provinceCity" label="浠撳簱鐪佷唤鍩庡競"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ヤ粨搴撶渷浠藉煄甯�'" v-model="model.provinceCity" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="positionCode" label="搴撲綅鍙�"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ簱浣嶅彿'" v-model="model.positionCode" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + </a-row> + + <a-row :gutter="24"> + <a-col :span="8"> + <a-form-model-item prop="storageLocation" label="瀛樺偍浣嶇疆"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ瓨鍌ㄤ綅缃�'" v-model="model.storageLocation" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="lowerInventory" label="鏈�浣庡簱瀛�"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ユ渶浣庡簱瀛�'" v-model="model.lowerInventory" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="highestInventory" label="鏈�楂樺簱瀛�"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ユ渶楂樺簱瀛�'" v-model="model.highestInventory" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + </a-row> + + <a-row :gutter="24"> + <a-col :span="8"> + <a-form-model-item prop="auxiliaryUnitFlag" label="鏄惁鏈夎閲忚緟鍗曚綅"> + <a-radio-group v-model="model.auxiliaryUnitFlag" :placeholder="disableSubmit?'':'璇烽�夋嫨鏄惁鏈夎閲忚緟鍗曚綅'" :disabled="disableSubmit"> + <a-radio :value="'1'">鏄�</a-radio> + <a-radio :value="'2'">鍚�</a-radio> + </a-radio-group> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="mainUnit" label="璁¢噺涓诲崟浣�"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ヨ閲忎富鍗曚綅'" v-model="model.mainUnit" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="auxiliaryUnit" label="璁¢噺杈呭崟浣�"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ヨ閲忚緟鍗曚綅'" v-model="model.auxiliaryUnit" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + </a-row> + + <a-row :gutter="24"> + <a-col :span="8"> + <a-form-model-item prop="supplierId" label="鍘傚"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ巶瀹�'" v-model="model.supplierId" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="price" label="鍗曚环"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ崟浠�'" v-model="model.price" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + <!-- <a-col :span="8"> + <a-form-model-item prop="status" label="鐘舵��"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ョ姸鎬�'" v-model="model.status" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> --> + </a-row> + + <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;"> 鍙傛暟淇℃伅 + </a-divider> + + <a-row :gutter="24"> + <a-col :span="6"> + <a-form-model-item label="鍒�鐗囧舰鐘�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bladeShape"> + <a-input v-model="model.bladeShape" :placeholder="disableSubmit?'':'璇疯緭鍏ュ垁鐗囧舰鐘�'" :disabled="disableSubmit"></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="鍒�鐗囬暱搴�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bladeLength"> + <a-input v-model="model.bladeLength" :placeholder="disableSubmit?'':'璇疯緭鍏ュ垁鐗囬暱搴�'" :disabled="disableSubmit"></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="鍒囧墛鍒冩暟" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="cuttingEdgeCount"> + <a-input v-model="model.cuttingEdgeCount" :placeholder="disableSubmit?'':'璇疯緭鍏ュ垏鍓婂垉鏁�'" :disabled="disableSubmit"></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="鍒�鐗囧帤搴�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bladeThickness"> + <a-input v-model="model.bladeThickness" :placeholder="disableSubmit?'':'璇疯緭鍏ュ垁鐗囧帤搴�'" :disabled="disableSubmit"></a-input> + </a-form-model-item> + </a-col> + </a-row> + + <a-row :gutter="24"> + <a-col :span="6"> + <a-form-model-item label="澶瑰浐鍨嬪紡" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="clampingType"> + <a-input v-model="model.clampingType" :placeholder="disableSubmit?'':'璇疯緭鍏ュす鍥哄瀷寮�'" :disabled="disableSubmit"></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="鍒�灏朢" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="noseAngleR"> + <a-input v-model="model.noseAngleR" :placeholder="disableSubmit?'':'璇疯緭鍏ュ垁灏朢'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="鍒�鐗囨潗鏂�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="toolMaterial"> + <a-input v-model="model.toolMaterial" :placeholder="disableSubmit?'':'璇疯緭鍏ュ垁鐗囨潗鏂�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="闆朵欢鏉愭枡" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="partMaterial"> + <a-input v-model="model.partMaterial" :placeholder="disableSubmit?'':'璇疯緭鍏ラ浂浠舵潗鏂�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span="6"> + <a-form-model-item label="鏄惁娑傚眰" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="paintcoatFlag"> + <a-radio-group v-model="model.paintcoatFlag" :placeholder="disableSubmit?'':'璇烽�夋嫨鏄惁娑傚眰'" :disabled="disableSubmit"> + <a-radio :value="'1'">鏄�</a-radio> + <a-radio :value="'2'">鍚�</a-radio> + </a-radio-group> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="闄勫姞鎶�鏈潯浠�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="technicalConditions"> + <a-input v-model="model.technicalConditions" :placeholder="disableSubmit?'':'璇疯緭鍏ラ檮鍔犳妧鏈潯浠�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="闄勫姞鎶�鏈潯浠惰鏄�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="conditionsInfo"> + <a-input v-model="model.conditionsInfo" :placeholder="disableSubmit?'':'璇疯緭鍏ラ檮鍔犳妧鏈潯浠惰鏄�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="娑傚眰鏉愯川" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="coatingMaterial"> + <a-input v-model="model.coatingMaterial" :placeholder="disableSubmit?'':'璇疯緭鍏ユ秱灞傛潗璐�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span="6"> + <a-form-model-item label="鍝佺墝" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="brand"> + <a-input v-model="model.brand" :placeholder="disableSubmit?'':'璇疯緭鍏ュ搧鐗�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="鍒跺紡" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="types"> + <a-input v-model="model.types" :placeholder="disableSubmit?'':'璇疯緭鍏ュ埗寮�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="鍔犲伐鍒嗙被" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="processingClassify"> + <a-input v-model="model.processingClassify" :placeholder="disableSubmit?'':'璇疯緭鍏ュ姞宸ュ垎绫�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="鍒�鐗囧悗瑙�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bladePosterior"> + <a-input v-model="model.bladePosterior" :placeholder="disableSubmit?'':'璇疯緭鍏ュ垁鐗囧悗瑙�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span="6"> + <a-form-model-item label="鍒囧墛鏂瑰悜" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="cuttingDirection"> + <a-input v-model="model.cuttingDirection" :placeholder="disableSubmit?'':'璇疯緭鍏ュ垏鍓婃柟鍚�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="鍒�鐗囧搴�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bladeWide"> + <a-input v-model="model.bladeWide" :placeholder="disableSubmit?'':'璇疯緭鍏ュ垁鐗囧搴�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="鍒�鐗囧昂瀵�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bladeSize"> + <a-input v-model="model.bladeSize" :placeholder="disableSubmit?'':'璇疯緭鍏ュ垁鐗囧昂瀵�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="鍐呭铻虹汗" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="inOutThread"> + <a-input v-model="model.inOutThread" :placeholder="disableSubmit?'':'璇疯緭鍏ュ唴澶栬灪绾�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span="6"> + <a-form-model-item label="铻虹汗鏍囧噯" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="threadStandard"> + <a-input v-model="model.threadStandard" :placeholder="disableSubmit?'':'璇疯緭鍏ヨ灪绾规爣鍑�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="鐗欏瀷瑙掑害" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="dentalAngle"> + <a-input v-model="model.dentalAngle" :placeholder="disableSubmit?'':'璇疯緭鍏ョ墮鍨嬭搴�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="铻鸿窛" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pitch"> + <a-input v-model="model.pitch" :placeholder="disableSubmit?'':'璇疯緭鍏ヨ灪璺�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="鏈�灏忓姞宸ュ唴铻虹汗鍏О鐩村緞" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="minInternalThread"> + <a-input v-model="model.minInternalThread" :placeholder="disableSubmit?'':'璇疯緭鍏ユ渶灏忓姞宸ュ唴铻虹汗鍏О鐩村緞'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + </a-row> + <a-row :gutter="24"> + <a-col :span="24"> + <a-form-model-item :labelCol="labelColLong" :wrapperCol="wrapperColLong" prop="remark" label="澶囨敞"> + <a-textarea :placeholder="disableSubmit?'':'璇疯緭鍏ュ娉�'" v-model="model.remark" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + </a-row> + </a-form-model> + </a-spin> + </j-modal> +</template> + +<script> +import { getAction,postAction, httpAction } from '@/api/manage' +import { validateDuplicateValueInDelFlag } from '@/utils/util' +import JSelectProduction from '@comp/jeecgbiz/JSelectProduction.vue' +import { getSystemConfigValue } from '@api/api' + import { duplicateCheck } from '@/api/api'//閲嶅鏍¢獙 + +export default { + name: 'ParaHoleToolsModal', + components: { JSelectProduction }, + data() { + return { + title: '鎿嶄綔', + visible: false, + //鎺у埗缂栬緫 + editable: false, + //璇︽儏鎺у埗 + disableSubmit: false, + model: {}, + labelCol: { + xs: { span: 24 }, + sm: { span: 9 } + }, + wrapperCol: { + xs: { span: 24 }, + sm: { span: 14 } + }, + labelColLong: { + xs: { span: 24 }, + sm: { span: 2 } + }, + wrapperColLong: { + xs: { span: 24 }, + sm: { span: 22 } + }, + confirmLoading: false, + validatorRules: { + toolCode: [ + { required: true, message: '璇疯緭鍏ュ伐鍏风紪鐮�' }, + { validator: this.validateNum } + ], + classifyNum: [ + { required: true, message: '璇疯緭鍏ュ伐鍏峰垎绫荤紪鐮�' } + ], + classifyName: [ + { required: true, message: '璇疯緭鍏ュ伐鍏峰垎绫诲悕绉�' } + ], + toolModel: [ + { required: true, message: '璇疯緭鍏ュ瀷鍙�/鍥惧彿' }, + { validator: this.validateModel } + ], + chineseName: [ + { required: true, message: '璇疯緭鍏ヤ腑鏂囧悕绉�' } + ], + bladeShape: [ + { required: true, message: '璇疯緭鍏ュ垁鐗囧舰鐘�' } + ], + bladeLength: [ + { required: true, message: '璇疯緭鍏ュ垁鐗囬暱搴�' } + ], + cuttingEdgeCount: [ + { required: true, message: '璇疯緭鍏ュ垏鍓婂垉鏁�' } + ], + bladeThickness: [ + { required: true, message: '璇疯緭鍏ュ垁鐗囧帤搴�' } + ], + clampingType: [ + { required: true, message: '璇疯緭鍏ュす鍥哄瀷寮�' } + ], + noseAngleR: [ + { required: true, message: '璇疯緭鍏ュ垁灏朢' } + ], + toolMaterial: [ + { required: true, message: '璇疯緭鍏ュ垁鐗囨潗鏂�' } + ], + paintcoatFlag: [ + { required: true, message: '璇烽�夋嫨鏄惁娑傚眰' } + ], + technicalConditions: [ + { required: true, message: '璇疯緭鍏ラ檮鍔犳妧鏈潯浠�' } + ] + }, + url: { + add: '/tms/baseTools/add', + edit: '/tms/baseTools/edit', + }, + } + }, + created() { + }, + methods: { + add(nodeSelected) { + this.editable = false; + //鍒濆鍖栭粯璁ゅ�� + this.model = {}; + this.model.classifyId = nodeSelected.key + this.model.classifyNum = nodeSelected.entity.classifyId + this.model.classifyName = nodeSelected.entity.typeName + this.model.paraTypeFlag = nodeSelected.entity.paraTypeFlag + this.visible = true + }, + edit(record) { + this.editable = true; + this.model = Object.assign({}, record) + this.visible = true + }, + close() { + this.$emit('close') + this.visible = false + this.$refs.form.clearValidate() + }, + handleOk() { + const that = this + // 瑙﹀彂琛ㄥ崟楠岃瘉 + this.$refs.form.validate(valid => { + if (valid) { + that.confirmLoading = true + let formData = Object.assign(this.model) + let httpUrl = '' + let method = 'post' + if (!this.model.id) { + httpUrl += this.url.add + } else { + httpUrl += this.url.edit + } + httpAction(httpUrl, formData, method) + .then((res) => { + if (res.success) { + that.$message.success(res.message) + that.$emit('ok') + } else { + that.$message.warning(res.message) + } + }) + .finally(() => { + that.confirmLoading = false + that.close() + }) + } + }) + }, + handleCancel() { + this.close() + }, + //楠岃瘉宸ュ叿缂栫爜鏄惁閲嶅 + validateNum(rule, value, callback) { + var params = { + tableName: 'tms_base_tools', + fieldName: 'tool_code', + fieldVal: value, + dataId: this.model.id + }; + duplicateCheck(params).then((res) => { + if (res.success) { + callback() + } else { + callback("宸ュ叿缂栫爜宸插瓨鍦�!") + } + }) + }, + //楠岃瘉鍨嬪彿/鍥惧彿鏄惁閲嶅 + validateModel(rule, value, callback) { + var params = { + tableName: 'tms_base_tools', + fieldName: 'tool_model', + fieldVal: value, + dataId: this.model.id + }; + duplicateCheck(params).then((res) => { + if (res.success) { + callback() + } else { + callback("鍨嬪彿/鍥惧彿宸插瓨鍦�!") + } + }) + }, + } +} +</script> + +<style lang="less" scoped> +/deep/ .ant-modal-body { + padding: 0 24px; +} + +/deep/ .ant-upload { + width: 185px; + height: 185px; +} + +/deep/ .img { + display: flex; + justify-content: center; + + .ant-upload-picture-card-wrapper { + width: auto; + } +} + +/deep/ .ant-upload-list-picture-card-container { + width: 185px; + height: 185px; +} + +/deep/ .ant-upload-list-item { + width: 185px; + height: 185px; +} +</style> \ No newline at end of file diff --git a/src/views/tms/modules/baseTools/ParaCommonToolList.vue b/src/views/tms/modules/baseTools/ParaCommonToolList.vue new file mode 100644 index 0000000..c3234c9 --- /dev/null +++ b/src/views/tms/modules/baseTools/ParaCommonToolList.vue @@ -0,0 +1,57 @@ +<template> + <div> + <!-- 褰撳墠椤甸潰涓氬姟閮ㄥ垎 --> + <a-card :bordered="false" :title="title" v-show="visable"> + <a-descriptions title="宸ュ叿鍙傛暟璇︽儏"> + <a-descriptions-item label="宸ュ叿缂栧彿">{{ this.para == null || this.para.toolCode == null ? '' : this.para.toolCode }}</a-descriptions-item> + <a-descriptions-item label="搴忓彿">{{ this.para == null || this.para.signCode == null ? '' : this.para.signCode }}</a-descriptions-item> + <a-descriptions-item label="涓枃鍚嶇О">{{ this.para == null || this.para.chineseName == null ? '' : this.para.chineseName }}</a-descriptions-item> + <a-descriptions-item label="澶栨枃鍚嶇О">{{ this.para == null || this.para.foreignLanguageName == null ? '' : this.para.foreignLanguageName }}</a-descriptions-item> + <a-descriptions-item label="鏍囧噯绾у埆">{{ this.para == null || this.para.standardLevel == null ? '' : this.para.standardLevel }}</a-descriptions-item> + <a-descriptions-item label="鏍囧噯鍙�">{{ this.para == null || this.para.standardCode == null ? '' : this.para.standardCode }}</a-descriptions-item> + <a-descriptions-item label="搴撲綅鍙�">{{ this.para == null || this.para.positionCode == null ? '' : this.para.positionCode }}</a-descriptions-item> + <a-descriptions-item label="鍨嬪彿/鍥惧彿">{{ this.para == null || this.para.toolModel == null ? '' : this.para.toolModel }}</a-descriptions-item> + + </a-descriptions> + + </a-card> + </div> +</template> + +<script> + +import JDictSelectTag from '@/components/dict/JDictSelectTag' +import JEllipsis from '@/components/jeecg/JEllipsis' //寮曞叆杩囬暱瑁佸壀 +import Tooltip from 'ant-design-vue/es/tooltip' +import JDate from '@/components/jeecg/JDate.vue' + +export default { + name: 'ParaCommonToolList', + components: { + JDictSelectTag, + JEllipsis, + JDate, + Tooltip, + }, + data() { + return { + description: '宸ュ叿淇℃伅椤甸潰', + title: '', + visable:false, + para:{}, + } + }, + created() { + }, + methods: { + + getPara(record){ + this.visable = true + this.para = record + }, + }, + +} +</script> +<style lang="less" scoped> +</style> \ No newline at end of file diff --git a/src/views/tms/modules/baseTools/ParaCommonToolModal.vue b/src/views/tms/modules/baseTools/ParaCommonToolModal.vue new file mode 100644 index 0000000..6db1804 --- /dev/null +++ b/src/views/tms/modules/baseTools/ParaCommonToolModal.vue @@ -0,0 +1,342 @@ +<template> + <j-modal + :title="title" + :width="1200" + :visible="visible" + centered + :confirmLoading="confirmLoading" + :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" + switchFullscreen + @ok="handleOk" + @cancel="handleCancel" + cancelText="鍏抽棴"> + <a-spin :spinning="confirmLoading"> + <a-form-model ref="form" :model="model" :rules="validatorRules" :labelCol="labelCol" :wrapperCol="wrapperCol"> + <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;"> 宸ュ叿鍩虹淇℃伅 + </a-divider> + + <a-row :gutter="24"> + <a-col :span="8"> + <a-form-model-item prop="classifyNum" label="宸ュ叿鍒嗙被缂栫爜"> + <a-input placeholder="璇疯緭鍏ュ伐鍏峰垎绫荤紪鐮�" v-model="model.classifyNum" :disabled="true" /> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="classifyName" label="宸ュ叿鍒嗙被鍚嶇О"> + <a-input placeholder="璇疯緭鍏ュ伐鍏峰垎绫诲悕绉�" v-model="model.classifyName" :disabled="true" /> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="toolCode" label="宸ュ叿缂栫爜"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ伐鍏风紪鐮�'" v-model="model.toolCode" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + </a-row> + + <a-row> + <a-col :span="8"> + <a-form-model-item prop="chineseName" + label="涓枃鍚嶇О"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ヤ腑鏂囧悕绉�'" v-model="model.chineseName" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="foreignLanguageName" + label="澶栨枃鍚嶇О"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ鏂囧悕绉�'" v-model="model.foreignLanguageName" :disabled="disableSubmit" /> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="toolModel" + label="鍨嬪彿/鍥惧彿"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ瀷鍙�/鍥惧彿'" v-model="model.toolModel" :disabled="disableSubmit" /> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span="8"> + <a-form-model-item prop="standardLevel" + label="鏍囨敞绾у埆"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ユ爣鍑嗙骇鍒�'" v-model="model.standardLevel" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="standardCode" label="鏍囧噯鍙�"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ユ爣鍑嗗彿'" v-model="model.standardCode" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="signCode" label="搴忓彿"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ簭鍙�'" v-model="model.signCode" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + </a-row> + + <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;"> 绠$悊鍙傛暟 + </a-divider> + + <a-row :gutter="24"> + <a-col :span="8"> + <a-form-model-item prop="applicationType" + label="宸ュ叿绫诲瀷"> + <j-dict-select-tag dict-code="equipment_category" :placeholder="disableSubmit?'':'璇烽�夋嫨宸ュ叿绫诲瀷'" + v-model="model.applicationType" :disabled="disableSubmit" /> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="provinceCity" label="浠撳簱鐪佷唤鍩庡競"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ヤ粨搴撶渷浠藉煄甯�'" v-model="model.provinceCity" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="positionCode" label="搴撲綅鍙�"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ簱浣嶅彿'" v-model="model.positionCode" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + </a-row> + + <a-row :gutter="24"> + <a-col :span="8"> + <a-form-model-item prop="storageLocation" label="瀛樺偍浣嶇疆"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ瓨鍌ㄤ綅缃�'" v-model="model.storageLocation" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="lowerInventory" label="鏈�浣庡簱瀛�"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ユ渶浣庡簱瀛�'" v-model="model.lowerInventory" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="highestInventory" label="鏈�楂樺簱瀛�"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ユ渶楂樺簱瀛�'" v-model="model.highestInventory" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + </a-row> + + <a-row :gutter="24"> + <a-col :span="8"> + <a-form-model-item prop="auxiliaryUnitFlag" label="鏄惁鏈夎閲忚緟鍗曚綅"> + <a-radio-group v-model="model.auxiliaryUnitFlag" :placeholder="disableSubmit?'':'璇烽�夋嫨鏄惁鏈夎閲忚緟鍗曚綅'" :disabled="disableSubmit"> + <a-radio :value="'1'">鏄�</a-radio> + <a-radio :value="'2'">鍚�</a-radio> + </a-radio-group> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="mainUnit" label="璁¢噺涓诲崟浣�"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ヨ閲忎富鍗曚綅'" v-model="model.mainUnit" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="auxiliaryUnit" label="璁¢噺杈呭崟浣�"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ヨ閲忚緟鍗曚綅'" v-model="model.auxiliaryUnit" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + </a-row> + + <a-row :gutter="24"> + <a-col :span="8"> + <a-form-model-item prop="supplierId" label="鍘傚"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ巶瀹�'" v-model="model.supplierId" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="price" label="鍗曚环"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ崟浠�'" v-model="model.price" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + </a-row> + <a-row :gutter="24"> + <a-col :span="24"> + <a-form-model-item :labelCol="labelColLong" :wrapperCol="wrapperColLong" prop="remark" label="澶囨敞"> + <a-textarea :placeholder="disableSubmit?'':'璇疯緭鍏ュ娉�'" v-model="model.remark" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + </a-row> + </a-form-model> + </a-spin> + </j-modal> +</template> + +<script> +import { getAction,postAction, httpAction } from '@/api/manage' +import { validateDuplicateValueInDelFlag } from '@/utils/util' +import JSelectProduction from '@comp/jeecgbiz/JSelectProduction.vue' +import { getSystemConfigValue } from '@api/api' + import { duplicateCheck } from '@/api/api'//閲嶅鏍¢獙 + +export default { + name: 'ParaCommonToolModal', + components: { JSelectProduction }, + data() { + return { + title: '鎿嶄綔', + visible: false, + //鎺у埗缂栬緫 + editable: false, + //璇︽儏鎺у埗 + disableSubmit: false, + model: {}, + labelCol: { + xs: { span: 24 }, + sm: { span: 9 } + }, + wrapperCol: { + xs: { span: 24 }, + sm: { span: 14 } + }, + labelColLong: { + xs: { span: 24 }, + sm: { span: 2 } + }, + wrapperColLong: { + xs: { span: 24 }, + sm: { span: 22 } + }, + confirmLoading: false, + validatorRules: { + toolCode: [ + { required: true, message: '璇疯緭鍏ュ伐鍏风紪鐮�' }, + { validator: this.validateNum } + ], + classifyNum: [ + { required: true, message: '璇疯緭鍏ュ伐鍏峰垎绫荤紪鐮�' } + ], + classifyName: [ + { required: true, message: '璇疯緭鍏ュ伐鍏峰垎绫诲悕绉�' } + ], + toolModel: [ + { required: true, message: '璇疯緭鍏ュ瀷鍙�/鍥惧彿' }, + { validator: this.validateModel } + ], + chineseName: [ + { required: true, message: '璇疯緭鍏ヤ腑鏂囧悕绉�' } + ] + }, + url: { + add: '/tms/baseTools/add', + edit: '/tms/baseTools/edit', + }, + } + }, + created() { + }, + methods: { + add(nodeSelected) { + this.editable = false; + //鍒濆鍖栭粯璁ゅ�� + this.model = {}; + this.model.classifyId = nodeSelected.key + this.model.classifyNum = nodeSelected.entity.classifyId + this.model.classifyName = nodeSelected.entity.typeName + this.model.paraTypeFlag = nodeSelected.entity.paraTypeFlag + this.visible = true + }, + edit(record) { + this.editable = true; + this.model = Object.assign({}, record) + this.visible = true + }, + close() { + this.$emit('close') + this.visible = false + this.$refs.form.clearValidate() + }, + handleOk() { + const that = this + // 瑙﹀彂琛ㄥ崟楠岃瘉 + this.$refs.form.validate(valid => { + if (valid) { + that.confirmLoading = true + let formData = Object.assign(this.model) + let httpUrl = '' + let method = 'post' + if (!this.model.id) { + httpUrl += this.url.add + } else { + httpUrl += this.url.edit + } + httpAction(httpUrl, formData, method) + .then((res) => { + if (res.success) { + that.$message.success(res.message) + that.$emit('ok') + } else { + that.$message.warning(res.message) + } + }) + .finally(() => { + that.confirmLoading = false + that.close() + }) + } + }) + }, + handleCancel() { + this.close() + }, + //楠岃瘉宸ュ叿缂栫爜鏄惁閲嶅 + validateNum(rule, value, callback) { + var params = { + tableName: 'tms_base_tools', + fieldName: 'tool_code', + fieldVal: value, + dataId: this.model.id + }; + duplicateCheck(params).then((res) => { + if (res.success) { + callback() + } else { + callback("宸ュ叿缂栫爜宸插瓨鍦�!") + } + }) + }, + //楠岃瘉鍨嬪彿/鍥惧彿鏄惁閲嶅 + validateModel(rule, value, callback) { + var params = { + tableName: 'tms_base_tools', + fieldName: 'tool_model', + fieldVal: value, + dataId: this.model.id + }; + duplicateCheck(params).then((res) => { + if (res.success) { + callback() + } else { + callback("鍨嬪彿/鍥惧彿宸插瓨鍦�!") + } + }) + }, + } +} +</script> + +<style lang="less" scoped> +/deep/ .ant-modal-body { + padding: 0 24px; +} + +/deep/ .ant-upload { + width: 185px; + height: 185px; +} + +/deep/ .img { + display: flex; + justify-content: center; + + .ant-upload-picture-card-wrapper { + width: auto; + } +} + +/deep/ .ant-upload-list-picture-card-container { + width: 185px; + height: 185px; +} + +/deep/ .ant-upload-list-item { + width: 185px; + height: 185px; +} +</style> \ No newline at end of file diff --git a/src/views/tms/modules/baseTools/ParaHoleToolsList.vue b/src/views/tms/modules/baseTools/ParaHoleToolsList.vue new file mode 100644 index 0000000..07b6b79 --- /dev/null +++ b/src/views/tms/modules/baseTools/ParaHoleToolsList.vue @@ -0,0 +1,81 @@ +<template> + <div> + <!-- 褰撳墠椤甸潰涓氬姟閮ㄥ垎 --> + <a-card :bordered="false" :title="title" v-show="visable"> + <a-descriptions title="宸ュ叿鍙傛暟璇︽儏"> + <a-descriptions-item label="鐩村緞">{{ this.para == null || this.para.diameter == null ? '' : this.para.diameter }}</a-descriptions-item> + <a-descriptions-item label="鍒囧墛鍒冮敟瑙�">{{ this.para == null || this.para.coneAngle == null ? '' : this.para.coneAngle }}</a-descriptions-item> + <a-descriptions-item label="鍒囧墛鍒冮暱">{{ this.para == null || this.para.edgeLength == null ? '' : this.para.edgeLength }}</a-descriptions-item> + <a-descriptions-item label="鍒�鍏锋�婚暱">{{ this.para == null || this.para.totalLength == null ? '' : this.para.totalLength }}</a-descriptions-item> + <a-descriptions-item label="鍒�鍏锋潗鏂�">{{ this.para == null || this.para.toolMaterial == null ? '' : this.para.toolMaterial }}</a-descriptions-item> + <a-descriptions-item label="闆朵欢鏉愭枡">{{ this.para == null || this.para.partMaterial == null ? '' : this.para.partMaterial }}</a-descriptions-item> + <a-descriptions-item label="鏄惁娑傚眰">{{ this.para == null || this.para.paintcoatFlag == null ? '' : this.para.paintcoatFlag }}</a-descriptions-item> + <a-descriptions-item label="鍒�鍏峰瀷寮�">{{ this.para == null || this.para.toolPattern == null ? '' : this.para.toolPattern }}</a-descriptions-item> + <a-descriptions-item label="鏌勯儴瑙勬牸">{{ this.para == null || this.para.handleSpecifications == null ? '' : this.para.handleSpecifications }}</a-descriptions-item> + <a-descriptions-item label="鍐峰嵈鏂瑰紡">{{ this.para == null || this.para.coolingMethod == null ? '' : this.para.coolingMethod }}</a-descriptions-item> + <a-descriptions-item label="闄勫姞鎶�鏈潯浠�">{{ this.para == null || this.para.technicalConditions == null ? '' : this.para.technicalConditions }}</a-descriptions-item> + <a-descriptions-item label="闄勫姞鎶�鏈潯浠惰鏄�">{{ this.para == null || this.para.conditionsInfo == null ? '' : this.para.conditionsInfo }}</a-descriptions-item> + <a-descriptions-item label="鍝佺墝">{{ this.para == null || this.para.brand == null ? '' : this.para.brand }}</a-descriptions-item> + <a-descriptions-item label="鍒跺紡">{{ this.para == null || this.para.types == null ? '' : this.para.types }}</a-descriptions-item> + <a-descriptions-item label="鍏樊绛夌骇">{{ this.para == null || this.para.toleranceClass == null ? '' : this.para.toleranceClass }}</a-descriptions-item> + <a-descriptions-item label="鎺掑睉妲藉舰寮�">{{ this.para == null || this.para.fluteForm == null ? '' : this.para.fluteForm }}</a-descriptions-item> + <a-descriptions-item label="鏌勯儴褰㈠紡">{{ this.para == null || this.para.handleForm == null ? '' : this.para.handleForm }}</a-descriptions-item> + <a-descriptions-item label="鍒冩暟">{{ this.para == null || this.para.bladeCount == null ? '' : this.para.bladeCount }}</a-descriptions-item> + <a-descriptions-item label="鏈�灏忕洿寰�">{{ this.para == null || this.para.smallDiameter == null ? '' : this.para.smallDiameter }}</a-descriptions-item> + <a-descriptions-item label="鍊掕瑙掑害">{{ this.para == null || this.para.chamferAngle == null ? '' : this.para.chamferAngle }}</a-descriptions-item> + <a-descriptions-item label="閫傞厤鍒�鐗�-鍒�澶�-鍒�鏉�">{{ this.para == null || this.para.fitterPart == null ? '' : this.para.fitterPart }}</a-descriptions-item> + <a-descriptions-item label="鏈夋晥鍔犲伐闀垮害">{{ this.para == null || this.para.effectiveLength == null ? '' : this.para.effectiveLength }}</a-descriptions-item> + <a-descriptions-item label="閽诲ご鐩村緞鑼冨洿">{{ this.para == null || this.para.drillDiameterRange == null ? '' : this.para.drillDiameterRange }}</a-descriptions-item> + <a-descriptions-item label="鍒�鏉嗙洿寰�">{{ this.para == null || this.para.knifeDiameter == null ? '' : this.para.knifeDiameter }}</a-descriptions-item> + <a-descriptions-item label="瀛斿緞">{{ this.para == null || this.para.boreDiameter == null ? '' : this.para.boreDiameter }}</a-descriptions-item> + <a-descriptions-item label="鎺ュ彛褰㈠紡">{{ this.para == null || this.para.connectorType == null ? '' : this.para.connectorType }}</a-descriptions-item> + <a-descriptions-item label="鎺ュ彛妲介暱瑙勬牸">{{ this.para == null || this.para.slotSpecification == null ? '' : this.para.slotSpecification }}</a-descriptions-item> + <a-descriptions-item label="閫傜敤鑼冨洿">{{ this.para == null || this.para.scopeOfApplication == null ? '' : this.para.scopeOfApplication }}</a-descriptions-item> + <a-descriptions-item label="鏈�灏忛晽瀛旂洿寰�">{{ this.para == null || this.para.latestBoringDiameter == null ? '' : this.para.latestBoringDiameter }}</a-descriptions-item> + <a-descriptions-item label="鏈�澶ч晽瀛旂洿寰�">{{ this.para == null || this.para.maxBoringDiameter == null ? '' : this.para.maxBoringDiameter }}</a-descriptions-item> + <a-descriptions-item label="鍔犲伐鏂瑰紡">{{ this.para == null || this.para.processingmethod == null ? '' : this.para.processingmethod }}</a-descriptions-item> + <a-descriptions-item label="鍒�澶存暟">{{ this.para == null || this.para.headsNumber == null ? '' : this.para.headsNumber }}</a-descriptions-item> + + </a-descriptions> + + </a-card> + </div> +</template> + +<script> + +import JDictSelectTag from '@/components/dict/JDictSelectTag' +import JEllipsis from '@/components/jeecg/JEllipsis' //寮曞叆杩囬暱瑁佸壀 +import Tooltip from 'ant-design-vue/es/tooltip' +import JDate from '@/components/jeecg/JDate.vue' + +export default { + name: 'ParaHoleToolsList', + components: { + JDictSelectTag, + JEllipsis, + JDate, + Tooltip, + }, + data() { + return { + description: '宸ュ叿淇℃伅椤甸潰', + title: '', + visable:false, + para:{}, + } + }, + created() { + }, + methods: { + + getPara(record){ + this.visable = true + this.para = record + }, + }, + +} +</script> +<style lang="less" scoped> +</style> \ No newline at end of file diff --git a/src/views/tms/modules/baseTools/ParaHoleToolsModal.vue b/src/views/tms/modules/baseTools/ParaHoleToolsModal.vue new file mode 100644 index 0000000..b91e089 --- /dev/null +++ b/src/views/tms/modules/baseTools/ParaHoleToolsModal.vue @@ -0,0 +1,555 @@ +<template> + <j-modal + :title="title" + :width="1200" + :visible="visible" + centered + :confirmLoading="confirmLoading" + :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" + switchFullscreen + @ok="handleOk" + @cancel="handleCancel" + cancelText="鍏抽棴"> + <a-spin :spinning="confirmLoading"> + <a-form-model ref="form" :model="model" :rules="validatorRules" :labelCol="labelCol" :wrapperCol="wrapperCol"> + <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;"> 宸ュ叿鍩虹淇℃伅 + </a-divider> + + <a-row :gutter="24"> + <a-col :span="8"> + <a-form-model-item prop="classifyNum" label="宸ュ叿鍒嗙被缂栫爜"> + <a-input placeholder="璇疯緭鍏ュ伐鍏峰垎绫荤紪鐮�" v-model="model.classifyNum" :disabled="true" /> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="classifyName" label="宸ュ叿鍒嗙被鍚嶇О"> + <a-input placeholder="璇疯緭鍏ュ伐鍏峰垎绫诲悕绉�" v-model="model.classifyName" :disabled="true" /> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="toolCode" label="宸ュ叿缂栫爜"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ伐鍏风紪鐮�'" v-model="model.toolCode" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + </a-row> + + <a-row> + <a-col :span="8"> + <a-form-model-item prop="chineseName" + label="涓枃鍚嶇О"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ヤ腑鏂囧悕绉�'" v-model="model.chineseName" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="foreignLanguageName" + label="澶栨枃鍚嶇О"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ鏂囧悕绉�'" v-model="model.foreignLanguageName" :disabled="disableSubmit" /> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="toolModel" + label="鍨嬪彿/鍥惧彿"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ瀷鍙�/鍥惧彿'" v-model="model.toolModel" :disabled="disableSubmit" /> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span="8"> + <a-form-model-item prop="standardLevel" + label="鏍囨敞绾у埆"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ユ爣鍑嗙骇鍒�'" v-model="model.standardLevel" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="standardCode" label="鏍囧噯鍙�"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ユ爣鍑嗗彿'" v-model="model.standardCode" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="signCode" label="搴忓彿"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ簭鍙�'" v-model="model.signCode" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + </a-row> + + <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;"> 绠$悊鍙傛暟 + </a-divider> + + <a-row :gutter="24"> + <a-col :span="8"> + <a-form-model-item prop="applicationType" + label="宸ュ叿绫诲瀷"> + <j-dict-select-tag dict-code="equipment_category" :placeholder="disableSubmit?'':'璇烽�夋嫨宸ュ叿绫诲瀷'" + v-model="model.applicationType" :disabled="disableSubmit" /> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="provinceCity" label="浠撳簱鐪佷唤鍩庡競"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ヤ粨搴撶渷浠藉煄甯�'" v-model="model.provinceCity" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="positionCode" label="搴撲綅鍙�"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ簱浣嶅彿'" v-model="model.positionCode" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + </a-row> + + <a-row :gutter="24"> + <a-col :span="8"> + <a-form-model-item prop="storageLocation" label="瀛樺偍浣嶇疆"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ瓨鍌ㄤ綅缃�'" v-model="model.storageLocation" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="lowerInventory" label="鏈�浣庡簱瀛�"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ユ渶浣庡簱瀛�'" v-model="model.lowerInventory" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="highestInventory" label="鏈�楂樺簱瀛�"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ユ渶楂樺簱瀛�'" v-model="model.highestInventory" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + </a-row> + + <a-row :gutter="24"> + <a-col :span="8"> + <a-form-model-item prop="auxiliaryUnitFlag" label="鏄惁鏈夎閲忚緟鍗曚綅"> + <a-radio-group v-model="model.auxiliaryUnitFlag" :placeholder="disableSubmit?'':'璇烽�夋嫨鏄惁鏈夎閲忚緟鍗曚綅'" :disabled="disableSubmit"> + <a-radio :value="'1'">鏄�</a-radio> + <a-radio :value="'2'">鍚�</a-radio> + </a-radio-group> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="mainUnit" label="璁¢噺涓诲崟浣�"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ヨ閲忎富鍗曚綅'" v-model="model.mainUnit" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="auxiliaryUnit" label="璁¢噺杈呭崟浣�"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ヨ閲忚緟鍗曚綅'" v-model="model.auxiliaryUnit" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + </a-row> + + <a-row :gutter="24"> + <a-col :span="8"> + <a-form-model-item prop="supplierId" label="鍘傚"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ巶瀹�'" v-model="model.supplierId" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="price" label="鍗曚环"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ崟浠�'" v-model="model.price" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + <!-- <a-col :span="8"> + <a-form-model-item prop="status" label="鐘舵��"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ョ姸鎬�'" v-model="model.status" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> --> + </a-row> + + <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;"> 鍙傛暟淇℃伅 + </a-divider> + + <a-row :gutter="24"> + <a-col :span="6"> + <a-form-model-item label="鐩村緞" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="diameter"> + <a-input v-model="model.diameter" :placeholder="disableSubmit?'':'璇疯緭鍏ョ洿寰�'" :disabled="disableSubmit"></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="鍒囧墛鍒冮敟瑙�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="coneAngle"> + <a-input v-model="model.coneAngle" :placeholder="disableSubmit?'':'璇疯緭鍏ュ垏鍓婂垉閿ヨ'" :disabled="disableSubmit"></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="鍒囧墛鍒冮暱" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="edgeLength"> + <a-input v-model="model.edgeLength" :placeholder="disableSubmit?'':'璇疯緭鍏ュ垏鍓婂垉闀�'" :disabled="disableSubmit"></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="鍒�鍏锋�婚暱" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="totalLength"> + <a-input v-model="model.totalLength" :placeholder="disableSubmit?'':'璇疯緭鍏ュ垁鍏锋�婚暱'" :disabled="disableSubmit"></a-input> + </a-form-model-item> + </a-col> + </a-row> + + <a-row :gutter="24"> + <a-col :span="6"> + <a-form-model-item label="鍒�鍏锋潗鏂�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="toolMaterial"> + <a-input v-model="model.toolMaterial" :placeholder="disableSubmit?'':'璇疯緭鍏ュ垁鍏锋潗鏂�'" :disabled="disableSubmit"></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="闆朵欢鏉愭枡" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="partMaterial"> + <a-input v-model="model.partMaterial" :placeholder="disableSubmit?'':'璇疯緭鍏ラ浂浠舵潗鏂�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="鏄惁娑傚眰" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="paintcoatFlag"> + <a-radio-group v-model="model.paintcoatFlag" :placeholder="disableSubmit?'':'璇烽�夋嫨鏄惁娑傚眰'" :disabled="disableSubmit"> + <a-radio :value="'1'">鏄�</a-radio> + <a-radio :value="'2'">鍚�</a-radio> + </a-radio-group> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="鍒�鍏峰瀷寮�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="toolPattern"> + <a-input v-model="model.toolPattern" :placeholder="disableSubmit?'':'璇疯緭鍏ュ垁鍏峰瀷寮�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span="6"> + <a-form-model-item label="鏌勯儴瑙勬牸" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="handleSpecifications"> + <a-input v-model="model.handleSpecifications" :placeholder="disableSubmit?'':'璇疯緭鍏ユ焺閮ㄨ鏍�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="鍐峰嵈鏂瑰紡" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="coolingMethod"> + <a-input v-model="model.coolingMethod" :placeholder="disableSubmit?'':'璇疯緭鍏ュ喎鍗存柟寮�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="闄勫姞鎶�鏈潯浠�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="technicalConditions"> + <a-input v-model="model.technicalConditions" :placeholder="disableSubmit?'':'璇疯緭鍏ラ檮鍔犳妧鏈潯浠�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="闄勫姞鎶�鏈潯浠惰鏄�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="conditionsInfo"> + <a-input v-model="model.conditionsInfo" :placeholder="disableSubmit?'':'璇疯緭鍏ラ檮鍔犳妧鏈潯浠惰鏄�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span="6"> + <a-form-model-item label="鍝佺墝" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="brand"> + <a-input v-model="model.brand" :placeholder="disableSubmit?'':'璇疯緭鍏ュ搧鐗�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="鍒跺紡" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="types"> + <a-input v-model="model.types" :placeholder="disableSubmit?'':'璇疯緭鍏ュ埗寮�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="鍏樊绛夌骇" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="toleranceClass"> + <a-input v-model="model.toleranceClass" :placeholder="disableSubmit?'':'璇疯緭鍏ュ叕宸瓑绾�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="鎺掑睉妲藉舰寮�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="fluteForm"> + <a-input v-model="model.fluteForm" :placeholder="disableSubmit?'':'璇疯緭鍏ユ帓灞戞Ы褰㈠紡'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span="6"> + <a-form-model-item label="鏌勯儴褰㈠紡" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="handleForm"> + <a-input v-model="model.handleForm" :placeholder="disableSubmit?'':'璇疯緭鍏ユ焺閮ㄥ舰寮�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="鍒冩暟" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bladeCount"> + <a-input v-model="model.bladeCount" :placeholder="disableSubmit?'':'璇疯緭鍏ュ垉鏁�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="鏈�灏忕洿寰�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="smallDiameter"> + <a-input v-model="model.smallDiameter" :placeholder="disableSubmit?'':'璇疯緭鍏ユ渶灏忕洿寰�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="鍊掕瑙掑害" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="chamferAngle"> + <a-input v-model="model.chamferAngle" :placeholder="disableSubmit?'':'璇疯緭鍏ュ�掕瑙掑害'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span="6"> + <a-form-model-item label="閫傞厤鍒�鐗�-鍒�澶�-鍒�鏉�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="fitterPart"> + <a-input v-model="model.fitterPart" :placeholder="disableSubmit?'':'璇疯緭鍏ラ�傞厤鍒�鐗�-鍒�澶�-鍒�鏉�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="鏈夋晥鍔犲伐闀垮害" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="effectiveLength"> + <a-input v-model="model.effectiveLength" :placeholder="disableSubmit?'':'璇疯緭鍏ユ湁鏁堝姞宸ラ暱搴�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="閽诲ご鐩村緞鑼冨洿" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="drillDiameterRange"> + <a-input v-model="model.drillDiameterRange" :placeholder="disableSubmit?'':'璇疯緭鍏ラ捇澶寸洿寰勮寖鍥�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="鍒�鏉嗙洿寰�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="knifeDiameter"> + <a-input v-model="model.knifeDiameter" :placeholder="disableSubmit?'':'璇疯緭鍏ュ垁鏉嗙洿寰�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span="6"> + <a-form-model-item label="瀛斿緞" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="boreDiameter"> + <a-input v-model="model.boreDiameter" :placeholder="disableSubmit?'':'璇疯緭鍏ュ瓟寰�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="鎺ュ彛褰㈠紡" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="connectorType"> + <a-input v-model="model.connectorType" :placeholder="disableSubmit?'':'璇疯緭鍏ユ帴鍙e舰寮�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="鎺ュ彛妲介暱瑙勬牸" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="slotSpecification"> + <a-input v-model="model.slotSpecification" :placeholder="disableSubmit?'':'璇疯緭鍏ユ帴鍙fЫ闀胯鏍�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="閫傜敤鑼冨洿" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="scopeOfApplication"> + <a-input v-model="model.scopeOfApplication" :placeholder="disableSubmit?'':'璇疯緭鍏ラ�傜敤鑼冨洿'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span="6"> + <a-form-model-item label="鏈�灏忛晽瀛旂洿寰�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="latestBoringDiameter"> + <a-input v-model="model.latestBoringDiameter" :placeholder="disableSubmit?'':'璇疯緭鍏ユ渶灏忛晽瀛旂洿寰�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="鏈�澶ч晽瀛旂洿寰�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="maxBoringDiameter"> + <a-input v-model="model.maxBoringDiameter" :placeholder="disableSubmit?'':'璇疯緭鍏ユ渶澶ч晽瀛旂洿寰�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="鍔犲伐鏂瑰紡" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="processingmethod"> + <a-input v-model="model.processingmethod" :placeholder="disableSubmit?'':'璇疯緭鍏ュ姞宸ユ柟寮�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="鍒�澶存暟" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="headsNumber"> + <a-input v-model="model.headsNumber" :placeholder="disableSubmit?'':'璇疯緭鍏ュ垁澶存暟'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + </a-row> + <a-row :gutter="24"> + <a-col :span="24"> + <a-form-model-item :labelCol="labelColLong" :wrapperCol="wrapperColLong" prop="remark" label="澶囨敞"> + <a-textarea :placeholder="disableSubmit?'':'璇疯緭鍏ュ娉�'" v-model="model.remark" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + </a-row> + </a-form-model> + </a-spin> + </j-modal> +</template> + +<script> +import { getAction,postAction, httpAction } from '@/api/manage' +import { validateDuplicateValueInDelFlag } from '@/utils/util' +import JSelectProduction from '@comp/jeecgbiz/JSelectProduction.vue' +import { getSystemConfigValue } from '@api/api' + import { duplicateCheck } from '@/api/api'//閲嶅鏍¢獙 + +export default { + name: 'ParaHoleToolsModal', + components: { JSelectProduction }, + data() { + return { + title: '鎿嶄綔', + visible: false, + //鎺у埗缂栬緫 + editable: false, + //璇︽儏鎺у埗 + disableSubmit: false, + model: {}, + labelCol: { + xs: { span: 24 }, + sm: { span: 9 } + }, + wrapperCol: { + xs: { span: 24 }, + sm: { span: 14 } + }, + labelColLong: { + xs: { span: 24 }, + sm: { span: 2 } + }, + wrapperColLong: { + xs: { span: 24 }, + sm: { span: 22 } + }, + confirmLoading: false, + validatorRules: { + toolCode: [ + { required: true, message: '璇疯緭鍏ュ伐鍏风紪鐮�' }, + { validator: this.validateNum } + ], + classifyNum: [ + { required: true, message: '璇疯緭鍏ュ伐鍏峰垎绫荤紪鐮�' } + ], + classifyName: [ + { required: true, message: '璇疯緭鍏ュ伐鍏峰垎绫诲悕绉�' } + ], + toolModel: [ + { required: true, message: '璇疯緭鍏ュ瀷鍙�/鍥惧彿' }, + { validator: this.validateModel } + ], + chineseName: [ + { required: true, message: '璇疯緭鍏ヤ腑鏂囧悕绉�' } + ], + diameter: [ + { required: true, message: '璇疯緭鍏ュ垁鍏风洿寰�' } + ], + edgeLength: [ + { required: true, message: '璇疯緭鍏ュ垏鍓婂垉闀�' } + ], + totalLength: [ + { required: true, message: '璇疯緭鍏ュ垁鍏锋�婚暱' } + ], + toolMaterial: [ + { required: true, message: '璇疯緭鍏ュ垁鍏锋潗鏂�' } + ], + paintcoatFlag: [ + { required: true, message: '璇烽�夋嫨鏄惁娑傚眰' } + ], + toolPattern: [ + { required: true, message: '璇疯緭鍏ュ垁鍏峰舰寮�' } + ], + handleSpecifications: [ + { required: true, message: '璇疯緭鍏ユ焺閮ㄨ鏍�' } + ], + coolingMethod: [ + { required: true, message: '璇疯緭鍏ュ喎鍗存柟寮�' } + ] + }, + url: { + add: '/tms/baseTools/add', + edit: '/tms/baseTools/edit', + }, + } + }, + created() { + }, + methods: { + add(nodeSelected) { + this.editable = false; + //鍒濆鍖栭粯璁ゅ�� + this.model = {}; + this.model.classifyId = nodeSelected.key + this.model.classifyNum = nodeSelected.entity.classifyId + this.model.classifyName = nodeSelected.entity.typeName + this.model.paraTypeFlag = nodeSelected.entity.paraTypeFlag + this.visible = true + }, + edit(record) { + this.editable = true; + this.model = Object.assign({}, record) + this.visible = true + }, + close() { + this.$emit('close') + this.visible = false + this.$refs.form.clearValidate() + }, + handleOk() { + const that = this + // 瑙﹀彂琛ㄥ崟楠岃瘉 + this.$refs.form.validate(valid => { + if (valid) { + that.confirmLoading = true + let formData = Object.assign(this.model) + let httpUrl = '' + let method = 'post' + if (!this.model.id) { + httpUrl += this.url.add + } else { + httpUrl += this.url.edit + } + httpAction(httpUrl, formData, method) + .then((res) => { + if (res.success) { + that.$message.success(res.message) + that.$emit('ok') + } else { + that.$message.warning(res.message) + } + }) + .finally(() => { + that.confirmLoading = false + that.close() + }) + } + }) + }, + handleCancel() { + this.close() + }, + //楠岃瘉宸ュ叿缂栫爜鏄惁閲嶅 + validateNum(rule, value, callback) { + var params = { + tableName: 'tms_base_tools', + fieldName: 'tool_code', + fieldVal: value, + dataId: this.model.id + }; + duplicateCheck(params).then((res) => { + if (res.success) { + callback() + } else { + callback("宸ュ叿缂栫爜宸插瓨鍦�!") + } + }) + }, + //楠岃瘉鍨嬪彿/鍥惧彿鏄惁閲嶅 + validateModel(rule, value, callback) { + var params = { + tableName: 'tms_base_tools', + fieldName: 'tool_model', + fieldVal: value, + dataId: this.model.id + }; + duplicateCheck(params).then((res) => { + if (res.success) { + callback() + } else { + callback("鍨嬪彿/鍥惧彿宸插瓨鍦�!") + } + }) + }, + } +} +</script> + +<style lang="less" scoped> +/deep/ .ant-modal-body { + padding: 0 24px; +} + +/deep/ .ant-upload { + width: 185px; + height: 185px; +} + +/deep/ .img { + display: flex; + justify-content: center; + + .ant-upload-picture-card-wrapper { + width: auto; + } +} + +/deep/ .ant-upload-list-picture-card-container { + width: 185px; + height: 185px; +} + +/deep/ .ant-upload-list-item { + width: 185px; + height: 185px; +} +</style> \ No newline at end of file diff --git a/src/views/tms/modules/baseTools/ParaMillToolList.vue b/src/views/tms/modules/baseTools/ParaMillToolList.vue new file mode 100644 index 0000000..7e82034 --- /dev/null +++ b/src/views/tms/modules/baseTools/ParaMillToolList.vue @@ -0,0 +1,82 @@ +<template> + <div> + <!-- 褰撳墠椤甸潰涓氬姟閮ㄥ垎 --> + <a-card :bordered="false" :title="title" v-show="visable"> + <a-descriptions title="宸ュ叿鍙傛暟璇︽儏"> + <a-descriptions-item label="鐩村緞">{{ this.para == null || this.para.diameter == null ? '' : this.para.diameter }}</a-descriptions-item> + <a-descriptions-item label="鍒�灏栬R">{{ this.para == null || this.para.noseAngleR == null ? '' : this.para.noseAngleR }}</a-descriptions-item> + <a-descriptions-item label="榻挎暟">{{ this.para == null || this.para.numberOfTeeth == null ? '' : this.para.numberOfTeeth }}</a-descriptions-item> + <a-descriptions-item label="鍒囧墛鍒冮暱">{{ this.para == null || this.para.edgeLength == null ? '' : this.para.edgeLength }}</a-descriptions-item> + <a-descriptions-item label="鍒�鍏锋�婚暱">{{ this.para == null || this.para.totalLength == null ? '' : this.para.totalLength }}</a-descriptions-item> + <a-descriptions-item label="鍒�鍏锋潗鏂�">{{ this.para == null || this.para.toolMaterial == null ? '' : this.para.toolMaterial }}</a-descriptions-item> + <a-descriptions-item label="闆朵欢鏉愭枡">{{ this.para == null || this.para.partMaterial == null ? '' : this.para.partMaterial }}</a-descriptions-item> + <a-descriptions-item label="鏄惁娑傚眰">{{ this.para == null || this.para.paintcoatFlag == null ? '' : this.para.paintcoatFlag }}</a-descriptions-item> + <a-descriptions-item label="鍒�鍏峰瀷寮�">{{ this.para == null || this.para.toolPattern == null ? '' : this.para.toolPattern }}</a-descriptions-item> + <a-descriptions-item label="瑁呭す瑙勬牸">{{ this.para == null || this.para.clampingSpecifications == null ? '' : this.para.clampingSpecifications }}</a-descriptions-item> + <a-descriptions-item label="鍐峰嵈鏂瑰紡">{{ this.para == null || this.para.coolingMethod == null ? '' : this.para.coolingMethod }}</a-descriptions-item> + <a-descriptions-item label="闄勫姞鎶�鏈潯浠�">{{ this.para == null || this.para.technicalConditions == null ? '' : this.para.technicalConditions }}</a-descriptions-item> + <a-descriptions-item label="闄勫姞鎶�鏈潯浠惰鏄�">{{ this.para == null || this.para.conditionsInfo == null ? '' : this.para.conditionsInfo }}</a-descriptions-item> + <a-descriptions-item label="鍝佺墝">{{ this.para == null || this.para.brand == null ? '' : this.para.brand }}</a-descriptions-item> + <a-descriptions-item label="棰堝緞">{{ this.para == null || this.para.neckDiameter == null ? '' : this.para.neckDiameter }}</a-descriptions-item> + <a-descriptions-item label="鏌勯儴褰㈠紡">{{ this.para == null || this.para.handleForm == null ? '' : this.para.handleForm }}</a-descriptions-item> + <a-descriptions-item label="鍒�灏栬C">{{ this.para == null || this.para.noseAngleC == null ? '' : this.para.noseAngleC }}</a-descriptions-item> + <a-descriptions-item label="鍒�灏栬鍐匯">{{ this.para == null || this.para.angleInsideR == null ? '' : this.para.angleInsideR }}</a-descriptions-item> + <a-descriptions-item label="鍒�鍏疯搴�">{{ this.para == null || this.para.toolAngle == null ? '' : this.para.toolAngle }}</a-descriptions-item> + <a-descriptions-item label="鏈�灏忕洿寰�">{{ this.para == null || this.para.smallDiameter == null ? '' : this.para.smallDiameter }}</a-descriptions-item> + <a-descriptions-item label="鏌勯暱">{{ this.para == null || this.para.handleLength == null ? '' : this.para.handleLength }}</a-descriptions-item> + <a-descriptions-item label="涓诲亸瑙扠">{{ this.para == null || this.para.mainAngleK == null ? '' : this.para.mainAngleK }}</a-descriptions-item> + <a-descriptions-item label="鏈�澶у垏娣�">{{ this.para == null || this.para.deepestDepth == null ? '' : this.para.deepestDepth }}</a-descriptions-item> + <a-descriptions-item label="閫傞厤鍒�鐗�">{{ this.para == null || this.para.adaptBlade == null ? '' : this.para.adaptBlade }}</a-descriptions-item> + <a-descriptions-item label="鏌勯褰㈠紡">{{ this.para == null || this.para.handleNeckForm == null ? '' : this.para.handleNeckForm }}</a-descriptions-item> + <a-descriptions-item label="鏌勯闀垮害">{{ this.para == null || this.para.handleNeckLength == null ? '' : this.para.handleNeckLength }}</a-descriptions-item> + <a-descriptions-item label="鎺ュ彛灏哄瑙勬牸">{{ this.para == null || this.para.sizeSpecifications == null ? '' : this.para.sizeSpecifications }}</a-descriptions-item> + <a-descriptions-item label="閾e垁澶村舰寮�">{{ this.para == null || this.para.millingHeadForm == null ? '' : this.para.millingHeadForm }}</a-descriptions-item> + <a-descriptions-item label="鎮几闀垮害">{{ this.para == null || this.para.overhangingLength == null ? '' : this.para.overhangingLength }}</a-descriptions-item> + <a-descriptions-item label="鍒囧墛鍒冨舰寮�">{{ this.para == null || this.para.cuttingEdgeForm == null ? '' : this.para.cuttingEdgeForm }}</a-descriptions-item> + <a-descriptions-item label="鍐呭绾规暟">{{ this.para == null || this.para.numberPatterns == null ? '' : this.para.numberPatterns }}</a-descriptions-item> + <a-descriptions-item label="铻鸿窛">{{ this.para == null || this.para.pitch == null ? '' : this.para.pitch }}</a-descriptions-item> + <a-descriptions-item label="鏈�杩戝姞宸ョ洿寰�">{{ this.para == null || this.para.recentlyDiameter == null ? '' : this.para.recentlyDiameter }}</a-descriptions-item> + + </a-descriptions> + + </a-card> + </div> +</template> + +<script> + +import JDictSelectTag from '@/components/dict/JDictSelectTag' +import JEllipsis from '@/components/jeecg/JEllipsis' //寮曞叆杩囬暱瑁佸壀 +import Tooltip from 'ant-design-vue/es/tooltip' +import JDate from '@/components/jeecg/JDate.vue' + +export default { + name: 'ParaHoleToolsList', + components: { + JDictSelectTag, + JEllipsis, + JDate, + Tooltip, + }, + data() { + return { + description: '宸ュ叿淇℃伅椤甸潰', + title: '', + visable:false, + para:{}, + } + }, + created() { + }, + methods: { + + getPara(record){ + this.visable = true + this.para = record + }, + }, + +} +</script> +<style lang="less" scoped> +</style> \ No newline at end of file diff --git a/src/views/tms/modules/baseTools/ParaMillToolModal.vue b/src/views/tms/modules/baseTools/ParaMillToolModal.vue new file mode 100644 index 0000000..e524131 --- /dev/null +++ b/src/views/tms/modules/baseTools/ParaMillToolModal.vue @@ -0,0 +1,569 @@ +<template> + <j-modal + :title="title" + :width="1200" + :visible="visible" + centered + :confirmLoading="confirmLoading" + :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" + switchFullscreen + @ok="handleOk" + @cancel="handleCancel" + cancelText="鍏抽棴"> + <a-spin :spinning="confirmLoading"> + <a-form-model ref="form" :model="model" :rules="validatorRules" :labelCol="labelCol" :wrapperCol="wrapperCol"> + <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;"> 宸ュ叿鍩虹淇℃伅 + </a-divider> + + <a-row :gutter="24"> + <a-col :span="8"> + <a-form-model-item prop="classifyNum" label="宸ュ叿鍒嗙被缂栫爜"> + <a-input placeholder="璇疯緭鍏ュ伐鍏峰垎绫荤紪鐮�" v-model="model.classifyNum" :disabled="true" /> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="classifyName" label="宸ュ叿鍒嗙被鍚嶇О"> + <a-input placeholder="璇疯緭鍏ュ伐鍏峰垎绫诲悕绉�" v-model="model.classifyName" :disabled="true" /> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="toolCode" label="宸ュ叿缂栫爜"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ伐鍏风紪鐮�'" v-model="model.toolCode" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + </a-row> + + <a-row> + <a-col :span="8"> + <a-form-model-item prop="chineseName" + label="涓枃鍚嶇О"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ヤ腑鏂囧悕绉�'" v-model="model.chineseName" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="foreignLanguageName" + label="澶栨枃鍚嶇О"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ鏂囧悕绉�'" v-model="model.foreignLanguageName" :disabled="disableSubmit" /> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="toolModel" + label="鍨嬪彿/鍥惧彿"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ瀷鍙�/鍥惧彿'" v-model="model.toolModel" :disabled="disableSubmit" /> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span="8"> + <a-form-model-item prop="standardLevel" + label="鏍囨敞绾у埆"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ユ爣鍑嗙骇鍒�'" v-model="model.standardLevel" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="standardCode" label="鏍囧噯鍙�"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ユ爣鍑嗗彿'" v-model="model.standardCode" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="signCode" label="搴忓彿"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ簭鍙�'" v-model="model.signCode" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + </a-row> + + <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;"> 绠$悊鍙傛暟 + </a-divider> + + <a-row :gutter="24"> + <a-col :span="8"> + <a-form-model-item prop="applicationType" + label="宸ュ叿绫诲瀷"> + <j-dict-select-tag dict-code="equipment_category" :placeholder="disableSubmit?'':'璇烽�夋嫨宸ュ叿绫诲瀷'" + v-model="model.applicationType" :disabled="disableSubmit" /> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="provinceCity" label="浠撳簱鐪佷唤鍩庡競"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ヤ粨搴撶渷浠藉煄甯�'" v-model="model.provinceCity" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="positionCode" label="搴撲綅鍙�"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ簱浣嶅彿'" v-model="model.positionCode" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + </a-row> + + <a-row :gutter="24"> + <a-col :span="8"> + <a-form-model-item prop="storageLocation" label="瀛樺偍浣嶇疆"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ瓨鍌ㄤ綅缃�'" v-model="model.storageLocation" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="lowerInventory" label="鏈�浣庡簱瀛�"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ユ渶浣庡簱瀛�'" v-model="model.lowerInventory" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="highestInventory" label="鏈�楂樺簱瀛�"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ユ渶楂樺簱瀛�'" v-model="model.highestInventory" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + </a-row> + + <a-row :gutter="24"> + <a-col :span="8"> + <a-form-model-item prop="auxiliaryUnitFlag" label="鏄惁鏈夎閲忚緟鍗曚綅"> + <a-radio-group v-model="model.auxiliaryUnitFlag" :placeholder="disableSubmit?'':'璇烽�夋嫨鏄惁鏈夎閲忚緟鍗曚綅'" :disabled="disableSubmit"> + <a-radio :value="'1'">鏄�</a-radio> + <a-radio :value="'2'">鍚�</a-radio> + </a-radio-group> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="mainUnit" label="璁¢噺涓诲崟浣�"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ヨ閲忎富鍗曚綅'" v-model="model.mainUnit" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="auxiliaryUnit" label="璁¢噺杈呭崟浣�"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ヨ閲忚緟鍗曚綅'" v-model="model.auxiliaryUnit" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + </a-row> + + <a-row :gutter="24"> + <a-col :span="8"> + <a-form-model-item prop="supplierId" label="鍘傚"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ巶瀹�'" v-model="model.supplierId" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="price" label="鍗曚环"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ崟浠�'" v-model="model.price" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + <!-- <a-col :span="8"> + <a-form-model-item prop="status" label="鐘舵��"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ョ姸鎬�'" v-model="model.status" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> --> + </a-row> + + <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;"> 鍙傛暟淇℃伅 + </a-divider> + + <a-row :gutter="24"> + <a-col :span="6"> + <a-form-model-item label="鐩村緞" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="diameter"> + <a-input v-model="model.diameter" :placeholder="disableSubmit?'':'璇疯緭鍏ョ洿寰�'" :disabled="disableSubmit"></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="鍒�灏栬R" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="noseAngleR"> + <a-input v-model="model.noseAngleR" :placeholder="disableSubmit?'':'璇疯緭鍏ュ垁灏栬R'" :disabled="disableSubmit"></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="鍒囧墛鍒冮暱" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="edgeLength"> + <a-input v-model="model.edgeLength" :placeholder="disableSubmit?'':'璇疯緭鍏ュ垏鍓婂垉闀�'" :disabled="disableSubmit"></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="鍒�鍏锋�婚暱" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="totalLength"> + <a-input v-model="model.totalLength" :placeholder="disableSubmit?'':'璇疯緭鍏ュ垁鍏锋�婚暱'" :disabled="disableSubmit"></a-input> + </a-form-model-item> + </a-col> + </a-row> + + <a-row :gutter="24"> + <a-col :span="6"> + <a-form-model-item label="鍒�鍏锋潗鏂�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="toolMaterial"> + <a-input v-model="model.toolMaterial" :placeholder="disableSubmit?'':'璇疯緭鍏ュ垁鍏锋潗鏂�'" :disabled="disableSubmit"></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="闆朵欢鏉愭枡" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="partMaterial"> + <a-input v-model="model.partMaterial" :placeholder="disableSubmit?'':'璇疯緭鍏ラ浂浠舵潗鏂�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="鏄惁娑傚眰" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="paintcoatFlag"> + <a-radio-group v-model="model.paintcoatFlag" :placeholder="disableSubmit?'':'璇烽�夋嫨鏄惁娑傚眰'" :disabled="disableSubmit"> + <a-radio :value="'1'">鏄�</a-radio> + <a-radio :value="'2'">鍚�</a-radio> + </a-radio-group> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="鍒�鍏峰瀷寮�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="toolPattern"> + <a-input v-model="model.toolPattern" :placeholder="disableSubmit?'':'璇疯緭鍏ュ垁鍏峰瀷寮�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span="6"> + <a-form-model-item label="瑁呭す瑙勬牸" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="clampingSpecifications"> + <a-input v-model="model.clampingSpecifications" :placeholder="disableSubmit?'':'璇疯緭鍏ヨ澶硅鏍�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="鏌勯儴褰㈠紡" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="handleForm"> + <a-input v-model="model.handleForm" :placeholder="disableSubmit?'':'璇疯緭鍏ユ焺閮ㄥ舰寮�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="鍐峰嵈鏂瑰紡" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="coolingMethod"> + <a-input v-model="model.coolingMethod" :placeholder="disableSubmit?'':'璇疯緭鍏ュ喎鍗存柟寮�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="闄勫姞鎶�鏈潯浠�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="technicalConditions"> + <a-input v-model="model.technicalConditions" :placeholder="disableSubmit?'':'璇疯緭鍏ラ檮鍔犳妧鏈潯浠�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="闄勫姞鎶�鏈潯浠惰鏄�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="conditionsInfo"> + <a-input v-model="model.conditionsInfo" :placeholder="disableSubmit?'':'璇疯緭鍏ラ檮鍔犳妧鏈潯浠惰鏄�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span="6"> + <a-form-model-item label="鍝佺墝" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="brand"> + <a-input v-model="model.brand" :placeholder="disableSubmit?'':'璇疯緭鍏ュ搧鐗�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="棰堝緞" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="neckDiameter"> + <a-input v-model="model.neckDiameter" :placeholder="disableSubmit?'':'璇疯緭鍏ラ寰�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="鍒�灏栬C" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="noseAngleC"> + <a-input v-model="model.noseAngleC" :placeholder="disableSubmit?'':'璇疯緭鍏ュ垁灏栬C'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="鍒�灏栬鍐匯" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="angleInsideR"> + <a-input v-model="model.angleInsideR" :placeholder="disableSubmit?'':'璇疯緭鍏ュ垁灏栬鍐匯'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span="6"> + <a-form-model-item label="鏈�灏忕洿寰�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="smallDiameter"> + <a-input v-model="model.smallDiameter" :placeholder="disableSubmit?'':'璇疯緭鍏ユ渶灏忕洿寰�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="鍒�鍏疯搴�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="toolAngle"> + <a-input v-model="model.toolAngle" :placeholder="disableSubmit?'':'璇疯緭鍏ュ垁鍏疯搴�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="鏌勯暱" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="handleLength"> + <a-input v-model="model.handleLength" :placeholder="disableSubmit?'':'璇疯緭鍏ユ焺闀�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="涓诲亸瑙扠" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="mainAngleK"> + <a-input v-model="model.mainAngleK" :placeholder="disableSubmit?'':'璇疯緭鍏ヤ富鍋忚K'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span="6"> + <a-form-model-item label="鏈�澶у垏娣�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="deepestDepth"> + <a-input v-model="model.deepestDepth" :placeholder="disableSubmit?'':'璇疯緭鍏ユ渶澶у垏娣�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="閫傞厤鍒�鐗�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="adaptBlade"> + <a-input v-model="model.adaptBlade" :placeholder="disableSubmit?'':'璇疯緭鍏ラ�傞厤鍒�鐗�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="鏌勯褰㈠紡" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="handleNeckForm"> + <a-input v-model="model.handleNeckForm" :placeholder="disableSubmit?'':'璇疯緭鍏ユ焺棰堝舰寮�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="鏌勯闀垮害" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="handleNeckLength"> + <a-input v-model="model.handleNeckLength" :placeholder="disableSubmit?'':'璇疯緭鍏ユ焺棰堥暱搴�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span="6"> + <a-form-model-item label="鎺ュ彛灏哄瑙勬牸" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sizeSpecifications"> + <a-input v-model="model.sizeSpecifications" :placeholder="disableSubmit?'':'璇疯緭鍏ユ帴鍙e昂瀵歌鏍�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="閾e垁澶村舰寮�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="millingHeadForm"> + <a-input v-model="model.millingHeadForm" :placeholder="disableSubmit?'':'璇疯緭鍏ラ摚鍒�澶村舰寮�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="鎮几闀垮害" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="overhangingLength"> + <a-input v-model="model.overhangingLength" :placeholder="disableSubmit?'':'璇疯緭鍏ユ偓浼搁暱搴�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="鍒囧墛鍒冨舰寮�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="cuttingEdgeForm"> + <a-input v-model="model.cuttingEdgeForm" :placeholder="disableSubmit?'':'璇疯緭鍏ュ垏鍓婂垉褰㈠紡'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span="6"> + <a-form-model-item label="榻挎暟" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="numberOfTeeth"> + <a-input v-model="model.numberOfTeeth" :placeholder="disableSubmit?'':'璇疯緭鍏ラ娇鏁�'" :disabled="disableSubmit"></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="鍐呭绾规暟" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="numberPatterns"> + <a-input v-model="model.numberPatterns" :placeholder="disableSubmit?'':'璇疯緭鍏ュ唴澶栫汗鏁�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="铻鸿窛" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pitch"> + <a-input v-model="model.pitch" :placeholder="disableSubmit?'':'璇疯緭鍏ヨ灪璺�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="鏈�杩戝姞宸ョ洿寰�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="recentlyDiameter"> + <a-input v-model="model.recentlyDiameter" :placeholder="disableSubmit?'':'璇疯緭鍏ユ渶杩戝姞宸ョ洿寰�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + </a-row> + <a-row :gutter="24"> + <a-col :span="24"> + <a-form-model-item :labelCol="labelColLong" :wrapperCol="wrapperColLong" prop="remark" label="澶囨敞"> + <a-textarea :placeholder="disableSubmit?'':'璇疯緭鍏ュ娉�'" v-model="model.remark" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + </a-row> + </a-form-model> + </a-spin> + </j-modal> +</template> + +<script> +import { getAction,postAction, httpAction } from '@/api/manage' +import { validateDuplicateValueInDelFlag } from '@/utils/util' +import JSelectProduction from '@comp/jeecgbiz/JSelectProduction.vue' +import { getSystemConfigValue } from '@api/api' + import { duplicateCheck } from '@/api/api'//閲嶅鏍¢獙 + +export default { + name: 'ParaHoleToolsModal', + components: { JSelectProduction }, + data() { + return { + title: '鎿嶄綔', + visible: false, + //鎺у埗缂栬緫 + editable: false, + //璇︽儏鎺у埗 + disableSubmit: false, + model: {}, + labelCol: { + xs: { span: 24 }, + sm: { span: 9 } + }, + wrapperCol: { + xs: { span: 24 }, + sm: { span: 14 } + }, + labelColLong: { + xs: { span: 24 }, + sm: { span: 2 } + }, + wrapperColLong: { + xs: { span: 24 }, + sm: { span: 22 } + }, + confirmLoading: false, + validatorRules: { + toolCode: [ + { required: true, message: '璇疯緭鍏ュ伐鍏风紪鐮�' }, + { validator: this.validateNum } + ], + classifyNum: [ + { required: true, message: '璇疯緭鍏ュ伐鍏峰垎绫荤紪鐮�' } + ], + classifyName: [ + { required: true, message: '璇疯緭鍏ュ伐鍏峰垎绫诲悕绉�' } + ], + toolModel: [ + { required: true, message: '璇疯緭鍏ュ瀷鍙�/鍥惧彿' }, + { validator: this.validateModel } + ], + chineseName: [ + { required: true, message: '璇疯緭鍏ヤ腑鏂囧悕绉�' } + ], + diameter: [ + { required: true, message: '璇疯緭鍏ュ垁鍏风洿寰�' } + ], + noseAngleR: [ + { required: true, message: '璇疯緭鍏ュ垁灏栬R' } + ], + numberOfTeeth: [ + { required: true, message: '璇疯緭鍏ラ娇鏁�' } + ], + edgeLength: [ + { required: true, message: '璇疯緭鍏ュ垏鍓婂垉闀�' } + ], + totalLength: [ + { required: true, message: '璇疯緭鍏ュ垁鍏锋�婚暱' } + ], + toolMaterial: [ + { required: true, message: '璇疯緭鍏ュ垁鍏锋潗鏂�' } + ], + paintcoatFlag: [ + { required: true, message: '璇烽�夋嫨鏄惁娑傚眰' } + ], + toolPattern: [ + { required: true, message: '璇疯緭鍏ュ垁鍏峰舰寮�' } + ], + clampingSpecifications: [ + { required: true, message: '璇疯緭鍏ヨ澶硅鏍�' } + ], + coolingMethod: [ + { required: true, message: '璇疯緭鍏ュ喎鍗存柟寮�' } + ], + technicalConditions: [ + { required: true, message: '璇疯緭鍏ラ檮鍔犳妧鏈潯浠�' } + ] + }, + url: { + add: '/tms/baseTools/add', + edit: '/tms/baseTools/edit', + }, + } + }, + created() { + }, + methods: { + add(nodeSelected) { + this.editable = false; + //鍒濆鍖栭粯璁ゅ�� + this.model = {}; + this.model.classifyId = nodeSelected.key + this.model.classifyNum = nodeSelected.entity.classifyId + this.model.classifyName = nodeSelected.entity.typeName + this.model.paraTypeFlag = nodeSelected.entity.paraTypeFlag + this.visible = true + }, + edit(record) { + this.editable = true; + this.model = Object.assign({}, record) + this.visible = true + }, + close() { + this.$emit('close') + this.visible = false + this.$refs.form.clearValidate() + }, + handleOk() { + const that = this + // 瑙﹀彂琛ㄥ崟楠岃瘉 + this.$refs.form.validate(valid => { + if (valid) { + that.confirmLoading = true + let formData = Object.assign(this.model) + let httpUrl = '' + let method = 'post' + if (!this.model.id) { + httpUrl += this.url.add + } else { + httpUrl += this.url.edit + } + httpAction(httpUrl, formData, method) + .then((res) => { + if (res.success) { + that.$message.success(res.message) + that.$emit('ok') + } else { + that.$message.warning(res.message) + } + }) + .finally(() => { + that.confirmLoading = false + that.close() + }) + } + }) + }, + handleCancel() { + this.close() + }, + //楠岃瘉宸ュ叿缂栫爜鏄惁閲嶅 + validateNum(rule, value, callback) { + var params = { + tableName: 'tms_base_tools', + fieldName: 'tool_code', + fieldVal: value, + dataId: this.model.id + }; + duplicateCheck(params).then((res) => { + if (res.success) { + callback() + } else { + callback("宸ュ叿缂栫爜宸插瓨鍦�!") + } + }) + }, + //楠岃瘉鍨嬪彿/鍥惧彿鏄惁閲嶅 + validateModel(rule, value, callback) { + var params = { + tableName: 'tms_base_tools', + fieldName: 'tool_model', + fieldVal: value, + dataId: this.model.id + }; + duplicateCheck(params).then((res) => { + if (res.success) { + callback() + } else { + callback("鍨嬪彿/鍥惧彿宸插瓨鍦�!") + } + }) + }, + } +} +</script> + +<style lang="less" scoped> +/deep/ .ant-modal-body { + padding: 0 24px; +} + +/deep/ .ant-upload { + width: 185px; + height: 185px; +} + +/deep/ .img { + display: flex; + justify-content: center; + + .ant-upload-picture-card-wrapper { + width: auto; + } +} + +/deep/ .ant-upload-list-picture-card-container { + width: 185px; + height: 185px; +} + +/deep/ .ant-upload-list-item { + width: 185px; + height: 185px; +} +</style> \ No newline at end of file diff --git a/src/views/tms/modules/baseTools/ParaThreadingToolList.vue b/src/views/tms/modules/baseTools/ParaThreadingToolList.vue new file mode 100644 index 0000000..ef48cb2 --- /dev/null +++ b/src/views/tms/modules/baseTools/ParaThreadingToolList.vue @@ -0,0 +1,72 @@ +<template> + <div> + <!-- 褰撳墠椤甸潰涓氬姟閮ㄥ垎 --> + <a-card :bordered="false" :title="title" v-show="visable"> + <a-descriptions title="宸ュ叿鍙傛暟璇︽儏"> + <a-descriptions-item label="铻虹汗浠e彿">{{ this.para == null || this.para.threadCode == null ? '' : this.para.threadCode }}</a-descriptions-item> + <a-descriptions-item label="铻鸿窛">{{ this.para == null || this.para.pitch == null ? '' : this.para.pitch }}</a-descriptions-item> + <a-descriptions-item label="铻虹汗鏃嬪悜">{{ this.para == null || this.para.rotationDirection == null ? '' : this.para.rotationDirection }}</a-descriptions-item> + <a-descriptions-item label="铻虹汗鍏樊甯︿唬鍙�">{{ this.para == null || this.para.tolerancezoneLevel == null ? '' : this.para.tolerancezoneLevel }}</a-descriptions-item> + <a-descriptions-item label="鍒囧墛鍒冮暱">{{ this.para == null || this.para.edgeLength == null ? '' : this.para.edgeLength }}</a-descriptions-item> + <a-descriptions-item label="鍒�鍏锋�婚暱">{{ this.para == null || this.para.totalLength == null ? '' : this.para.totalLength }}</a-descriptions-item> + <a-descriptions-item label="鍒�鍏锋潗鏂�">{{ this.para == null || this.para.toolMaterial == null ? '' : this.para.toolMaterial }}</a-descriptions-item> + <a-descriptions-item label="闆朵欢鏉愭枡">{{ this.para == null || this.para.partMaterial == null ? '' : this.para.partMaterial }}</a-descriptions-item> + <a-descriptions-item label="鏄惁娑傚眰">{{ this.para == null || this.para.paintcoatFlag == null ? '' : this.para.paintcoatFlag }}</a-descriptions-item> + <a-descriptions-item label="澶栧瀷灏哄">{{ this.para == null || this.para.externalDimensions == null ? '' : this.para.externalDimensions }}</a-descriptions-item> + <a-descriptions-item label="鏌勯儴瑙勬牸">{{ this.para == null || this.para.handleSpecifications == null ? '' : this.para.handleSpecifications }}</a-descriptions-item> + <a-descriptions-item label="鍐峰嵈鏂瑰紡">{{ this.para == null || this.para.coolingMethod == null ? '' : this.para.coolingMethod }}</a-descriptions-item> + <a-descriptions-item label="闄勫姞鎶�鏈潯浠�">{{ this.para == null || this.para.technicalConditions == null ? '' : this.para.technicalConditions }}</a-descriptions-item> + <a-descriptions-item label="闄勫姞鎶�鏈潯浠惰鏄�">{{ this.para == null || this.para.conditionsInfo == null ? '' : this.para.conditionsInfo }}</a-descriptions-item> + <a-descriptions-item label="鍝佺墝">{{ this.para == null || this.para.brand == null ? '' : this.para.brand }}</a-descriptions-item> + <a-descriptions-item label="鍒跺紡">{{ this.para == null || this.para.types == null ? '' : this.para.types }}</a-descriptions-item> + <a-descriptions-item label="铻哄瓟绫诲瀷">{{ this.para == null || this.para.screwHoleType == null ? '' : this.para.screwHoleType }}</a-descriptions-item> + <a-descriptions-item label="铻虹汗鏍囧噯">{{ this.para == null || this.para.threadStandard == null ? '' : this.para.threadStandard }}</a-descriptions-item> + <a-descriptions-item label="鎺掑睉妲藉瀷">{{ this.para == null || this.para.fluteSoltType == null ? '' : this.para.fluteSoltType }}</a-descriptions-item> + <a-descriptions-item label="铻虹汗绫诲瀷">{{ this.para == null || this.para.threadType == null ? '' : this.para.threadType }}</a-descriptions-item> + <a-descriptions-item label="瀵煎悜灏哄">{{ this.para == null || this.para.guidingSize == null ? '' : this.para.guidingSize }}</a-descriptions-item> + <a-descriptions-item label="杩炴帴瀛斿緞">{{ this.para == null || this.para.connectionAperture == null ? '' : this.para.connectionAperture }}</a-descriptions-item> + <a-descriptions-item label="杩炴帴閿Ы">{{ this.para == null || this.para.connectingKeyway == null ? '' : this.para.connectingKeyway }}</a-descriptions-item> + + </a-descriptions> + + </a-card> + </div> +</template> + +<script> + +import JDictSelectTag from '@/components/dict/JDictSelectTag' +import JEllipsis from '@/components/jeecg/JEllipsis' //寮曞叆杩囬暱瑁佸壀 +import Tooltip from 'ant-design-vue/es/tooltip' +import JDate from '@/components/jeecg/JDate.vue' + +export default { + name: 'ParaHoleToolsList', + components: { + JDictSelectTag, + JEllipsis, + JDate, + Tooltip, + }, + data() { + return { + description: '宸ュ叿淇℃伅椤甸潰', + title: '', + visable:false, + para:{}, + } + }, + created() { + }, + methods: { + + getPara(record){ + this.visable = true + this.para = record + }, + }, + +} +</script> +<style lang="less" scoped> +</style> \ No newline at end of file diff --git a/src/views/tms/modules/baseTools/ParaThreadingToolModal.vue b/src/views/tms/modules/baseTools/ParaThreadingToolModal.vue new file mode 100644 index 0000000..d0db317 --- /dev/null +++ b/src/views/tms/modules/baseTools/ParaThreadingToolModal.vue @@ -0,0 +1,507 @@ +<template> + <j-modal + :title="title" + :width="1200" + :visible="visible" + centered + :confirmLoading="confirmLoading" + :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" + switchFullscreen + @ok="handleOk" + @cancel="handleCancel" + cancelText="鍏抽棴"> + <a-spin :spinning="confirmLoading"> + <a-form-model ref="form" :model="model" :rules="validatorRules" :labelCol="labelCol" :wrapperCol="wrapperCol"> + <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;"> 宸ュ叿鍩虹淇℃伅 + </a-divider> + + <a-row :gutter="24"> + <a-col :span="8"> + <a-form-model-item prop="classifyNum" label="宸ュ叿鍒嗙被缂栫爜"> + <a-input placeholder="璇疯緭鍏ュ伐鍏峰垎绫荤紪鐮�" v-model="model.classifyNum" :disabled="true" /> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="classifyName" label="宸ュ叿鍒嗙被鍚嶇О"> + <a-input placeholder="璇疯緭鍏ュ伐鍏峰垎绫诲悕绉�" v-model="model.classifyName" :disabled="true" /> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="toolCode" label="宸ュ叿缂栫爜"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ伐鍏风紪鐮�'" v-model="model.toolCode" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + </a-row> + + <a-row> + <a-col :span="8"> + <a-form-model-item prop="chineseName" + label="涓枃鍚嶇О"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ヤ腑鏂囧悕绉�'" v-model="model.chineseName" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="foreignLanguageName" + label="澶栨枃鍚嶇О"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ鏂囧悕绉�'" v-model="model.foreignLanguageName" :disabled="disableSubmit" /> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="toolModel" + label="鍨嬪彿/鍥惧彿"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ瀷鍙�/鍥惧彿'" v-model="model.toolModel" :disabled="disableSubmit" /> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span="8"> + <a-form-model-item prop="standardLevel" + label="鏍囨敞绾у埆"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ユ爣鍑嗙骇鍒�'" v-model="model.standardLevel" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="standardCode" label="鏍囧噯鍙�"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ユ爣鍑嗗彿'" v-model="model.standardCode" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="signCode" label="搴忓彿"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ簭鍙�'" v-model="model.signCode" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + </a-row> + + <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;"> 绠$悊鍙傛暟 + </a-divider> + + <a-row :gutter="24"> + <a-col :span="8"> + <a-form-model-item prop="applicationType" + label="宸ュ叿绫诲瀷"> + <j-dict-select-tag dict-code="equipment_category" :placeholder="disableSubmit?'':'璇烽�夋嫨宸ュ叿绫诲瀷'" + v-model="model.applicationType" :disabled="disableSubmit" /> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="provinceCity" label="浠撳簱鐪佷唤鍩庡競"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ヤ粨搴撶渷浠藉煄甯�'" v-model="model.provinceCity" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="positionCode" label="搴撲綅鍙�"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ簱浣嶅彿'" v-model="model.positionCode" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + </a-row> + + <a-row :gutter="24"> + <a-col :span="8"> + <a-form-model-item prop="storageLocation" label="瀛樺偍浣嶇疆"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ瓨鍌ㄤ綅缃�'" v-model="model.storageLocation" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="lowerInventory" label="鏈�浣庡簱瀛�"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ユ渶浣庡簱瀛�'" v-model="model.lowerInventory" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="highestInventory" label="鏈�楂樺簱瀛�"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ユ渶楂樺簱瀛�'" v-model="model.highestInventory" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + </a-row> + + <a-row :gutter="24"> + <a-col :span="8"> + <a-form-model-item prop="auxiliaryUnitFlag" label="鏄惁鏈夎閲忚緟鍗曚綅"> + <a-radio-group v-model="model.auxiliaryUnitFlag" :placeholder="disableSubmit?'':'璇烽�夋嫨鏄惁鏈夎閲忚緟鍗曚綅'" :disabled="disableSubmit"> + <a-radio :value="'1'">鏄�</a-radio> + <a-radio :value="'2'">鍚�</a-radio> + </a-radio-group> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="mainUnit" label="璁¢噺涓诲崟浣�"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ヨ閲忎富鍗曚綅'" v-model="model.mainUnit" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="auxiliaryUnit" label="璁¢噺杈呭崟浣�"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ヨ閲忚緟鍗曚綅'" v-model="model.auxiliaryUnit" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + </a-row> + + <a-row :gutter="24"> + <a-col :span="8"> + <a-form-model-item prop="supplierId" label="鍘傚"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ巶瀹�'" v-model="model.supplierId" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="price" label="鍗曚环"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ崟浠�'" v-model="model.price" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + <!-- <a-col :span="8"> + <a-form-model-item prop="status" label="鐘舵��"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ョ姸鎬�'" v-model="model.status" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> --> + </a-row> + + <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;"> 鍙傛暟淇℃伅 + </a-divider> + + <a-row :gutter="24"> + <a-col :span="6"> + <a-form-model-item label="铻虹汗浠e彿" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="threadCode"> + <a-input v-model="model.threadCode" :placeholder="disableSubmit?'':'璇疯緭鍏ヨ灪绾逛唬鍙�'" :disabled="disableSubmit"></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="铻鸿窛" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pitch"> + <a-input v-model="model.pitch" :placeholder="disableSubmit?'':'璇疯緭鍏ヨ灪璺�'" :disabled="disableSubmit"></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="铻虹汗鏃嬪悜" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="rotationDirection"> + <a-input v-model="model.rotationDirection" :placeholder="disableSubmit?'':'璇疯緭鍏ヨ灪绾规棆鍚�'" :disabled="disableSubmit"></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="铻虹汗鍏樊甯︿唬鍙�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="tolerancezoneLevel"> + <a-input v-model="model.tolerancezoneLevel" :placeholder="disableSubmit?'':'璇疯緭鍏ヨ灪绾瑰叕宸甫浠e彿'" :disabled="disableSubmit"></a-input> + </a-form-model-item> + </a-col> + </a-row> + + <a-row :gutter="24"> + <a-col :span="6"> + <a-form-model-item label="鍒囧墛鍒冮暱" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="edgeLength"> + <a-input v-model="model.edgeLength" :placeholder="disableSubmit?'':'璇疯緭鍏ュ垏鍓婂垉闀�'" :disabled="disableSubmit"></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="鍒�鍏锋�婚暱" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="totalLength"> + <a-input v-model="model.totalLength" :placeholder="disableSubmit?'':'璇疯緭鍏ュ垁鍏锋�婚暱'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="鍒�鍏锋潗鏂�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="toolMaterial"> + <a-input v-model="model.toolMaterial" :placeholder="disableSubmit?'':'璇疯緭鍏ュ垁鍏锋潗鏂�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="闆朵欢鏉愭枡" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="partMaterial"> + <a-input v-model="model.partMaterial" :placeholder="disableSubmit?'':'璇疯緭鍏ラ浂浠舵潗鏂�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span="6"> + <a-form-model-item label="鏄惁娑傚眰" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="paintcoatFlag"> + <a-radio-group v-model="model.paintcoatFlag" :placeholder="disableSubmit?'':'璇烽�夋嫨鏄惁娑傚眰'" :disabled="disableSubmit"> + <a-radio :value="'1'">鏄�</a-radio> + <a-radio :value="'2'">鍚�</a-radio> + </a-radio-group> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="澶栧瀷灏哄" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="externalDimensions"> + <a-input v-model="model.externalDimensions" :placeholder="disableSubmit?'':'璇疯緭鍏ュ鍨嬪昂瀵�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="鏌勯儴瑙勬牸" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="handleSpecifications"> + <a-input v-model="model.handleSpecifications" :placeholder="disableSubmit?'':'璇疯緭鍏ユ焺閮ㄨ鏍�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="闄勫姞鎶�鏈潯浠�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="technicalConditions"> + <a-input v-model="model.technicalConditions" :placeholder="disableSubmit?'':'璇疯緭鍏ラ檮鍔犳妧鏈潯浠�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="闄勫姞鎶�鏈潯浠惰鏄�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="conditionsInfo"> + <a-input v-model="model.conditionsInfo" :placeholder="disableSubmit?'':'璇疯緭鍏ラ檮鍔犳妧鏈潯浠惰鏄�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span="6"> + <a-form-model-item label="鍝佺墝" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="brand"> + <a-input v-model="model.brand" :placeholder="disableSubmit?'':'璇疯緭鍏ュ搧鐗�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="鍒跺紡" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="types"> + <a-input v-model="model.types" :placeholder="disableSubmit?'':'璇疯緭鍏ュ埗寮�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="鍐峰嵈鏂瑰紡" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="coolingMethod"> + <a-input v-model="model.coolingMethod" :placeholder="disableSubmit?'':'璇疯緭鍏ュ喎鍗存柟寮�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="铻虹汗鏍囧噯" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="threadStandard"> + <a-input v-model="model.threadStandard" :placeholder="disableSubmit?'':'璇疯緭鍏ヨ灪绾规爣鍑�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span="6"> + <a-form-model-item label="鎺掑睉妲藉瀷" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="fluteSoltType"> + <a-input v-model="model.fluteSoltType" :placeholder="disableSubmit?'':'璇疯緭鍏ユ帓灞戞Ы鍨�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="铻虹汗绫诲瀷" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="threadType"> + <a-input v-model="model.threadType" :placeholder="disableSubmit?'':'璇疯緭鍏ヨ灪绾圭被鍨�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="瀵煎悜灏哄" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="guidingSize"> + <a-input v-model="model.guidingSize" :placeholder="disableSubmit?'':'璇疯緭鍏ュ鍚戝昂瀵�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="杩炴帴瀛斿緞" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="connectionAperture"> + <a-input v-model="model.connectionAperture" :placeholder="disableSubmit?'':'璇疯緭鍏ヨ繛鎺ュ瓟寰�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span="6"> + <a-form-model-item label="杩炴帴閿Ы" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="connectingKeyway"> + <a-input v-model="model.connectingKeyway" :placeholder="disableSubmit?'':'璇疯緭鍏ヨ繛鎺ラ敭妲�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + </a-row> + <a-row :gutter="24"> + <a-col :span="24"> + <a-form-model-item :labelCol="labelColLong" :wrapperCol="wrapperColLong" prop="remark" label="澶囨敞"> + <a-textarea :placeholder="disableSubmit?'':'璇疯緭鍏ュ娉�'" v-model="model.remark" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + </a-row> + </a-form-model> + </a-spin> + </j-modal> +</template> + +<script> +import { getAction,postAction, httpAction } from '@/api/manage' +import { validateDuplicateValueInDelFlag } from '@/utils/util' +import JSelectProduction from '@comp/jeecgbiz/JSelectProduction.vue' +import { getSystemConfigValue } from '@api/api' + import { duplicateCheck } from '@/api/api'//閲嶅鏍¢獙 + +export default { + name: 'ParaHoleToolsModal', + components: { JSelectProduction }, + data() { + return { + title: '鎿嶄綔', + visible: false, + //鎺у埗缂栬緫 + editable: false, + //璇︽儏鎺у埗 + disableSubmit: false, + model: {}, + labelCol: { + xs: { span: 24 }, + sm: { span: 9 } + }, + wrapperCol: { + xs: { span: 24 }, + sm: { span: 14 } + }, + labelColLong: { + xs: { span: 24 }, + sm: { span: 2 } + }, + wrapperColLong: { + xs: { span: 24 }, + sm: { span: 22 } + }, + confirmLoading: false, + validatorRules: { + toolCode: [ + { required: true, message: '璇疯緭鍏ュ伐鍏风紪鐮�' }, + { validator: this.validateNum } + ], + classifyNum: [ + { required: true, message: '璇疯緭鍏ュ伐鍏峰垎绫荤紪鐮�' } + ], + classifyName: [ + { required: true, message: '璇疯緭鍏ュ伐鍏峰垎绫诲悕绉�' } + ], + toolModel: [ + { required: true, message: '璇疯緭鍏ュ瀷鍙�/鍥惧彿' }, + { validator: this.validateModel } + ], + chineseName: [ + { required: true, message: '璇疯緭鍏ヤ腑鏂囧悕绉�' } + ], + threadCode: [ + { required: true, message: '璇疯緭鍏ヨ灪绾逛唬鍙�' } + ], + pitch: [ + { required: true, message: '璇疯緭鍏ヨ灪璺�' } + ], + rotationDirection: [ + { required: true, message: '璇疯緭鍏ヨ灪绾规棆鍚�' } + ], + tolerancezoneLevel: [ + { required: true, message: '璇疯緭鍏ヨ灪绾瑰叕宸甫浠e彿' } + ], + edgeLength: [ + { required: true, message: '璇疯緭鍏ュ垏鍓婂垉闀�' } + ], + totalLength: [ + { required: true, message: '璇疯緭鍏ュ垁鍏锋�婚暱' } + ], + toolMaterial: [ + { required: true, message: '璇疯緭鍏ュ垁鍏锋潗鏂�' } + ], + paintcoatFlag: [ + { required: true, message: '璇烽�夋嫨鏄惁娑傚眰' } + ], + handleSpecifications: [ + { required: true, message: '璇疯緭鍏ユ焺閮ㄨ鏍�' } + ], + technicalConditions: [ + { required: true, message: '璇疯緭鍏ラ檮浠舵妧鏈潯浠�' } + ] + }, + url: { + add: '/tms/baseTools/add', + edit: '/tms/baseTools/edit', + }, + } + }, + created() { + }, + methods: { + add(nodeSelected) { + this.editable = false; + //鍒濆鍖栭粯璁ゅ�� + this.model = {}; + this.model.classifyId = nodeSelected.key + this.model.classifyNum = nodeSelected.entity.classifyId + this.model.classifyName = nodeSelected.entity.typeName + this.model.paraTypeFlag = nodeSelected.entity.paraTypeFlag + this.visible = true + }, + edit(record) { + this.editable = true; + this.model = Object.assign({}, record) + this.visible = true + }, + close() { + this.$emit('close') + this.visible = false + this.$refs.form.clearValidate() + }, + handleOk() { + const that = this + // 瑙﹀彂琛ㄥ崟楠岃瘉 + this.$refs.form.validate(valid => { + if (valid) { + that.confirmLoading = true + let formData = Object.assign(this.model) + let httpUrl = '' + let method = 'post' + if (!this.model.id) { + httpUrl += this.url.add + } else { + httpUrl += this.url.edit + } + httpAction(httpUrl, formData, method) + .then((res) => { + if (res.success) { + that.$message.success(res.message) + that.$emit('ok') + } else { + that.$message.warning(res.message) + } + }) + .finally(() => { + that.confirmLoading = false + that.close() + }) + } + }) + }, + handleCancel() { + this.close() + }, + //楠岃瘉宸ュ叿缂栫爜鏄惁閲嶅 + validateNum(rule, value, callback) { + var params = { + tableName: 'tms_base_tools', + fieldName: 'tool_code', + fieldVal: value, + dataId: this.model.id + }; + duplicateCheck(params).then((res) => { + if (res.success) { + callback() + } else { + callback("宸ュ叿缂栫爜宸插瓨鍦�!") + } + }) + }, + //楠岃瘉鍨嬪彿/鍥惧彿鏄惁閲嶅 + validateModel(rule, value, callback) { + var params = { + tableName: 'tms_base_tools', + fieldName: 'tool_model', + fieldVal: value, + dataId: this.model.id + }; + duplicateCheck(params).then((res) => { + if (res.success) { + callback() + } else { + callback("鍨嬪彿/鍥惧彿宸插瓨鍦�!") + } + }) + }, + } +} +</script> + +<style lang="less" scoped> +/deep/ .ant-modal-body { + padding: 0 24px; +} + +/deep/ .ant-upload { + width: 185px; + height: 185px; +} + +/deep/ .img { + display: flex; + justify-content: center; + + .ant-upload-picture-card-wrapper { + width: auto; + } +} + +/deep/ .ant-upload-list-picture-card-container { + width: 185px; + height: 185px; +} + +/deep/ .ant-upload-list-item { + width: 185px; + height: 185px; +} +</style> \ No newline at end of file diff --git a/src/views/tms/modules/baseTools/ParaTurningToolsList.vue b/src/views/tms/modules/baseTools/ParaTurningToolsList.vue new file mode 100644 index 0000000..e9f14aa --- /dev/null +++ b/src/views/tms/modules/baseTools/ParaTurningToolsList.vue @@ -0,0 +1,85 @@ +<template> + <div> + <!-- 褰撳墠椤甸潰涓氬姟閮ㄥ垎 --> + <a-card :bordered="false" :title="title" v-show="visable"> + <a-descriptions title="宸ュ叿鍙傛暟璇︽儏"> + <a-descriptions-item label="鍒�澶磋鏍�">{{ this.para == null || this.para.headSpecifications == null ? '' : this.para.headSpecifications }}</a-descriptions-item> + <a-descriptions-item label="閰嶅鍒�鐗囧彿">{{ this.para == null || this.para.matchingNumber == null ? '' : this.para.matchingNumber }}</a-descriptions-item> + <a-descriptions-item label="涓诲亸瑙�">{{ this.para == null || this.para.leadAngle == null ? '' : this.para.leadAngle }}</a-descriptions-item> + <a-descriptions-item label="鍒�鍏锋埅闈㈠昂瀵�">{{ this.para == null || this.para.crossSectionalSize == null ? '' : this.para.crossSectionalSize }}</a-descriptions-item> + <a-descriptions-item label="鍒囧墛鏂瑰悜">{{ this.para == null || this.para.cuttingDirection == null ? '' : this.para.cuttingDirection }}</a-descriptions-item> + <a-descriptions-item label="鍒�鍏锋�婚暱">{{ this.para == null || this.para.totalLength == null ? '' : this.para.totalLength }}</a-descriptions-item> + <a-descriptions-item label="鍒�鍏锋潗鏂�">{{ this.para == null || this.para.toolMaterial == null ? '' : this.para.toolMaterial }}</a-descriptions-item> + <a-descriptions-item label="闆朵欢鏉愭枡">{{ this.para == null || this.para.partMaterial == null ? '' : this.para.partMaterial }}</a-descriptions-item> + <a-descriptions-item label="鏄惁娑傚眰">{{ this.para == null || this.para.paintcoatFlag == null ? '' : this.para.paintcoatFlag }}</a-descriptions-item> + <a-descriptions-item label="鍒�鍏峰瀷寮�">{{ this.para == null || this.para.toolPattern == null ? '' : this.para.toolPattern }}</a-descriptions-item> + <a-descriptions-item label="鍐峰嵈鏂瑰紡">{{ this.para == null || this.para.coolingMethod == null ? '' : this.para.coolingMethod }}</a-descriptions-item> + <a-descriptions-item label="闄勫姞鎶�鏈潯浠�">{{ this.para == null || this.para.technicalConditions == null ? '' : this.para.technicalConditions }}</a-descriptions-item> + <a-descriptions-item label="闄勫姞鎶�鏈潯浠惰鏄�">{{ this.para == null || this.para.conditionsInfo == null ? '' : this.para.conditionsInfo }}</a-descriptions-item> + <a-descriptions-item label="鍝佺墝">{{ this.para == null || this.para.brand == null ? '' : this.para.brand }}</a-descriptions-item> + <a-descriptions-item label="鍒跺紡">{{ this.para == null || this.para.types == null ? '' : this.para.types }}</a-descriptions-item> + <a-descriptions-item label="鍒�鐗囧昂瀵�">{{ this.para == null || this.para.knifeSize == null ? '' : this.para.knifeSize }}</a-descriptions-item> + <a-descriptions-item label="鍒�鏉嗙被鍒�">{{ this.para == null || this.para.holderCategory == null ? '' : this.para.holderCategory }}</a-descriptions-item> + <a-descriptions-item label="鍒�鍏风洿寰�">{{ this.para == null || this.para.toolDiameter == null ? '' : this.para.toolDiameter }}</a-descriptions-item> + <a-descriptions-item label="鎺ュ彛绱у浐褰㈠紡">{{ this.para == null || this.para.fasteningForm == null ? '' : this.para.fasteningForm }}</a-descriptions-item> + <a-descriptions-item label="闀楁潌鐩村緞">{{ this.para == null || this.para.boringBarDiameter == null ? '' : this.para.boringBarDiameter }}</a-descriptions-item> + <a-descriptions-item label="鍒�鏉嗛暱搴�">{{ this.para == null || this.para.bladeLength == null ? '' : this.para.bladeLength }}</a-descriptions-item> + <a-descriptions-item label="鍒�鐗囧舰鐘�">{{ this.para == null || this.para.bladeShape == null ? '' : this.para.bladeShape }}</a-descriptions-item> + <a-descriptions-item label="鍒�鐗囧悗瑙�">{{ this.para == null || this.para.bladePosterior == null ? '' : this.para.bladePosterior }}</a-descriptions-item> + <a-descriptions-item label="鍒�鏉嗘柟鍚�">{{ this.para == null || this.para.barDirection == null ? '' : this.para.barDirection }}</a-descriptions-item> + <a-descriptions-item label="鍒�鏉嗛珮搴�">{{ this.para == null || this.para.bladeHeight == null ? '' : this.para.bladeHeight }}</a-descriptions-item> + <a-descriptions-item label="鍒�鏉嗗搴�">{{ this.para == null || this.para.bladeWide == null ? '' : this.para.bladeWide }}</a-descriptions-item> + <a-descriptions-item label="鍒�鏉嗗昂瀵�">{{ this.para == null || this.para.bladeSize == null ? '' : this.para.bladeSize }}</a-descriptions-item> + <a-descriptions-item label="鍒�澶瑰瀷鍙�">{{ this.para == null || this.para.knifeClipModel == null ? '' : this.para.knifeClipModel }}</a-descriptions-item> + <a-descriptions-item label="鍒�鐗囪澶规柟寮�">{{ this.para == null || this.para.clampingMethod == null ? '' : this.para.clampingMethod }}</a-descriptions-item> + <a-descriptions-item label="鍒�鐗囨Ы瀹�">{{ this.para == null || this.para.slotWidth == null ? '' : this.para.slotWidth }}</a-descriptions-item> + <a-descriptions-item label="鏈�灏忓垏鍏ョ洿寰�">{{ this.para == null || this.para.smallDiameter == null ? '' : this.para.smallDiameter }}</a-descriptions-item> + <a-descriptions-item label="鏈�澶у垏鍏ョ洿寰�">{{ this.para == null || this.para.maxDiameter == null ? '' : this.para.maxDiameter }}</a-descriptions-item> + <a-descriptions-item label="鏈�澶у垏妲芥繁搴�">{{ this.para == null || this.para.maxDepth == null ? '' : this.para.maxDepth }}</a-descriptions-item> + <a-descriptions-item label="鍒�鏉嗗舰寮�">{{ this.para == null || this.para.knifeBarForm == null ? '' : this.para.knifeBarForm }}</a-descriptions-item> + <a-descriptions-item label="鍒�鏉垮帤搴�">{{ this.para == null || this.para.bladeThickness == null ? '' : this.para.bladeThickness }}</a-descriptions-item> + <a-descriptions-item label="鏈�灏忓姞宸ョ洿寰�">{{ this.para == null || this.para.minDiameter == null ? '' : this.para.minDiameter }}</a-descriptions-item> + + </a-descriptions> + + </a-card> + </div> +</template> + +<script> + +import JDictSelectTag from '@/components/dict/JDictSelectTag' +import JEllipsis from '@/components/jeecg/JEllipsis' //寮曞叆杩囬暱瑁佸壀 +import Tooltip from 'ant-design-vue/es/tooltip' +import JDate from '@/components/jeecg/JDate.vue' + +export default { + name: 'ParaHoleToolsList', + components: { + JDictSelectTag, + JEllipsis, + JDate, + Tooltip, + }, + data() { + return { + description: '宸ュ叿淇℃伅椤甸潰', + title: '', + visable:false, + para:{}, + } + }, + created() { + }, + methods: { + + getPara(record){ + this.visable = true + this.para = record + }, + }, + +} +</script> +<style lang="less" scoped> +</style> \ No newline at end of file diff --git a/src/views/tms/modules/baseTools/ParaTurningToolsModal.vue b/src/views/tms/modules/baseTools/ParaTurningToolsModal.vue new file mode 100644 index 0000000..1f46d97 --- /dev/null +++ b/src/views/tms/modules/baseTools/ParaTurningToolsModal.vue @@ -0,0 +1,584 @@ +<template> + <j-modal + :title="title" + :width="1200" + :visible="visible" + centered + :confirmLoading="confirmLoading" + :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" + switchFullscreen + @ok="handleOk" + @cancel="handleCancel" + cancelText="鍏抽棴"> + <a-spin :spinning="confirmLoading"> + <a-form-model ref="form" :model="model" :rules="validatorRules" :labelCol="labelCol" :wrapperCol="wrapperCol"> + <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;"> 宸ュ叿鍩虹淇℃伅 + </a-divider> + + <a-row :gutter="24"> + <a-col :span="8"> + <a-form-model-item prop="classifyNum" label="宸ュ叿鍒嗙被缂栫爜"> + <a-input placeholder="璇疯緭鍏ュ伐鍏峰垎绫荤紪鐮�" v-model="model.classifyNum" :disabled="true" /> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="classifyName" label="宸ュ叿鍒嗙被鍚嶇О"> + <a-input placeholder="璇疯緭鍏ュ伐鍏峰垎绫诲悕绉�" v-model="model.classifyName" :disabled="true" /> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="toolCode" label="宸ュ叿缂栫爜"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ伐鍏风紪鐮�'" v-model="model.toolCode" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + </a-row> + + <a-row> + <a-col :span="8"> + <a-form-model-item prop="chineseName" + label="涓枃鍚嶇О"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ヤ腑鏂囧悕绉�'" v-model="model.chineseName" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="foreignLanguageName" + label="澶栨枃鍚嶇О"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ鏂囧悕绉�'" v-model="model.foreignLanguageName" :disabled="disableSubmit" /> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="toolModel" + label="鍨嬪彿/鍥惧彿"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ瀷鍙�/鍥惧彿'" v-model="model.toolModel" :disabled="disableSubmit" /> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span="8"> + <a-form-model-item prop="standardLevel" + label="鏍囨敞绾у埆"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ユ爣鍑嗙骇鍒�'" v-model="model.standardLevel" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="standardCode" label="鏍囧噯鍙�"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ユ爣鍑嗗彿'" v-model="model.standardCode" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="signCode" label="搴忓彿"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ簭鍙�'" v-model="model.signCode" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + </a-row> + + <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;"> 绠$悊鍙傛暟 + </a-divider> + + <a-row :gutter="24"> + <a-col :span="8"> + <a-form-model-item prop="applicationType" + label="宸ュ叿绫诲瀷"> + <j-dict-select-tag dict-code="equipment_category" :placeholder="disableSubmit?'':'璇烽�夋嫨宸ュ叿绫诲瀷'" + v-model="model.applicationType" :disabled="disableSubmit" /> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="provinceCity" label="浠撳簱鐪佷唤鍩庡競"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ヤ粨搴撶渷浠藉煄甯�'" v-model="model.provinceCity" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="positionCode" label="搴撲綅鍙�"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ簱浣嶅彿'" v-model="model.positionCode" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + </a-row> + + <a-row :gutter="24"> + <a-col :span="8"> + <a-form-model-item prop="storageLocation" label="瀛樺偍浣嶇疆"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ瓨鍌ㄤ綅缃�'" v-model="model.storageLocation" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="lowerInventory" label="鏈�浣庡簱瀛�"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ユ渶浣庡簱瀛�'" v-model="model.lowerInventory" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="highestInventory" label="鏈�楂樺簱瀛�"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ユ渶楂樺簱瀛�'" v-model="model.highestInventory" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + </a-row> + + <a-row :gutter="24"> + <a-col :span="8"> + <a-form-model-item prop="auxiliaryUnitFlag" label="鏄惁鏈夎閲忚緟鍗曚綅"> + <a-radio-group v-model="model.auxiliaryUnitFlag" :placeholder="disableSubmit?'':'璇烽�夋嫨鏄惁鏈夎閲忚緟鍗曚綅'" :disabled="disableSubmit"> + <a-radio :value="'1'">鏄�</a-radio> + <a-radio :value="'2'">鍚�</a-radio> + </a-radio-group> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="mainUnit" label="璁¢噺涓诲崟浣�"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ヨ閲忎富鍗曚綅'" v-model="model.mainUnit" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="auxiliaryUnit" label="璁¢噺杈呭崟浣�"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ヨ閲忚緟鍗曚綅'" v-model="model.auxiliaryUnit" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + </a-row> + + <a-row :gutter="24"> + <a-col :span="8"> + <a-form-model-item prop="supplierId" label="鍘傚"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ巶瀹�'" v-model="model.supplierId" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="price" label="鍗曚环"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ崟浠�'" v-model="model.price" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + <!-- <a-col :span="8"> + <a-form-model-item prop="status" label="鐘舵��"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ョ姸鎬�'" v-model="model.status" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> --> + </a-row> + + <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;"> 鍙傛暟淇℃伅 + </a-divider> + + <a-row :gutter="24"> + <a-col :span="6"> + <a-form-model-item label="鍒�澶磋鏍�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="headSpecifications"> + <a-input v-model="model.headSpecifications" :placeholder="disableSubmit?'':'璇疯緭鍏ュ垁澶磋鏍�'" :disabled="disableSubmit"></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="閰嶅鍒�鐗囧彿" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="matchingNumber"> + <a-input v-model="model.matchingNumber" :placeholder="disableSubmit?'':'璇疯緭鍏ラ厤濂楀垁鐗囧彿'" :disabled="disableSubmit"></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="涓诲亸瑙�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="leadAngle"> + <a-input v-model="model.leadAngle" :placeholder="disableSubmit?'':'璇疯緭鍏ヤ富鍋忚'" :disabled="disableSubmit"></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="鍒�鍏锋埅闈㈠昂瀵�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="crossSectionalSize"> + <a-input v-model="model.crossSectionalSize" :placeholder="disableSubmit?'':'璇疯緭鍏ュ垁鍏锋埅闈㈠昂瀵�'" :disabled="disableSubmit"></a-input> + </a-form-model-item> + </a-col> + </a-row> + + <a-row :gutter="24"> + <a-col :span="6"> + <a-form-model-item label="鍒�鍏锋�婚暱" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="totalLength"> + <a-input v-model="model.totalLength" :placeholder="disableSubmit?'':'璇疯緭鍏ュ垁鍏锋�婚暱'" :disabled="disableSubmit"></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="鍒囧墛鏂瑰悜" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="cuttingDirection"> + <a-input v-model="model.cuttingDirection" :placeholder="disableSubmit?'':'璇疯緭鍏ュ垏鍓婃柟鍚�'" :disabled="disableSubmit"></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="鍒�鍏锋潗鏂�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="toolMaterial"> + <a-input v-model="model.toolMaterial" :placeholder="disableSubmit?'':'璇疯緭鍏ュ垁鍏锋潗鏂�'" :disabled="disableSubmit"></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="闆朵欢鏉愭枡" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="partMaterial"> + <a-input v-model="model.partMaterial" :placeholder="disableSubmit?'':'璇疯緭鍏ラ浂浠舵潗鏂�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + + </a-row> + <a-row> + <a-col :span="6"> + <a-form-model-item label="鏄惁娑傚眰" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="paintcoatFlag"> + <a-radio-group v-model="model.paintcoatFlag" :placeholder="disableSubmit?'':'璇烽�夋嫨鏄惁娑傚眰'" :disabled="disableSubmit"> + <a-radio :value="'1'">鏄�</a-radio> + <a-radio :value="'2'">鍚�</a-radio> + </a-radio-group> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="鍒�鍏峰瀷寮�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="toolPattern"> + <a-input v-model="model.toolPattern" :placeholder="disableSubmit?'':'璇疯緭鍏ュ垁鍏峰瀷寮�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="闄勫姞鎶�鏈潯浠�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="technicalConditions"> + <a-input v-model="model.technicalConditions" :placeholder="disableSubmit?'':'璇疯緭鍏ラ檮鍔犳妧鏈潯浠�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="闄勫姞鎶�鏈潯浠惰鏄�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="conditionsInfo"> + <a-input v-model="model.conditionsInfo" :placeholder="disableSubmit?'':'璇疯緭鍏ラ檮鍔犳妧鏈潯浠惰鏄�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span="6"> + <a-form-model-item label="鍝佺墝" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="brand"> + <a-input v-model="model.brand" :placeholder="disableSubmit?'':'璇疯緭鍏ュ搧鐗�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="鍒跺紡" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="types"> + <a-input v-model="model.types" :placeholder="disableSubmit?'':'璇疯緭鍏ュ埗寮�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="鍒�鐗囧昂瀵�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="knifeSize"> + <a-input v-model="model.knifeSize" :placeholder="disableSubmit?'':'璇疯緭鍏ュ垁鐗囧昂瀵�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="鍐峰嵈鏂瑰紡" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="coolingMethod"> + <a-input v-model="model.coolingMethod" :placeholder="disableSubmit?'':'璇疯緭鍏ュ喎鍗存柟寮�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span="6"> + <a-form-model-item label="鍒�鏉嗙被鍒�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="holderCategory"> + <a-input v-model="model.holderCategory" :placeholder="disableSubmit?'':'璇疯緭鍏ュ垁鏉嗙被鍒�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="鍒�鍏风洿寰�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="toolDiameter"> + <a-input v-model="model.toolDiameter" :placeholder="disableSubmit?'':'璇疯緭鍏ュ垁鍏风洿寰�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="鎺ュ彛绱у浐褰㈠紡" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="fasteningForm"> + <a-input v-model="model.fasteningForm" :placeholder="disableSubmit?'':'璇疯緭鍏ユ帴鍙g揣鍥哄舰寮�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="闀楁潌鐩村緞" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="boringBarDiameter"> + <a-input v-model="model.boringBarDiameter" :placeholder="disableSubmit?'':'璇疯緭鍏ラ晽鏉嗙洿寰�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span="6"> + <a-form-model-item label="鍒�鏉嗛暱搴�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bladeLength"> + <a-input v-model="model.bladeLength" :placeholder="disableSubmit?'':'璇疯緭鍏ュ垁鏉嗛暱搴�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="鍒�鐗囧舰鐘�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bladeShape"> + <a-input v-model="model.bladeShape" :placeholder="disableSubmit?'':'璇疯緭鍏ュ垁鐗囧舰鐘�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="鍒�鐗囧悗瑙�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bladePosterior"> + <a-input v-model="model.bladePosterior" :placeholder="disableSubmit?'':'璇疯緭鍏ュ垁鐗囧悗瑙�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="鍒�鏉嗘柟鍚�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="barDirection"> + <a-input v-model="model.barDirection" :placeholder="disableSubmit?'':'璇疯緭鍏ュ垁鏉嗘柟鍚�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span="6"> + <a-form-model-item label="鍒�鏉嗛珮搴�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bladeHeight"> + <a-input v-model="model.bladeHeight" :placeholder="disableSubmit?'':'璇疯緭鍏ュ垁鏉嗛珮搴�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="鍒�鏉嗗搴�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bladeWide"> + <a-input v-model="model.bladeWide" :placeholder="disableSubmit?'':'璇疯緭鍏ュ垁鏉嗗搴�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="鍒�鏉嗗昂瀵�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bladeSize"> + <a-input v-model="model.bladeSize" :placeholder="disableSubmit?'':'璇疯緭鍏ュ垁鏉嗗昂瀵�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="鍒�澶瑰瀷鍙�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="knifeClipModel"> + <a-input v-model="model.knifeClipModel" :placeholder="disableSubmit?'':'璇疯緭鍏ュ垁澶瑰瀷鍙�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span="6"> + <a-form-model-item label="鍒�鐗囪澶规柟寮�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="clampingMethod"> + <a-input v-model="model.clampingMethod" :placeholder="disableSubmit?'':'璇疯緭鍏ュ垁鐗囪澶规柟寮�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="鍒�鐗囨Ы瀹�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="slotWidth"> + <a-input v-model="model.slotWidth" :placeholder="disableSubmit?'':'璇疯緭鍏ュ垁鐗囨Ы瀹�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="鏈�灏忓垏鍏ョ洿寰�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="smallDiameter"> + <a-input v-model="model.smallDiameter" :placeholder="disableSubmit?'':'璇疯緭鍏ユ渶灏忓垏鍏ョ洿寰�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="鏈�澶у垏鍏ョ洿寰�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="maxDiameter"> + <a-input v-model="model.maxDiameter" :placeholder="disableSubmit?'':'璇疯緭鍏ユ渶澶у垏鍏ョ洿寰�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span="6"> + <a-form-model-item label="鏈�澶у垏妲芥繁搴�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="maxDepth"> + <a-input v-model="model.maxDepth" :placeholder="disableSubmit?'':'璇疯緭鍏ユ渶澶у垏妲芥繁搴�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="鍒�鏉嗗舰寮�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="knifeBarForm"> + <a-input v-model="model.knifeBarForm" :placeholder="disableSubmit?'':'璇疯緭鍏ュ垁鏉嗗舰寮�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="鍒�鏉垮帤搴�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bladeThickness"> + <a-input v-model="model.bladeThickness" :placeholder="disableSubmit?'':'璇疯緭鍏ュ垁鏉垮帤搴�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="鏈�灏忓姞宸ョ洿寰�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="minDiameter"> + <a-input v-model="model.minDiameter" :placeholder="disableSubmit?'':'璇疯緭鍏ユ渶灏忓姞宸ョ洿寰�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + </a-row> + <a-row :gutter="24"> + <a-col :span="24"> + <a-form-model-item :labelCol="labelColLong" :wrapperCol="wrapperColLong" prop="remark" label="澶囨敞"> + <a-textarea :placeholder="disableSubmit?'':'璇疯緭鍏ュ娉�'" v-model="model.remark" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + </a-row> + </a-form-model> + </a-spin> + </j-modal> +</template> + +<script> +import { getAction,postAction, httpAction } from '@/api/manage' +import { validateDuplicateValueInDelFlag } from '@/utils/util' +import JSelectProduction from '@comp/jeecgbiz/JSelectProduction.vue' +import { getSystemConfigValue } from '@api/api' + import { duplicateCheck } from '@/api/api'//閲嶅鏍¢獙 + +export default { + name: 'ParaHoleToolsModal', + components: { JSelectProduction }, + data() { + return { + title: '鎿嶄綔', + visible: false, + //鎺у埗缂栬緫 + editable: false, + //璇︽儏鎺у埗 + disableSubmit: false, + model: {}, + labelCol: { + xs: { span: 24 }, + sm: { span: 9 } + }, + wrapperCol: { + xs: { span: 24 }, + sm: { span: 14 } + }, + labelColLong: { + xs: { span: 24 }, + sm: { span: 2 } + }, + wrapperColLong: { + xs: { span: 24 }, + sm: { span: 22 } + }, + confirmLoading: false, + validatorRules: { + toolCode: [ + { required: true, message: '璇疯緭鍏ュ伐鍏风紪鐮�' }, + { validator: this.validateNum } + ], + classifyNum: [ + { required: true, message: '璇疯緭鍏ュ伐鍏峰垎绫荤紪鐮�' } + ], + classifyName: [ + { required: true, message: '璇疯緭鍏ュ伐鍏峰垎绫诲悕绉�' } + ], + toolModel: [ + { required: true, message: '璇疯緭鍏ュ瀷鍙�/鍥惧彿' }, + { validator: this.validateModel } + ], + chineseName: [ + { required: true, message: '璇疯緭鍏ヤ腑鏂囧悕绉�' } + ], + headSpecifications: [ + { required: true, message: '璇疯緭鍏ュ垁澶磋鏍�' } + ], + matchingNumber: [ + { required: true, message: '璇疯緭鍏ラ厤濂楀垁鐗囧彿' } + ], + leadAngle: [ + { required: true, message: '璇疯緭鍏ヤ富鍋忚' } + ], + crossSectionalSize: [ + { required: true, message: '璇疯緭鍏ュ垁鍏锋埅闈㈠昂瀵�' } + ], + totalLength: [ + { required: true, message: '璇疯緭鍏ュ垁鍏锋�婚暱' } + ], + cuttingDirection: [ + { required: true, message: '璇疯緭鍏ュ垏鍓婃柟鍚�' } + ], + toolMaterial: [ + { required: true, message: '璇疯緭鍏ュ垁鍏锋潗鏂�' } + ], + paintcoatFlag: [ + { required: true, message: '璇烽�夋嫨鏄惁娑傚眰' } + ], + toolPattern: [ + { required: true, message: '璇疯緭鍏ュ垁鍏峰舰寮�' } + ], + technicalConditions: [ + { required: true, message: '璇疯緭鍏ラ檮鍔犳妧鏈潯浠�' } + ] + }, + url: { + add: '/tms/baseTools/add', + edit: '/tms/baseTools/edit', + }, + } + }, + created() { + }, + methods: { + add(nodeSelected) { + this.editable = false; + //鍒濆鍖栭粯璁ゅ�� + this.model = {}; + this.model.classifyId = nodeSelected.key + this.model.classifyNum = nodeSelected.entity.classifyId + this.model.classifyName = nodeSelected.entity.typeName + this.model.paraTypeFlag = nodeSelected.entity.paraTypeFlag + this.visible = true + }, + edit(record) { + this.editable = true; + this.model = Object.assign({}, record) + this.visible = true + }, + close() { + this.$emit('close') + this.visible = false + this.$refs.form.clearValidate() + }, + handleOk() { + const that = this + // 瑙﹀彂琛ㄥ崟楠岃瘉 + this.$refs.form.validate(valid => { + if (valid) { + that.confirmLoading = true + let formData = Object.assign(this.model) + let httpUrl = '' + let method = 'post' + if (!this.model.id) { + httpUrl += this.url.add + } else { + httpUrl += this.url.edit + } + httpAction(httpUrl, formData, method) + .then((res) => { + if (res.success) { + that.$message.success(res.message) + that.$emit('ok') + } else { + that.$message.warning(res.message) + } + }) + .finally(() => { + that.confirmLoading = false + that.close() + }) + } + }) + }, + handleCancel() { + this.close() + }, + //楠岃瘉宸ュ叿缂栫爜鏄惁閲嶅 + validateNum(rule, value, callback) { + var params = { + tableName: 'tms_base_tools', + fieldName: 'tool_code', + fieldVal: value, + dataId: this.model.id + }; + duplicateCheck(params).then((res) => { + if (res.success) { + callback() + } else { + callback("宸ュ叿缂栫爜宸插瓨鍦�!") + } + }) + }, + //楠岃瘉鍨嬪彿/鍥惧彿鏄惁閲嶅 + validateModel(rule, value, callback) { + var params = { + tableName: 'tms_base_tools', + fieldName: 'tool_model', + fieldVal: value, + dataId: this.model.id + }; + duplicateCheck(params).then((res) => { + if (res.success) { + callback() + } else { + callback("鍨嬪彿/鍥惧彿宸插瓨鍦�!") + } + }) + }, + } +} +</script> + +<style lang="less" scoped> +/deep/ .ant-modal-body { + padding: 0 24px; +} + +/deep/ .ant-upload { + width: 185px; + height: 185px; +} + +/deep/ .img { + display: flex; + justify-content: center; + + .ant-upload-picture-card-wrapper { + width: auto; + } +} + +/deep/ .ant-upload-list-picture-card-container { + width: 185px; + height: 185px; +} + +/deep/ .ant-upload-list-item { + width: 185px; + height: 185px; +} +</style> \ No newline at end of file diff --git a/src/views/tms/modules/baseTools/ToolsConfigPropertyList.vue b/src/views/tms/modules/baseTools/ToolsConfigPropertyList.vue new file mode 100644 index 0000000..85df2cf --- /dev/null +++ b/src/views/tms/modules/baseTools/ToolsConfigPropertyList.vue @@ -0,0 +1,60 @@ +<template> + <div> + <!-- 褰撳墠椤甸潰涓氬姟閮ㄥ垎 --> + <a-card :bordered="false" :title="title" v-show="visable"> + <a-descriptions title="宸ュ叿绠$悊鍙傛暟璇︽儏"> + <a-descriptions-item label="宸ュ叿绫诲瀷">{{ this.para == null || this.para.applicationType == null ? '' : this.para.applicationType }}</a-descriptions-item> + <a-descriptions-item label="鏍囧噯绾у埆">{{ this.para == null || this.para.standardLevel == null ? '' : this.para.standardLevel }}</a-descriptions-item> + <a-descriptions-item label="鏍囧噯鍙�">{{ this.para == null || this.para.standardCode == null ? '' : this.para.standardCode }}</a-descriptions-item> + <a-descriptions-item label="鍘傚">{{ this.para == null || this.para.supplierId == null ? '' : this.para.supplierId }}</a-descriptions-item> + <a-descriptions-item label="浠撳簱鐪佷唤鍩庡競">{{ this.para == null || this.para.provinceCity == null ? '' : this.para.provinceCity }}</a-descriptions-item> + <a-descriptions-item label="搴撲綅鍙�">{{ this.para == null || this.para.positionCode == null ? '' : this.para.positionCode }}</a-descriptions-item> + <a-descriptions-item label="瀛樺偍浣嶇疆">{{ this.para == null || this.para.storageLocation == null ? '' : this.para.storageLocation }}</a-descriptions-item> + <a-descriptions-item label="璁¢噺涓诲崟浣�">{{ this.para == null || this.para.mainUnit == null ? '' : this.para.mainUnit }}</a-descriptions-item> + <a-descriptions-item label="璁¢噺杈呭崟浣�">{{ this.para == null || this.para.auxiliaryUnit == null ? '' : this.para.auxiliaryUnit }}</a-descriptions-item> + <a-descriptions-item label="鍗曚环">{{ this.para == null || this.para.price == null ? '' : this.para.price }}</a-descriptions-item> + <a-descriptions-item label="鏈�浣庡簱瀛�">{{ this.para == null || this.para.lowerInventory == null ? '' : this.para.lowerInventory }}</a-descriptions-item> + <a-descriptions-item label="鏈�楂樺簱瀛�">{{ this.para == null || this.para.highestInventory == null ? '' : this.para.highestInventory }}</a-descriptions-item> + + </a-descriptions> + + </a-card> + </div> +</template> + +<script> + +import JDictSelectTag from '@/components/dict/JDictSelectTag' +import JEllipsis from '@/components/jeecg/JEllipsis' //寮曞叆杩囬暱瑁佸壀 +import Tooltip from 'ant-design-vue/es/tooltip' +import JDate from '@/components/jeecg/JDate.vue' + +export default { + name: 'ToolsConfigPropertyList', + components: { + JDictSelectTag, + JEllipsis, + JDate, + Tooltip, + }, + data() { + return { + description: '宸ュ叿淇℃伅绠$悊鍙傛暟椤甸潰', + title: '', + visable:false, + para:{}, + } + }, + created() { + }, + methods: { + + getPara(record){ + this.visable = true + this.para = record + }, + }, +} +</script> +<style lang="less" scoped> +</style> \ No newline at end of file diff --git a/src/views/tms/modules/baseTools/ToolsConfigPropertyModal.vue b/src/views/tms/modules/baseTools/ToolsConfigPropertyModal.vue new file mode 100644 index 0000000..6518005 --- /dev/null +++ b/src/views/tms/modules/baseTools/ToolsConfigPropertyModal.vue @@ -0,0 +1,342 @@ +<template> + <j-modal + :title="title" + :width="1200" + :visible="visible" + centered + :confirmLoading="confirmLoading" + :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" + switchFullscreen + @ok="handleOk" + @cancel="handleCancel" + cancelText="鍏抽棴"> + <a-spin :spinning="confirmLoading"> + <a-form-model ref="form" :model="model" :rules="validatorRules" :labelCol="labelCol" :wrapperCol="wrapperCol"> + <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;"> 宸ュ叿鍩虹淇℃伅 + </a-divider> + + <a-row :gutter="24"> + <a-col :span="8"> + <a-form-model-item prop="classifyNum" label="宸ュ叿鍒嗙被缂栫爜"> + <a-input placeholder="璇疯緭鍏ュ伐鍏峰垎绫荤紪鐮�" v-model="model.classifyNum" :disabled="true" /> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="classifyName" label="宸ュ叿鍒嗙被鍚嶇О"> + <a-input placeholder="璇疯緭鍏ュ伐鍏峰垎绫诲悕绉�" v-model="model.classifyName" :disabled="true" /> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="toolCode" label="宸ュ叿缂栫爜"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ伐鍏风紪鐮�'" v-model="model.toolCode" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + </a-row> + + <a-row> + <a-col :span="8"> + <a-form-model-item prop="chineseName" + label="涓枃鍚嶇О"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ヤ腑鏂囧悕绉�'" v-model="model.chineseName" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="foreignLanguageName" + label="澶栨枃鍚嶇О"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ鏂囧悕绉�'" v-model="model.foreignLanguageName" :disabled="disableSubmit" /> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="toolModel" + label="鍨嬪彿/鍥惧彿"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ瀷鍙�/鍥惧彿'" v-model="model.toolModel" :disabled="disableSubmit" /> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span="8"> + <a-form-model-item prop="standardLevel" + label="鏍囨敞绾у埆"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ユ爣鍑嗙骇鍒�'" v-model="model.standardLevel" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="standardCode" label="鏍囧噯鍙�"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ユ爣鍑嗗彿'" v-model="model.standardCode" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="signCode" label="搴忓彿"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ簭鍙�'" v-model="model.signCode" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + </a-row> + + <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;"> 绠$悊鍙傛暟 + </a-divider> + + <a-row :gutter="24"> + <a-col :span="8"> + <a-form-model-item prop="applicationType" + label="宸ュ叿绫诲瀷"> + <j-dict-select-tag dict-code="equipment_category" :placeholder="disableSubmit?'':'璇烽�夋嫨宸ュ叿绫诲瀷'" + v-model="model.applicationType" :disabled="disableSubmit" /> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="provinceCity" label="浠撳簱鐪佷唤鍩庡競"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ヤ粨搴撶渷浠藉煄甯�'" v-model="model.provinceCity" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="positionCode" label="搴撲綅鍙�"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ簱浣嶅彿'" v-model="model.positionCode" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + </a-row> + + <a-row :gutter="24"> + <a-col :span="8"> + <a-form-model-item prop="storageLocation" label="瀛樺偍浣嶇疆"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ瓨鍌ㄤ綅缃�'" v-model="model.storageLocation" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="lowerInventory" label="鏈�浣庡簱瀛�"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ユ渶浣庡簱瀛�'" v-model="model.lowerInventory" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="highestInventory" label="鏈�楂樺簱瀛�"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ユ渶楂樺簱瀛�'" v-model="model.highestInventory" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + </a-row> + + <a-row :gutter="24"> + <a-col :span="8"> + <a-form-model-item prop="auxiliaryUnitFlag" label="鏄惁鏈夎閲忚緟鍗曚綅"> + <a-radio-group v-model="model.auxiliaryUnitFlag" :placeholder="disableSubmit?'':'璇烽�夋嫨鏄惁鏈夎閲忚緟鍗曚綅'" :disabled="disableSubmit"> + <a-radio :value="'1'">鏄�</a-radio> + <a-radio :value="'2'">鍚�</a-radio> + </a-radio-group> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="mainUnit" label="璁¢噺涓诲崟浣�"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ヨ閲忎富鍗曚綅'" v-model="model.mainUnit" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="auxiliaryUnit" label="璁¢噺杈呭崟浣�"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ヨ閲忚緟鍗曚綅'" v-model="model.auxiliaryUnit" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + </a-row> + + <a-row :gutter="24"> + <a-col :span="8"> + <a-form-model-item prop="supplierId" label="鍘傚"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ巶瀹�'" v-model="model.supplierId" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item prop="price" label="鍗曚环"> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ崟浠�'" v-model="model.price" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + </a-row> + <a-row :gutter="24"> + <a-col :span="24"> + <a-form-model-item :labelCol="labelColLong" :wrapperCol="wrapperColLong" prop="remark" label="澶囨敞"> + <a-textarea :placeholder="disableSubmit?'':'璇疯緭鍏ュ娉�'" v-model="model.remark" :disabled="disableSubmit"/> + </a-form-model-item> + </a-col> + </a-row> + </a-form-model> + </a-spin> + </j-modal> +</template> + +<script> +import { getAction,postAction, httpAction } from '@/api/manage' +import { validateDuplicateValueInDelFlag } from '@/utils/util' +import JSelectProduction from '@comp/jeecgbiz/JSelectProduction.vue' +import { getSystemConfigValue } from '@api/api' + import { duplicateCheck } from '@/api/api'//閲嶅鏍¢獙 + +export default { + name: 'ParaHoleToolsModal', + components: { JSelectProduction }, + data() { + return { + title: '鎿嶄綔', + visible: false, + //鎺у埗缂栬緫 + editable: false, + //璇︽儏鎺у埗 + disableSubmit: false, + model: {}, + labelCol: { + xs: { span: 24 }, + sm: { span: 9 } + }, + wrapperCol: { + xs: { span: 24 }, + sm: { span: 14 } + }, + labelColLong: { + xs: { span: 24 }, + sm: { span: 2 } + }, + wrapperColLong: { + xs: { span: 24 }, + sm: { span: 22 } + }, + confirmLoading: false, + validatorRules: { + toolCode: [ + { required: true, message: '璇疯緭鍏ュ伐鍏风紪鐮�' }, + { validator: this.validateNum } + ], + classifyNum: [ + { required: true, message: '璇疯緭鍏ュ伐鍏峰垎绫荤紪鐮�' } + ], + classifyName: [ + { required: true, message: '璇疯緭鍏ュ伐鍏峰垎绫诲悕绉�' } + ], + toolModel: [ + { required: true, message: '璇疯緭鍏ュ瀷鍙�/鍥惧彿' }, + { validator: this.validateModel } + ], + chineseName: [ + { required: true, message: '璇疯緭鍏ヤ腑鏂囧悕绉�' } + ] + }, + url: { + add: '/tms/baseTools/add', + edit: '/tms/baseTools/edit', + }, + } + }, + created() { + }, + methods: { + add(nodeSelected) { + this.editable = false; + //鍒濆鍖栭粯璁ゅ�� + this.model = {}; + this.model.classifyId = nodeSelected.key + this.model.classifyNum = nodeSelected.entity.classifyId + this.model.classifyName = nodeSelected.entity.typeName + this.model.paraTypeFlag = nodeSelected.entity.paraTypeFlag + this.visible = true + }, + edit(record) { + this.editable = true; + this.model = Object.assign({}, record) + this.visible = true + }, + close() { + this.$emit('close') + this.visible = false + this.$refs.form.clearValidate() + }, + handleOk() { + const that = this + // 瑙﹀彂琛ㄥ崟楠岃瘉 + this.$refs.form.validate(valid => { + if (valid) { + that.confirmLoading = true + let formData = Object.assign(this.model) + let httpUrl = '' + let method = 'post' + if (!this.model.id) { + httpUrl += this.url.add + } else { + httpUrl += this.url.edit + } + httpAction(httpUrl, formData, method) + .then((res) => { + if (res.success) { + that.$message.success(res.message) + that.$emit('ok') + } else { + that.$message.warning(res.message) + } + }) + .finally(() => { + that.confirmLoading = false + that.close() + }) + } + }) + }, + handleCancel() { + this.close() + }, + //楠岃瘉宸ュ叿缂栫爜鏄惁閲嶅 + validateNum(rule, value, callback) { + var params = { + tableName: 'tms_base_tools', + fieldName: 'tool_code', + fieldVal: value, + dataId: this.model.id + }; + duplicateCheck(params).then((res) => { + if (res.success) { + callback() + } else { + callback("宸ュ叿缂栫爜宸插瓨鍦�!") + } + }) + }, + //楠岃瘉鍨嬪彿/鍥惧彿鏄惁閲嶅 + validateModel(rule, value, callback) { + var params = { + tableName: 'tms_base_tools', + fieldName: 'tool_model', + fieldVal: value, + dataId: this.model.id + }; + duplicateCheck(params).then((res) => { + if (res.success) { + callback() + } else { + callback("鍨嬪彿/鍥惧彿宸插瓨鍦�!") + } + }) + }, + } +} +</script> + +<style lang="less" scoped> +/deep/ .ant-modal-body { + padding: 0 24px; +} + +/deep/ .ant-upload { + width: 185px; + height: 185px; +} + +/deep/ .img { + display: flex; + justify-content: center; + + .ant-upload-picture-card-wrapper { + width: auto; + } +} + +/deep/ .ant-upload-list-picture-card-container { + width: 185px; + height: 185px; +} + +/deep/ .ant-upload-list-item { + width: 185px; + height: 185px; +} +</style> \ No newline at end of file diff --git a/src/views/tms/modules/toolsClassify/ToolsClassifyForm.vue b/src/views/tms/modules/toolsClassify/ToolsClassifyForm.vue new file mode 100644 index 0000000..0babff4 --- /dev/null +++ b/src/views/tms/modules/toolsClassify/ToolsClassifyForm.vue @@ -0,0 +1,240 @@ +<template> + <a-spin :spinning="confirmLoading"> + <j-form-container :disabled="formDisabled"> + <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail"> + <a-row> + <a-col :span="12"> + <a-form-model-item label="涓婄骇鍒嗙被缂栧彿" :labelCol="labelCol" :wrapperCol="wrapperCol"> + <a-input :disabled="true" v-model="model.parentNum" placeholder="璇疯緭鍏ヤ笂绾у垎绫荤紪鍙�" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item label="涓婄骇鍒嗙被鍚嶇О" :labelCol="labelCol" :wrapperCol="wrapperCol"> + <a-input :disabled="true" v-model="model.parentName" placeholder="璇疯緭鍏ヤ笂绾у垎绫诲悕绉�" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item label="鍒嗙被缂栫爜" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="classifyId"> + <a-input v-model="model.classifyId" placeholder="璇疯緭鍏ュ垎绫荤紪鐮�" :disabled="classifyIdShow"></a-input> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item label="鍒嗙被鍚嶇О" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="typeName"> + <a-input v-model="model.typeName" placeholder="璇疯緭鍏ュ垎绫诲悕绉�" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="12" v-show="leafFlagShow"> + <a-form-model-item label="鏄惁涓哄彾瀛愯妭鐐�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="leafFlag"> + <a-radio-group v-model="model.leafFlag" placeholder="璇烽�夋嫨鏄惁鍙跺瓙鑺傜偣" @change="leafFlagChange"> + <a-radio :value="'1'">鏄�</a-radio> + <a-radio :value="'2'">鍚�</a-radio> + </a-radio-group> + </a-form-model-item> + </a-col> + <a-col :span="12" v-show="encodingTypeShow"> + <a-form-model-item label="缂栫爜鏂瑰紡" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="encodingType"> + <a-radio-group v-model="model.encodingType" placeholder="璇烽�夋嫨缂栫爜鏂瑰紡" @change="encodingTypeChange"> + <a-radio :value="'1'">绯荤粺鐢熸垚</a-radio> + <a-radio :value="'2'">鎸夌紪鐮佺敓鎴�</a-radio> + <a-radio :value="'3'">鎵嬪姩缂栫爜</a-radio> + </a-radio-group> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item label="鏄剧ず搴忓彿" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="seq"> + <a-input-number v-model="model.seq" placeholder="璇疯緭鍏ユ樉绀哄簭鍙�" style="width:100%" :min=0 ></a-input-number> + </a-form-model-item> + </a-col> + <a-col :span="12" v-show="paraTypeFlagShow"> + <a-form-model-item label="鍙傛暟妯℃澘" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="paraTypeFlag"> + <j-dict-select-tag + type="list" + v-model="model.paraTypeFlag" + :triggerChange="true" + dictCode="tool_para_type" + placeholder="璇烽�夋嫨鍙傛暟妯℃澘" + @change="handleTypeChange" + /> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="澶囨敞" :labelCol="{span:3}" :wrapperCol="{span:20}" prop="remark"> + <a-textarea v-model="model.remark" placeholder="璇疯緭鍏ュ娉�" ></a-textarea> + </a-form-model-item> + </a-col> + </a-row> + </a-form-model> + </j-form-container> + </a-spin> +</template> + +<script> + + import { httpAction, getAction } from '@/api/manage' + import { validateDuplicateValue } from '@/utils/util' + import JDictSelectTag from '@/components/dict/JDictSelectTag' + import { duplicateCheck } from '@/api/api'//閲嶅鏍¢獙 + + export default { + name: 'ToolsClassifyForm', + components: { + JDictSelectTag, + }, + props: { + //琛ㄥ崟绂佺敤 + disabled: { + type: Boolean, + default: false, + required: false + } + }, + data () { + return { + paraTypeFlagShow:false, + model:{ + }, + labelCol: { + xs: { span: 24 }, + sm: { span: 6 }, + }, + wrapperCol: { + xs: { span: 24 }, + sm: { span: 16 }, + }, + confirmLoading: false, + toolsId:'', + classifyIdShow:true, + encodingTypeShow:true, + leafFlagShow:true, + validatorRules: { + classifyId: [ + { required: true, message: '璇疯緭鍏ュ伐鍏峰垎绫荤紪鍙�!'}, + { validator: this.validateNum }, + ], + typeName: [ + { required: true, message: '璇疯緭鍏ュ伐鍏峰垎绫诲悕绉�!'}, + ], + leafFlag: [ + { required: true, message: '璇烽�夋嫨鏄惁涓哄彾瀛愯妭鐐�!'}, + ], + paraTypeFlag: [ + { required: true, message: '璇烽�夋嫨鍙傛暟妯℃澘!' }, + ], + encodingType: [ + { required: true, message: '璇烽�夋嫨缂栫爜鏂瑰紡!' }, + ], + }, + url: { + add: "/tms/toolsClassify/add", + edit: "/tms/toolsClassify/edit", + queryById: "/tms/toolsClassify/queryById" + }, + } + }, + computed: { + formDisabled(){ + return this.disabled + }, + }, + created () { + //澶囦唤model鍘熷鍊� + this.modelDefault = JSON.parse(JSON.stringify(this.model)); + }, + methods: { + add (nodeSelected) { + this.modelDefault.parentId = nodeSelected.key + this.modelDefault.parentNum = nodeSelected.entity.classifyId + this.modelDefault.parentName = nodeSelected.entity.typeName + this.modelDefault.leafFlag = "2" + this.modelDefault.encodingType = "1" + this.edit(this.modelDefault); + this.encodingTypeShow = true + this.leafFlagShow = true + }, + edit (record) { + this.toolsId = record.id + this.model = Object.assign({}, record); + this.visible = true; + this.encodingTypeShow = false + this.classifyIdShow = true + this.leafFlagShow = false + if(record.leafFlag == "1"){ + this.paraTypeFlagShow = true + } + }, + submitForm () { + const that = this; + // 瑙﹀彂琛ㄥ崟楠岃瘉 + this.$refs.form.validate(valid => { + if (valid) { + that.confirmLoading = true; + let httpurl = ''; + let method = ''; + if(!this.model.id){ + httpurl+=this.url.add; + method = 'post'; + }else{ + httpurl+=this.url.edit; + method = 'put'; + } + httpAction(httpurl,this.model,method).then((res)=>{ + if(res.success){ + that.$message.success(res.message); + that.$emit('ok'); + }else{ + that.$message.warning(res.message); + } + }).finally(() => { + that.confirmLoading = false; + }) + } + + }) + }, + //鏄惁鍙跺瓙鑺傜偣鍙樺寲鏃讹紝鎺у埗鍙傛暟妯℃澘鏄剧ず闅愯棌 + leafFlagChange(e){ + this.modelDefault.paraTypeFlag = "" + if(e.target.value == 1){ + this.paraTypeFlagShow = true + this.validatorRules.paraTypeFlag[0].required = true + }else{ + this.paraTypeFlagShow = false + this.validatorRules.paraTypeFlag[0].required = false + } + }, + //缂栫爜鏂瑰紡鍙樺寲鏃讹紝鎺у埗鍒嗙被缂栫爜鐢熸垚鏂瑰紡 + encodingTypeChange(e){ + this.classifyId = "" + if(e.target.value == 1){ + this.classifyIdShow = true + this.validatorRules.classifyId[0].required = false + }else if(e.target.value == 2){ + this.classifyIdShow = false + this.validatorRules.classifyId[0].required = true + }else if(e.target.value == 3){ + this.classifyIdShow = false + this.validatorRules.classifyId[0].required = true + } + }, + handleTypeChange(value) { + + }, + //楠岃瘉鍒嗙被缂栫爜鏄惁閲嶅 + validateNum(rule, value, callback) { + var params = { + tableName: 'tms_tools_classify', + fieldName: 'classify_id', + fieldVal: value, + dataId: this.toolsId + }; + duplicateCheck(params).then((res) => { + if (res.success) { + callback() + } else { + callback("鍒嗙被缂栫爜宸插瓨鍦�!") + } + }) + }, + } + } +</script> \ No newline at end of file diff --git a/src/views/tms/modules/toolsClassify/ToolsClassifyListLeft.vue b/src/views/tms/modules/toolsClassify/ToolsClassifyListLeft.vue new file mode 100644 index 0000000..0f1ba35 --- /dev/null +++ b/src/views/tms/modules/toolsClassify/ToolsClassifyListLeft.vue @@ -0,0 +1,322 @@ +<template> + <a-card + :loading="cardLoading" + :bordered="false" + title="宸ュ叿鍒嗙被" + style="height: 100%;" + > + <a-spin :spinning="loading"> + <a-alert + type="info" + :showIcon="true" + style="margin-right: 54px;" + > + <div slot="message"> + 褰撳墠锛�<span v-if="this.currSelected.title">{{ getCurrSelectedTitle() }}</span> + <a + v-if="this.currSelected.title" + style="margin-left: 10px" + @click="onClearSelected" + >鍙栨秷</a> + </div> + </a-alert> + <div class="drawer-bootom-button"> + <a-dropdown + :trigger="['click']" + placement="bottomCenter" + > + <a-menu slot="overlay"> + <a-menu-item + key="1" + @click="expandAll" + >灞曞紑鎵�鏈�</a-menu-item> + <a-menu-item + key="2" + @click="closeAll" + >鍚堝苟鎵�鏈�</a-menu-item> + <a-menu-item + key="3" + @click="refreshTree" + >鍒锋柊</a-menu-item> + </a-menu> + <a-button> + <a-icon type="bars" /> + </a-button> + </a-dropdown> + </div> + + <a-input-search + @search="handleSearch" + style="width:100%;margin-top: 10px" + placeholder="妫�绱㈠伐鍏峰垎绫�" + allowClear + v-model="searchInput" + @change="handleChange" + /> + + <!-- showLine --> + <a-tree + :checkStrictly="checkStrictly" + :expandedKeys.sync="expandedKeys" + :selectedKeys="selectedKeys" + :dropdownStyle="{maxHeight:'200px',overflow:'auto'}" + :treeData="treeDataSource" + :autoExpandParent="autoExpandParent" + @select="onSelect" + @expand="onExpand" + > + <template + slot="title" + slot-scope="{title, type, rfield1}" + > + <Tooltip + placement="top" + title="宸ュ叿鍒嗙被" + > + <i + v-if="type == 0" + class="action-jeecg actioncompany2" + style="font-size: 18px;" + /> + </Tooltip> + + <span v-if="title.indexOf(searchValue) > -1"> + {{ title.substr(0, title.indexOf(searchValue)) }} + <span class="replaceSearch">{{ searchValue }}</span> + {{ title.substr(title.indexOf(searchValue) + searchValue.length) }} + </span> + <span v-else>{{ title }}</span> + + </template> + </a-tree> + </a-spin> + </a-card> +</template> + +<script> +import { getAction } from '@/api/manage' +import Tooltip from 'ant-design-vue/es/tooltip' +export default { + name: 'ToolsClassifyListLeft', + components: { + Tooltip, + }, + props: ['value'], + data() { + return { + searchInput: '', + cardLoading: false, + loading: false, + treeDataSource: [], + selectedKeys: [], + expandedKeys: [], + url: { + factoryTreeList: '/tms/toolsClassify/loadTree', + }, + searchValue: '', + dataList: [], + autoExpandParent: true, + checkStrictly: true, + allTreeKeys: [], + currSelected: {}, + hiding: false, + } + }, + created() { + this.queryTreeData(); + this.closeAll(); + }, + methods: { + getCurrSelectedTitle() { + return !this.currSelected.title ? '' : this.currSelected.title; + }, + onClearSelected() { + this.hiding = true; + this.currSelected = {}; + this.selectedKeys = []; + }, + onSelect(selectedKeys, e) { + this.hiding = false; + let record = e.node.dataRef; + this.currSelected = Object.assign({}, record); + this.selectedKeys = [record.key]; + }, + onExpand(expandedKeys) { + this.expandedKeys = expandedKeys; + this.autoExpandParent = false; + }, + queryTreeData() { + this.loading = true; + this.cardLoading = true; + getAction(this.url.factoryTreeList).then((res) => { + if (res.success) { + this.dataList = []; + this.allTreeKeys = []; + this.treeDataSource = res.result; + this.generateList(res.result); + } else { + this.$message.warn(res.message); + } + }).finally(() => { + this.loading = false; + this.cardLoading = false; + }) + }, + + handleChange() { + let search = this.searchInput; + let expandedKeys = this.dataList + .map(item => { + if (item.title.indexOf(search) > -1) { + return this.getParentKey(item.key, this.treeDataSource); + } + return null; + }) + .filter((item, i, self) => item && self.indexOf(item) === i); + Object.assign(this, { + expandedKeys, + searchValue: search, + autoExpandParent: true, + }); + }, + handleSearch(value) { + let search = value; + let expandedKeys = this.dataList + .map(item => { + if (item.title.indexOf(search) > -1) { + return this.getParentKey(item.key, this.treeDataSource); + } + return null; + }) + .filter((item, i, self) => item && self.indexOf(item) === i); + Object.assign(this, { + expandedKeys, + searchValue: search, + autoExpandParent: true, + }); + }, + getParentKey(key, tree) { + let parentKey; + for (let i = 0; i < tree.length; i++) { + const node = tree[i]; + if (node.children) { + if (node.children.some(item => item.key === key)) { + parentKey = node.key; + } else if ( + this.getParentKey(key, node.children)) { + parentKey = this.getParentKey(key, node.children); + } + } + } + return parentKey; + }, + + generateList(data) { + for (let i = 0; i < data.length; i++) { + const node = data[i]; + const key = node.key; + const title = node.title; + this.dataList.push({ key, title: title }); + this.allTreeKeys.push(key); + if (node.children) { + this.generateList(node.children); + } + } + }, + expandAll() { + this.expandedKeys = this.allTreeKeys; + }, + closeAll() { + this.expandedKeys = this.allSiteIds; + }, + refreshTree() { + this.queryTreeData(); + } + }, + mounted() { + this.$bus.$on('queryTreeData', this.queryTreeData); + }, + //鐩戝惉 + watch: { + currSelected(val) {//鐩戝惉currSelected 鍙樺寲锛屽皢鍙樺寲鍚庣殑鏁板�间紶閫掔粰 getCurrSelected 浜嬩欢 + this.$bus.$emit('getCurrSelected', val) + }, + } +} +</script> + +<style scoped> +.replaceSearch { + color: #40a9ff; + font-weight: bold; + background-color: rgb(204, 204, 204); +} +/*闅愯棌鏍戠殑榛樿icon*/ +.ant-tree-switcher-noop { + display: none !important; +} +/*闅愯棌鏍戠殑榛樿绔栫嚎*/ +.ant-tree.ant-tree-show-line li:not(:last-child):before { + border-left: 0px; +} + +.ant-card-body .table-operator { + margin: 15px; +} + +.anty-form-btn { + width: 100%; + text-align: center; +} + +.anty-form-btn button { + margin: 0 5px; +} + +.anty-node-layout .ant-layout-header { + padding-right: 0; +} + +.header { + padding: 0 8px; +} + +.header button { + margin: 0 3px; +} + +.ant-modal-cust-warp { + height: 100%; +} + +.ant-modal-cust-warp .ant-modal-body { + height: calc(100% - 110px) !important; + overflow-y: auto; +} + +.ant-modal-cust-warp .ant-modal-content { + height: 90% !important; + overflow-y: hidden; +} + +#app .desktop { + height: auto !important; +} + +/** Button鎸夐挳闂磋窛 */ +.ant-btn { + margin-left: 3px; +} +.ant-alert { + padding: 5px 15px 5px 37px; +} +.drawer-bootom-button { + position: absolute; + top: 1px; + /* padding: 10px 16px; */ + text-align: left; + right: 0; + background: #fff; + border-radius: 0 0 2px 2px; +} +</style> \ No newline at end of file diff --git a/src/views/tms/modules/toolsClassify/ToolsClassifyListRight.vue b/src/views/tms/modules/toolsClassify/ToolsClassifyListRight.vue new file mode 100644 index 0000000..14b3ab0 --- /dev/null +++ b/src/views/tms/modules/toolsClassify/ToolsClassifyListRight.vue @@ -0,0 +1,466 @@ +<template> + <a-card :bordered="false"> + <!-- 鏌ヨ鍖哄煙 --> + <div class="table-page-search-wrapper"> + <a-form layout="inline" @keyup.enter.native="searchQuery"> + <a-row :gutter="24"> + <a-col + :md="6" + :sm="8" + > + <a-form-item + label="鍒嗙被缂栧彿" + :labelCol="{span: 5}" + :wrapperCol="{span: 18, offset: 1}" + > + <a-input + placeholder="璇疯緭鍏ュ垎绫荤紪鍙锋绱�" + v-model="queryParam.classifyId" + ></a-input> + </a-form-item> + </a-col> + <a-col + :md="6" + :sm="8" + > + <a-form-item + label="鍒嗙被鍚嶇О" + :labelCol="{span: 5}" + :wrapperCol="{span: 18, offset: 1}" + > + <a-input + placeholder="璇疯緭鍏ュ垎绫诲悕绉版绱�" + v-model="queryParam.typeName" + ></a-input> + </a-form-item> + </a-col> + <a-col :md="6" :sm="24"> + <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> + <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button> + <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">閲嶇疆</a-button> + </span> + </a-col> + + </a-row> + </a-form> + </div> + <!-- 鏌ヨ鍖哄煙-END --> + + <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> + <div class="table-operator"> + <Tooltip + placement="top" + title="閫夋嫨宸ュ叿鍒嗙被鍚庡啀鎵ц鏂板" + > + <a-button @click="handleAdd(nodeSelected)" type="primary" icon="plus" :disabled="!nodeSelected.key || nodeSelected.entity.leafFlag === '1'">鏂板</a-button> + </Tooltip> + <a-button type="primary" icon="download" @click="handleExportXls('宸ュ叿鍒嗙被淇℃伅')">瀵煎嚭</a-button> + <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel"> + <a-button type="primary" icon="import">瀵煎叆</a-button> + </a-upload> + </div> + + <!-- table鍖哄煙-begin --> + <div> + <!-- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> + <i class="anticon anticon-info-circle ant-alert-icon"></i> 宸查�夋嫨 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>椤� + <a style="margin-left: 24px" @click="onClearSelected">娓呯┖</a> + </div> --> + + <a-table + ref="table" + size="middle" + :scroll="{x:true}" + bordered + rowKey="id" + :columns="columns" + :dataSource="dataSource" + :pagination="ipagination" + :loading="loading" + :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" + class="j-table-force-nowrap" + @change="handleTableChange"> + + <span slot="status" slot-scope="text, record"> + <span v-if="text === '1'" class='enable'>鍚敤</span> + <span v-if="text === '2'" class='disable'>绂佺敤</span> + </span> + + <template slot="htmlSlot" slot-scope="text"> + <div v-html="text"></div> + </template> + <template slot="imgSlot" slot-scope="text,record"> + <span v-if="!text" style="font-size: 12px;font-style: italic;">鏃犲浘鐗�</span> + <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/> + </template> + <template slot="fileSlot" slot-scope="text"> + <span v-if="!text" style="font-size: 12px;font-style: italic;">鏃犳枃浠�</span> + <a-button + v-else + :ghost="true" + type="primary" + icon="download" + size="small" + @click="downloadFile(text)"> + 涓嬭浇 + </a-button> + </template> + + <span slot="action" slot-scope="text, record"> + <a @click="handleEdit(record)">缂栬緫</a> + + <a-divider type="vertical" /> + <a-dropdown> + <a class="ant-dropdown-link">鏇村 <a-icon type="down" /></a> + <a-menu slot="overlay"> + <a-menu-item> + <a @click="handleDetail(record)">璇︽儏</a> + </a-menu-item> + <a-menu-item> + <a-popconfirm title="纭畾鍒犻櫎鍚�?" @confirm="() => handleDelete(record.id)"> + <a>鍒犻櫎</a> + </a-popconfirm> + </a-menu-item> + <a-menu-item v-if="record.status == 2"> + <a-popconfirm + title="纭畾鍚敤鍚�?" + @confirm="() => handleActive(record)" + > + <a>鍚敤</a> + </a-popconfirm> + </a-menu-item> + <a-menu-item v-if="record.status == 1"> + <a-popconfirm + title="纭畾绂佺敤鍚�?" + @confirm="() => handleActive(record)" + > + <a>绂佺敤</a> + </a-popconfirm> + </a-menu-item> + </a-menu> + </a-dropdown> + </span> + + </a-table> + </div> + + <tools-classify-modal ref="modalForm" @ok="modalFormOk" :nodeSelected="nodeSelected"></tools-classify-modal> + </a-card> +</template> + +<script> + + import '@/assets/less/TableExpand.less' + import { mixinDevice } from '@/utils/mixin' + import { JeecgListMixin } from '@/mixins/JeecgListMixin' + import ToolsClassifyModal from './ToolsClassifyModal' + import Tooltip from 'ant-design-vue/es/tooltip' + import { getAction, postAction, deleteAction, requestPut } from '@api/manage' + + export default { + name: 'ToolsClassifyListRight', + mixins:[JeecgListMixin, mixinDevice], + components: { + ToolsClassifyModal, + Tooltip + }, + data () { + return { + description: '宸ュ叿鍒嗙被绠$悊椤甸潰', + // 琛ㄥご + columns: [ + { + title: '#', + dataIndex: '', + key:'rowIndex', + width:60, + align:"center", + customRender:function (t,r,index) { + return parseInt(index)+1; + } + }, + { + title:'鍒嗙被缂栧彿', + align:"center", + dataIndex: 'classifyId' + }, + { + title:'鍒嗙被鍚嶇О', + align:"center", + dataIndex: 'typeName' + }, + { + title:'涓婄骇鍒嗙被缂栧彿', + align:"center", + dataIndex: 'parentNum' + }, + { + title:'涓婄骇鍒嗙被鍚嶇О', + align:"center", + dataIndex: 'parentName' + }, + { + title:'鏄剧ず搴忓彿', + align:"center", + dataIndex: 'seq' + }, + // { + // title:'灞傜骇', + // align:"center", + // dataIndex: 'rank' + // }, + { + title:'鍙傛暟妯℃澘', + align:"center", + dataIndex: 'paraTypeFlagName' + }, + { + title:'澶囨敞', + align:"center", + dataIndex: 'remark' + }, + { + title:'鐘舵��', + align:"center", + dataIndex: 'status', + scopedSlots: { customRender: 'status' } + }, + { + title:'鍒涘缓浜�', + align:"center", + dataIndex: 'createBy' + }, + { + title:'鍒涘缓鏃堕棿', + align:"center", + dataIndex: 'createTime', + customRender:function (text) { + return !text?"":(text.length>10?text.substr(0,10):text) + } + }, + { + title: '鎿嶄綔', + dataIndex: 'action', + align:"center", + fixed:"right", + width:147, + scopedSlots: { customRender: 'action' } + } + ], + url: { + list: "/tms/toolsClassify/list", + delete: "/tms/toolsClassify/delete", + deleteBatch: "/tms/toolsClassify/deleteBatch", + edit: '/tms/toolsClassify/edit', + exportXlsUrl: "/tms/toolsClassify/exportXls", + importExcelUrl: "tms/toolsClassify/importExcel", + + }, + dictOptions:{}, + superFieldList:[], + nodeSelected: {}, // 褰撳墠閫変腑鐨勮妭鐐规暟鎹� + } + }, + created() { + this.$bus.$on('getCurrSelected', (data) => { + //getCurrSelected 浜嬩欢 鎺ユ敹缁勪欢浼犻�掔殑鍙傛暟 + this.nodeType = (data.type == undefined ? 0 : data.type); + this.nodeSelected = data; + this.loadData() + this.selectedRowKeys = [] + }) + }, + computed: { + importExcelUrl: function(){ + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; + }, + }, + methods: { + + handleAdd(entity) { + if (!this.nodeSelected ) { + this.$message.warning('璇峰厛閫夋嫨涓�涓埗绫诲埆'); + return; + } + // 鎵撳紑鏂板妯℃�佹锛屽苟浼犻�掑綋鍓嶉�変腑鐨勭埗鑺傜偣 + this.$refs.modalForm.add(this.nodeSelected); + this.$refs.modalForm.title = "鏂板宸ュ叿鍒嗙被"; + this.$refs.modalForm.disableSubmit = false; + }, + handleDelete(id) { + getAction(this.url.list, { parentId: id }).then((res) => { + if (res.success) { + if (res.result.total > 0) { + this.$message.warning('璇峰厛鍒犻櫎瀛愯妭鐐�'); + } else { + deleteAction(this.url.delete, {id: id}).then((res) => { + if (res.success) { + //閲嶆柊璁$畻鍒嗛〉闂 + this.loadData() + this.$message.success(res.message); + this.$bus.$emit('queryTreeData') + } else { + this.$message.warning(res.message); + } + }); + } + } else { + this.$message.warning(res.message); + } + }) + }, + modalFormOk() { + this.loadData(); // 鍒锋柊琛ㄦ牸鏁版嵁 + this.$bus.$emit('queryTreeData') //鍒锋柊宸︿晶鏍� + }, + + onSelectChange(selectedRowKeys) { + this.selectedRowKeys = selectedRowKeys; + }, + // 澶勭悊缂栬緫鎸夐挳鐐瑰嚮浜嬩欢 + handleEditSelected() { + if (this.selectedRowKeys.length === 0) { + this.$message.warning('璇烽�夋嫨涓�鏉¤褰曡繘琛岀紪杈�'); + return; + } + const selectedRecord = this.dataSource.find(item => item.id === this.selectedRowKeys[0]); + if (selectedRecord) { + this.handleEdit(selectedRecord); + } + }, + handleEdit(record) { + this.$refs.modalForm.edit(record); + this.$refs.modalForm.title = "缂栬緫"; + this.$refs.modalForm.disableSubmit = false; + }, + //绂佺敤鐘舵�佹牱寮� + tableRowClass(record, index) { + if (record.status != "1") { + return "frozenRowClass"; + } + return ""; + }, + handleActive(record) { + let that = this; + record.status == "1" ? record.status = "2" : record.status = "1" + requestPut(that.url.edit, { id:record.id,status: record.status }).then((res) => { + if (res.success) { + that.$message.success(res.message); + that.loadData(); + } else { + that.$message.warning(res.message); + } + }) + }, + loadData() { + let params = this.getQueryParams(); + if (this.nodeSelected && this.nodeSelected.key !== '-1') { + // 鍔犺浇閫変腑鑺傜偣鐨勫瓙绫� + params.parentId = this.nodeSelected.key; + } else { + // 鍔犺浇鎵�鏈夐《绾х被鍒� + params.parentId = '-1'; + } + this.loading = true; + getAction(this.url.list, params) + .then((res) => { + if (res.success) { + this.dataSource = res.result.records; // 鏇存柊琛ㄦ牸鏁版嵁 + } else { + this.$message.warning(res.message); + } + }) + .finally(() => { + this.loading = false; + }); + + }, + onClearSelected() { + this.selectedRowKeys = []; + this.nodeSelected = {}; // 娓呯┖閫変腑鐨勮妭鐐� + this.dataSource = []; // 娓呯┖琛ㄦ牸鏁版嵁 + }, + //閲嶇疆 + searchReset() { + this.queryParam = {} + this.loadData(1); + this.selectedRowKeys = []; + }, + /* 瀵煎叆 */ + handleImportExcel(info){ + this.loading = true; + if (info.file.status !== 'uploading') { + console.log(info.file, info.fileList); + } + if (info.file.status === 'done') { + this.loading = false; + if (info.file.response.success) { + // this.$message.success(`${info.file.name} 鏂囦欢涓婁紶鎴愬姛`); + if (info.file.response.code === 201) { + let { message, result: { msg, fileUrl, fileName } } = info.file.response + let href = window._CONFIG['domianURL'] + fileUrl + this.$warning({ + title: message, + content: (<div> + <span>{msg}</span><br/> + <span>鍏蜂綋璇︽儏璇� <a href={href} target="_blank" download={fileName}>鐐瑰嚮涓嬭浇</a> </span> + </div> + ) + }) + } else { + // this.$message.success(info.file.response.message || `${info.file.name} 鏂囦欢涓婁紶鎴愬姛`) + this.$notification.success({ + message:'娑堟伅', + description:info.file.response.message || `${info.file.name} 鏂囦欢涓婁紶鎴愬姛` + }); + } + this.loadData() + this.$bus.$emit('queryTreeData') //鍒锋柊宸︿晶鏍� + } else { + // this.$message.error(`${info.file.name} ${info.file.response.message}.`); + this.$notification.error({ + message:'娑堟伅', + description:`${info.file.name} ${info.file.response.message}.` + }); + } + } else if (info.file.status === 'error') { + this.loading = false; + if (info.file.response.status === 500) { + let data = info.file.response + const token = Vue.ls.get(ACCESS_TOKEN) + if (token && data.message.includes("Token澶辨晥")) { + this.$error({ + title: '鐧诲綍宸茶繃鏈�', + content: '寰堟姳姝夛紝鐧诲綍宸茶繃鏈燂紝璇烽噸鏂扮櫥褰�', + okText: '閲嶆柊鐧诲綍', + mask: false, + onOk: () => { + store.dispatch('Logout').then(() => { + Vue.ls.remove(ACCESS_TOKEN) + window.location.reload(); + }) + } + }) + } + } else { + // this.$message.error(`鏂囦欢涓婁紶澶辫触: ${info.file.msg} `); + this.$notification.error({ + message:'娑堟伅', + description:`鏂囦欢涓婁紶澶辫触: ${info.file.msg} ` + }); + } + } + }, + + }, + } +</script> +<style scoped> + @import '~@assets/less/common.less'; + .enable { + color: green; + } + .disable { + color: red; + } +</style> \ No newline at end of file diff --git a/src/views/tms/modules/toolsClassify/ToolsClassifyModal.vue b/src/views/tms/modules/toolsClassify/ToolsClassifyModal.vue new file mode 100644 index 0000000..b25a134 --- /dev/null +++ b/src/views/tms/modules/toolsClassify/ToolsClassifyModal.vue @@ -0,0 +1,60 @@ +<template> + <j-modal + :title="title" + :width="width" + :visible="visible" + switchFullscreen + @ok="handleOk" + :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" + @cancel="handleCancel" + cancelText="鍏抽棴"> + <tools-classify-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></tools-classify-form> + </j-modal> +</template> + +<script> + + import ToolsClassifyForm from './ToolsClassifyForm' + export default { + name: 'ToolsClassifyModal', + components: { + ToolsClassifyForm + }, + data () { + return { + title:'', + width:1200, + visible: false, + disableSubmit: false + } + }, + methods: { + add (nodeSelected) { + this.visible=true + this.$nextTick(()=>{ + this.$refs.realForm.add(nodeSelected); + }) + }, + edit (record) { + this.visible=true + this.$nextTick(()=>{ + this.$refs.realForm.edit(record); + }) + }, + close () { + this.$emit('close'); + this.visible = false; + }, + handleOk () { + this.$refs.realForm.submitForm(); + }, + submitCallback(){ + this.$emit('ok'); + this.visible = false; + }, + handleCancel () { + this.close() + } + } + } +</script> \ No newline at end of file -- Gitblit v1.9.3