| | |
| | | // 字典列表 |
| | | export function getDict(data) { |
| | | return request({ |
| | | url: "/api-jl/v1/system/dict?dictType="+data.dictType, |
| | | url: "/api-jl/v1/system/dict?dictType="+data.dictType+"&keyword="+data.keyword+"&page="+data.page+"&pageSize="+data.pageSize, |
| | | method: "get", |
| | | data |
| | | }) |
| | |
| | | data |
| | | }) |
| | | } |
| | | |
| | | // 编辑字典 |
| | | export function editDict(data) { |
| | | return request({ |
| | | url: "/api-jl/v1/system/dict", |
| | | method: "put", |
| | | data |
| | | }) |
| | | } |
| | | // 删除字典 |
| | | export function deleteDict(data) { |
| | | return request({ |
| | | url: "/api-jl/v1/system/dict/"+data.id, |
| | | method: "delete", |
| | | data |
| | | }) |
| | | } |
New file |
| | |
| | | import request from "@/common/untils/request.js" |
| | | |
| | | // 生丝定价列表 |
| | | export function getPriceStandardList(data) { |
| | | return request({ |
| | | url: "/api-jl/v1/system/getPriceStandardList?page="+ data.page+"&pageSize="+data.pageSize+"&keyWord="+data.keyWord, |
| | | method: "get", |
| | | data |
| | | }) |
| | | } |
| | | |
| | | // 生丝等级列表 |
| | | export function getRankStandardGrade(data) { |
| | | return request({ |
| | | url: "/api-jl/v1/system/getRankStandardGrade", |
| | | method: "get", |
| | | data |
| | | }) |
| | | } |
| | | // 字典列表 |
| | | export function getDict(data) { |
| | | return request({ |
| | | url: "/api-jl/v1/system/dict?dictType="+data.dictType, |
| | | method: "get", |
| | | data |
| | | }) |
| | | } |
| | | // 保存生丝定价标准 |
| | | export function savePriceStandard(data) { |
| | | return request({ |
| | | url: "/api-jl/v1/system/savePriceStandard", |
| | | method: "post", |
| | | data |
| | | }) |
| | | } |
| | | // 删除生丝定价标准 |
| | | |
| | | export function deletePriceStandard(data) { |
| | | return request({ |
| | | url: "/api-jl/v1/system/deletePriceStandard/"+data.id, |
| | | method: "delete", |
| | | data |
| | | }) |
| | | } |
| | |
| | | // 车间列表 |
| | | export function getWorkshopManageList(data) { |
| | | return request({ |
| | | url: "/api-jl/v1/system/getWorkshopManageList"+'?keyWord='+data.keyWord, |
| | | url: "/api-jl/v1/system/getWorkshopManageList?page="+ data.page+"&pageSize="+data.pageSize+"&keyWord="+data.keyWord, |
| | | method: "get", |
| | | data |
| | | }) |
| | |
| | | <template> |
| | | <div class="add_wordshop"> |
| | | <el-dialog |
| | | :title="editConfig.dialogTitle+editConfig.dialogTitleType" |
| | | :visible.sync="editConfig.visible" |
| | | width="30%" |
| | | <el-dialog :title="editConfig.dialogTitle + editConfig.dialogTitleType" :visible.sync="editConfig.visible" width="30%" |
| | | :before-close="handleClose"> |
| | | <el-form :inline="true" label-width="20%" style="width: 100%;" :model="form" > |
| | | <el-form :inline="true" label-width="20%" style="width: 100%;" :model="editConfig.infomitton" :rules="rules" |
| | | ref="ruleForm"> |
| | | <template v-if="editConfig.infomitton.TabsIndex===0||editConfig.infomitton.TabsIndex===1"> |
| | | <el-form-item label="编码" style="width: 100%;" > |
| | | <el-input v-model="form.number" placeholder="请输入"></el-input> |
| | | <el-form-item prop="number" label="编码" style="width: 100%;"> |
| | | <el-input :disabled="editConfig.dialogTitle === '查看'" v-model="editConfig.infomitton.number" |
| | | placeholder="请输入"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="名称" style="width: 100%;" > |
| | | <el-input v-model="form.name" placeholder="请输入字母或数字,不允许有空格、中文"></el-input> |
| | | <el-form-item prop="name" label="名称" style="width: 100%;"> |
| | | <el-input :disabled="editConfig.dialogTitle === '查看'" v-model="editConfig.infomitton.name" |
| | | placeholder="请输入字母或数字,不允许有空格、中文"></el-input> |
| | | </el-form-item> |
| | | </template> |
| | | |
| | | <template v-if="editConfig.infomitton.TabsIndex===2"> |
| | | <el-form-item label="带号颜色" style="width: 100%;" > |
| | | <el-input v-model="form.name" placeholder="请输入字母或数字,不允许有空格、中文"></el-input> |
| | | <el-form-item prop="name" label="带号颜色" style="width: 100%;"> |
| | | <el-input :disabled="editConfig.dialogTitle === '查看'" v-model="editConfig.infomitton.name" |
| | | placeholder="请输入字母或数字,不允许有空格、中文"></el-input> |
| | | </el-form-item> |
| | | </template> |
| | | |
| | | <template v-if="editConfig.infomitton.TabsIndex===3"> |
| | | <el-form-item label="规格" style="width: 100%;" > |
| | | <el-input v-model="form.number" placeholder="请输入字母或数字,不允许有空格、中文"></el-input> |
| | | <el-form-item prop="name" label="规格" style="width: 100%;"> |
| | | <el-input :disabled="editConfig.dialogTitle === '查看'" v-model="editConfig.infomitton.name" |
| | | placeholder="请输入字母或数字,不允许有空格、中文"></el-input> |
| | | </el-form-item> |
| | | </template> |
| | | |
| | | <el-form-item label="描述" style="width: 100%;" > |
| | | <el-input |
| | | v-model="form.remark" |
| | | type="textarea" |
| | | :rows="4" |
| | | style="resize: none !important;" |
| | | placeholder="请输入" |
| | | > |
| | | <el-input :disabled="editConfig.dialogTitle === '查看'" v-model="editConfig.infomitton.remark" type="textarea" |
| | | :rows="4" style="resize: none !important;" placeholder="请输入"> |
| | | </el-input> |
| | | </el-form-item> |
| | | |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <span slot="footer" class="dialog-footer" v-if="editConfig.dialogTitle != '查看'"> |
| | | <el-button @click="editConfig.visible = false">取 消</el-button> |
| | | <el-button type="primary" @click="commitForm">确 定</el-button> |
| | | <el-button type="primary" @click="commitForm('ruleForm')">确 定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import {addDict} from "@/api/systemSetting/dataDictionary" |
| | | import { addDict, editDict } from "@/api/systemSetting/dataDictionary" |
| | | export default { |
| | | props: { |
| | | editDiaConfig:{ |
| | |
| | | visible: false, |
| | | dialogTitle:"添加", |
| | | infomitton: { |
| | | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | data() { |
| | | const checkSpace = (rule, value, callback) => { |
| | | if (value.includes(' ')) { |
| | | callback(new Error('名称不能包含空格')); |
| | | } else { |
| | | callback(); |
| | | } |
| | | }; |
| | | return { |
| | | editConfig:this.editDiaConfig, |
| | | form: { |
| | | name: '', |
| | | number: '', |
| | | remark:"" |
| | | rules: { |
| | | number: [ |
| | | { required: true, message: '请填写编码', trigger: 'change' } |
| | | ], |
| | | name: [ |
| | | {validator: checkSpace, required: true, message: '请填写名称并且不能有空格', trigger: 'change' } |
| | | ] |
| | | } |
| | | }; |
| | | }, |
| | |
| | | if(type===0||type===1){ |
| | | params={ |
| | | dictType:this.editConfig.infomitton.TabsIndex, |
| | | name: this.form.name, |
| | | number: this.form.number, |
| | | remark:this.form.remark, |
| | | name: this.editConfig.infomitton.name, |
| | | number: this.editConfig.infomitton.number, |
| | | remark: this.editConfig.infomitton.remark, |
| | | } |
| | | }else if(type===2){ |
| | | params={ |
| | | dictType:this.editConfig.infomitton.TabsIndex, |
| | | name: this.form.name, |
| | | number: this.form.number, |
| | | remark:this.form.remark, |
| | | name: this.editConfig.infomitton.name, |
| | | remark: this.editConfig.infomitton.remark, |
| | | } |
| | | }else if(type===3){ |
| | | params={ |
| | | dictType:this.editConfig.infomitton.TabsIndex, |
| | | name: this.form.name, |
| | | number: this.form.number, |
| | | remark:this.form.remark, |
| | | name: this.editConfig.infomitton.name, |
| | | remark: this.editConfig.infomitton.remark, |
| | | } |
| | | } |
| | | return params |
| | | }, |
| | | commitForm(){ |
| | | commitForm(formName) { |
| | | this.$refs[formName].validate((valid) => { |
| | | if (valid) { |
| | | let params=this.saveParams(this.editConfig.infomitton.TabsIndex) |
| | | if(this.editConfig.dialogTitle==="新增"){ |
| | | addDict(params).then((res)=>{ |
| | |
| | | type: 'success' |
| | | }); |
| | | } |
| | | console.log(res,"res") |
| | | }) |
| | | }else if(this.editConfig.dialogTitle==="修改"){ |
| | | console.log("修改") |
| | | editDict({ ...params, id: this.editConfig.infomitton.ID }).then((res) => { |
| | | if (res && res.code === 200) { |
| | | this.editConfig.visible = false |
| | | this.$parent.getData() |
| | | this.$message({ |
| | | message: `修改${this.editConfig.dialogTitleType}成功!`, |
| | | type: 'success' |
| | | }); |
| | | } |
| | | }) |
| | | } |
| | | } else { |
| | | console.log('error submit!!'); |
| | | return false; |
| | | } |
| | | }); |
| | | |
| | | } |
| | | }, |
| | | components: { |
| | |
| | | <template> |
| | | <div class="silkStandardSetting-container"> |
| | | <div class="filter-card"> |
| | | <CommonSearch :show-add="false" :amount-view="false" placeholder="请输入关键词" @searchClick="onFilterSearch"> |
| | | <CommonSearch ref="searchRef" :show-add="false" :amount-view="false" placeholder="请输入关键词" @searchClick="onFilterSearch"> |
| | | <template slot="leftButton"> |
| | | <el-button size="small" type="primary" @click="addBtnClick">新增</el-button> |
| | | <el-button size="small" type="primary" @click="refreshClick">刷新</el-button> |
| | |
| | | </CommonSearch> |
| | | </div> |
| | | <div class="body-card"> |
| | | <div> |
| | | <div class="list-view"> |
| | | <div class="bottom-tabs" > |
| | | <div class="tab-pane" @click="getTab(0)" :style="{ |
| | | background: TabsIndex == 0 ? '#2a78fb' : '#F1F3F8', |
| | |
| | | 规格 |
| | | </div> |
| | | </div> |
| | | <div class="list-view"> |
| | | <div > |
| | | <TableCommonView :loading="loading" :table-list="productTableList" @selTableCol="selBottomTableCol"> |
| | | <template slot="tableButton"> |
| | | <el-table-column label="操作" width="160" fixed="right"> |
| | |
| | | </TableCommonView> |
| | | </div> |
| | | </div> |
| | | <div class="btn-pager"> |
| | | <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" /> |
| | | </div> |
| | | </div> |
| | | <AddDataDictionaries |
| | | :editDiaConfig="editConfig" |
| | |
| | | |
| | | <script> |
| | | import AddDataDictionaries from "@/views/systemSetting/dataDictionary/components/addDataDictionaries.vue" |
| | | import {getDict} from "@/api/systemSetting/dataDictionary" |
| | | import {getDict,deleteDict} from "@/api/systemSetting/dataDictionary" |
| | | import pageMixin from "@/components/makepager/pager/mixin/pageMixin" |
| | | export default { |
| | | name: "dataDictionary", |
| | | props: {}, |
| | | components: {AddDataDictionaries}, |
| | | mixins: [], |
| | | mixins: [pageMixin], |
| | | computed: {}, |
| | | data() { |
| | | return { |
| | |
| | | ], |
| | | showWorkshopCol: ["编码","车间名称", "描述",], |
| | | colorTableColumn:[ |
| | | { label: "带号颜色", prop: "member_name" }, |
| | | { label: "带号颜色", prop: "name" }, |
| | | { label: "描述", prop: "remark" }, |
| | | ], |
| | | showColorCol: ["带号颜色", "描述",], |
| | | specsTableColumn:[ |
| | | { label: "规格", prop: "member_name" }, |
| | | { label: "规格", prop: "name" }, |
| | | { label: "描述", prop: "remark" }, |
| | | ], |
| | | showSpecsCol: ["规格", "描述",], |
| | |
| | | page: 1, |
| | | pageSize:10, |
| | | dictType:0, |
| | | keyword:"" |
| | | }, |
| | | } |
| | | }, |
| | |
| | | methods: { |
| | | // 搜索 |
| | | onFilterSearch(searchText) { |
| | | console.log(searchText) |
| | | this.getDataParams.keyword=searchText, |
| | | this.getData() |
| | | }, |
| | | // 新增 |
| | | addBtnClick() { |
| | | this.editConfig.dialogTitle="新增" |
| | | this.editConfig.infomitton={} |
| | | this.editConfig.infomitton.TabsIndex=this.TabsIndex |
| | | this.editConfig.visible=true |
| | | }, |
| | | // 刷新 |
| | | refreshClick() { |
| | | console.log("a") |
| | | this.getDataParams.keyword = "" |
| | | this.pagerOptions.currPage = 1 |
| | | this.pagerOptions.pageSize = 15 |
| | | this.$refs.searchRef.searchInput="" |
| | | this.TabsIndex=0, |
| | | this.getData() |
| | | }, |
| | | // 打印 |
| | | printClick() { |
| | |
| | | getData(){ |
| | | getDict({ |
| | | dictType:this.TabsIndex, |
| | | page:this.getDataParams.page, |
| | | pageSize:this.getDataParams.pageSize, |
| | | page: this.pagerOptions.currPage, |
| | | pageSize: this.pagerOptions.pageSize, |
| | | keyword:this.getDataParams.keyword, |
| | | }).then((res)=>{ |
| | | console.log(res,"res") |
| | | this.productTableList.tableInfomation=res.data |
| | | this.pagerOptions.totalCount = res.total |
| | | }) |
| | | }, |
| | | rowClick(row,type){ |
| | | if(type==="查看"){ |
| | | this.editConfig.dialogTitle="查看" |
| | | this.editConfig.visible=true |
| | | this.editConfig.infomitton={...row,TabsIndex:this.TabsIndex} |
| | | }else if(type==="修改"){ |
| | | this.editConfig.dialogTitle="修改" |
| | | this.editConfig.visible=true |
| | | this.editConfig.infomitton={...row,TabsIndex:this.TabsIndex} |
| | | }else if(type==="删除"){ |
| | | console.log("删除") |
| | | this.$confirm('确认删除吗?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | deleteDict({id:row.ID}).then((res)=>{ |
| | | if(res&&res.code===200){ |
| | | this.getData() |
| | | this.$message({ |
| | | type: 'success', |
| | | message: '删除成功!' |
| | | }); |
| | | } |
| | | }) |
| | | }) |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | .bgcWhite { |
| | | background: #fff !important; |
| | | }</style> |
| | | } |
| | | |
| | | .list-view { |
| | | height: calc(100% - 60px); |
| | | overflow: hidden; |
| | | } |
| | | .btn-pager { |
| | | display: flex; |
| | | margin-top: 10px; |
| | | .page { |
| | | margin-left: auto; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | <CommonSearch :show-add="false" :amount-view="false" placeholder="请输入关键词" @searchClick="onFilterSearch"> |
| | | <template slot="leftButton"> |
| | | <el-button size="small" type="primary" @click="addBtnClick" >新增</el-button> |
| | | <el-button size="small" type="primary" @click="delBtnClick" >删除</el-button> |
| | | <el-button size="small" type="primary" >删除</el-button> |
| | | <el-button size="small" type="primary" @click="addBtnClick" >修改</el-button> |
| | | <el-button size="small" type="primary" @click="refreshClick">刷新</el-button> |
| | | </template> |
| | |
| | | </div> |
| | | <div class="edit-sace-label">{{ isEdit ? "锁定保存" : "界面设计" }}</div> |
| | | </div> --> |
| | | <div> |
| | | <div class="list-view"> |
| | | <SilkTableList |
| | | :detail-enter="isEdit" |
| | | :silk-table-list="silkTableList" |
| | |
| | | > |
| | | </SilkTableList> |
| | | </div> |
| | | <div class="btn-pager"> |
| | | <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" /> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import SilkTableList from "@/views/systemSetting/workshopManage/components/silkTableList" |
| | | import pageMixin from "@/components/makepager/pager/mixin/pageMixin" |
| | | export default { |
| | | name: "encodeManage", |
| | | props: {}, |
| | | components: { SilkTableList }, |
| | | mixins: [], |
| | | mixins: [pageMixin], |
| | | computed: {}, |
| | | data() { |
| | | return { |
| | |
| | | }, |
| | | // 删除 |
| | | clearupProject(data, index) { |
| | | console.log(data) |
| | | this.tableData.splice(index, 1) |
| | | }, |
| | | // 保存编辑按钮切换 |
| | |
| | | let propStr = "trends" + this.columnNum |
| | | this.tableColumn.splice(2, 0, { label: "", prop: propStr, inputFloat: true, addColumn: true }) |
| | | this.$set(this.dataObj, propStr, 0) |
| | | console.log(this.tableColumn) |
| | | this.silkTableList.tableColumn = this.tableColumn |
| | | this.columnNum += 1 |
| | | }, |
| | |
| | | } |
| | | } |
| | | } |
| | | .list-view { |
| | | height: calc(100% - 60px); |
| | | overflow: hidden; |
| | | } |
| | | .btn-pager { |
| | | display: flex; |
| | | margin-top: 10px; |
| | | .page { |
| | | margin-left: auto; |
| | | } |
| | | } |
| | | </style> |
New file |
| | |
| | | <template> |
| | | <div class="add_wordshop"> |
| | | <el-dialog :title="editConfig.dialogTitle + '生丝定价标准'" :visible.sync="editConfig.visible" width="30%" |
| | | :before-close="handleClose"> |
| | | <el-form :inline="true" label-width="20%" style="width: 100%;" :model="editConfig.infomitton" :rules="rules" |
| | | ref="ruleForm"> |
| | | <el-form-item prop="marketNumber" label="庄口" style="width: 100%;"> |
| | | <el-select :disabled="this.editConfig.dialogTitle === '查看'" v-model="editConfig.infomitton.marketNumber" |
| | | placeholder="请选择庄口"> |
| | | <el-option v-for="item in shanguchiList" :key="item.ID" :label="item.name" :value="item.ID"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item prop="rawSilkGrade" label="生丝等级" style="width: 100%;"> |
| | | <el-select :disabled="this.editConfig.dialogTitle === '查看'" v-model="editConfig.infomitton.rawSilkGrade" |
| | | placeholder="请选择生丝等级"> |
| | | <el-option v-for="item in classList" :key="item" :label="item" :value="item"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item prop="payStandard" label="薪酬标准" style="width: 100%;"> |
| | | <!-- <el-input-number |
| | | v-model="form.workshopNumber" |
| | | placeholder="请输入组别" |
| | | :controls="false" |
| | | style="width: 100%; margin-right: 5px;text-align:left;" |
| | | ></el-input-number> --> |
| | | <el-input :disabled="this.editConfig.dialogTitle === '查看'" v-model="editConfig.infomitton.payStandard" :rows="4" |
| | | style="resize: none !important;" placeholder="请输入组别"> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="单位" style="width: 100%;"> |
| | | <el-input :disabled="this.editConfig.dialogTitle === '查看'" v-model="editConfig.infomitton.unit" :rows="4" |
| | | style="resize: none !important;" placeholder="请输入组别"> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="备注" style="width: 100%;"> |
| | | <el-input :disabled="this.editConfig.dialogTitle === '查看'" v-model="editConfig.infomitton.notes" type="textarea" |
| | | :rows="4" style="resize: none !important;" placeholder=""> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="editConfig.visible = false">取 消</el-button> |
| | | <el-button type="primary" @click="commitForm('ruleForm')">确 定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { getDict, getRankStandardGrade, savePriceStandard } from "@/api/systemSetting/silkPriceStandard" |
| | | export default { |
| | | props: { |
| | | editDiaConfig: { |
| | | type: Object, |
| | | default: () => { |
| | | return { |
| | | visible: false, |
| | | dialogTitle: "添加", |
| | | isReadonly: true, |
| | | infomitton: { |
| | | }, |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | editConfig: this.editDiaConfig, |
| | | form: { |
| | | workshopNumber: null, |
| | | groupNumber: null, |
| | | startCarNumber: null, |
| | | endCarNumber: null, |
| | | carFlag: null, |
| | | notes: null |
| | | }, |
| | | shanguchiList: [], |
| | | carFlagList: [ |
| | | { id: 1, name: "左半车" }, |
| | | { id: 2, name: "右半车" }, |
| | | { id: 3, name: "全车结束" }, |
| | | ], |
| | | classList: [], |
| | | rules: { |
| | | marketNumber: [ |
| | | { required: true, message: '请选择庄口', trigger: 'change' } |
| | | ], |
| | | rawSilkGrade: [ |
| | | { required: true, message: '请选择生丝等级', trigger: 'change' } |
| | | ], |
| | | payStandard: [ |
| | | { required: true, message: '请选择生丝等级', trigger: 'change' } |
| | | ] |
| | | }, |
| | | }; |
| | | }, |
| | | computed: { |
| | | }, |
| | | created() { |
| | | this.getDictData() |
| | | this.getRankStandardGrade() |
| | | }, |
| | | mounted() { |
| | | |
| | | }, |
| | | watch: { |
| | | |
| | | }, |
| | | methods: { |
| | | handleClose(done) { |
| | | done(); |
| | | }, |
| | | async getDictData() { |
| | | await getDict({ dictType: 0 }).then((res) => { |
| | | if (res && res.code === 200) { |
| | | this.shanguchiList = res.data |
| | | } |
| | | }) |
| | | }, |
| | | setParams() { |
| | | let params = { |
| | | marketNumber: this.editConfig.infomitton.marketNumber + '', |
| | | unit: this.editConfig.infomitton.unit, |
| | | payStandard: Number(this.editConfig.infomitton.payStandard), |
| | | rawSilkGrade: this.editConfig.infomitton.rawSilkGrade, |
| | | notes: this.editConfig.infomitton.notes, |
| | | // id:Number(this.editConfig.infomitton.workshopId), |
| | | } |
| | | return params |
| | | }, |
| | | async commitForm(formName) { |
| | | this.$refs[formName].validate((valid) => { |
| | | if (valid) { |
| | | let params = this.setParams() |
| | | if (this.editConfig.dialogTitle === "新增") { |
| | | savePriceStandard(params).then((res) => { |
| | | if (res && res.code === 200) { |
| | | this.editConfig.visible = false |
| | | this.$message({ |
| | | message: "保存成功!", |
| | | type: "success", |
| | | }); |
| | | this.$parent.getData() |
| | | } |
| | | }) |
| | | } else if (this.editConfig.dialogTitle === "修改") { |
| | | this.editConfig.infomitton.workshopNumber = this.editConfig.infomitton.workshopNumber + "" |
| | | savePriceStandard(this.editConfig.infomitton).then((res) => { |
| | | if (res && res.code === 200) { |
| | | this.editConfig.visible = false |
| | | this.$message({ |
| | | message: "保存成功!", |
| | | type: "success", |
| | | }); |
| | | this.$parent.getData() |
| | | } |
| | | }) |
| | | } |
| | | } else { |
| | | console.log('error submit!!'); |
| | | return false; |
| | | } |
| | | }); |
| | | }, |
| | | async getRankStandardGrade() { |
| | | await getRankStandardGrade().then((res) => { |
| | | if (res && res.data) { |
| | | this.classList = res.data |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | components: { |
| | | |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | ::v-deep .el-form-item__content { |
| | | width: 70% !important; |
| | | } |
| | | |
| | | ::v-deep { |
| | | .el-form { |
| | | .el-input__inner { |
| | | text-align: left; |
| | | } |
| | | } |
| | | |
| | | .el-select { |
| | | width: 100%; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <div class="silkStandardSetting-container"> |
| | | <div class="filter-card"> |
| | | <CommonSearch :show-add="false" :amount-view="false" placeholder="请输入关键词" @searchClick="onFilterSearch"> |
| | | <CommonSearch ref="searchRef" :show-add="false" :amount-view="false" placeholder="请输入关键词" @searchClick="onFilterSearch"> |
| | | <template slot="leftButton"> |
| | | <el-button size="small" type="primary" @click="addBtnClick" >新增</el-button> |
| | | <el-button size="small" type="primary" @click="delBtnClick" >删除</el-button> |
| | | <el-button size="small" type="primary" @click="saveBtnClick" >保存</el-button> |
| | | <el-button size="small" type="primary" @click="addBtnClick" >修改</el-button> |
| | | <el-button size="small" type="primary" @click="refreshClick">刷新</el-button> |
| | | <el-button size="small" type="primary" @click="printClick">打印</el-button> |
| | | </template> |
| | | </CommonSearch> |
| | | </div> |
| | | <div class="body-card"> |
| | | <div> |
| | | <SilkTableList |
| | | :detail-enter="isEdit" |
| | | :silk-table-list="silkTableList" |
| | | @inputContent="inputContent" |
| | | @addProjectClick="addBtnClick" |
| | | @clearupProject="clearupProject" |
| | | @deleteClick="clearupProject" |
| | | @addColumnClick="addColumnClick" |
| | | @clearupColumn="clearupColumn" |
| | | <div class="list-view"> |
| | | <TableCommonView |
| | | :table-list="tableList" |
| | | @selTableCol="selTableCol" |
| | | @tableRowClick="tableRowClick" |
| | | > |
| | | </SilkTableList> |
| | | <template slot="tableButton"> |
| | | <el-table-column label="操作" width="180"> |
| | | <template slot-scope="scope"> |
| | | <el-button @click.stop="handleClick(scope.row, '查看')" type="text" size="small">查看</el-button> |
| | | <el-button @click.stop="handleClick(scope.row, '修改')" type="text" size="small">修改</el-button> |
| | | <el-button @click.stop="handleClick(scope.row, '删除')" type="text" size="small">删除</el-button> |
| | | |
| | | </template> |
| | | </el-table-column> |
| | | </template> |
| | | </TableCommonView> |
| | | </div> |
| | | <div class="btn-pager"> |
| | | <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" /> |
| | | </div> |
| | | </div> |
| | | |
| | | <AddDialog |
| | | :editDiaConfig="editConfig" |
| | | /> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import SilkTableList from "@/views/systemSetting/silkPriceStandard/components/silkTableList" |
| | | import AddDialog from "@/views/systemSetting/silkPriceStandard/components/addDialog" |
| | | import {getPriceStandardList,deletePriceStandard} from "@/api/systemSetting/silkPriceStandard" |
| | | import pageMixin from "@/components/makepager/pager/mixin/pageMixin" |
| | | export default { |
| | | name: "silkPriceStandard", |
| | | props: {}, |
| | | components: { SilkTableList }, |
| | | mixins: [], |
| | | components: { AddDialog }, |
| | | mixins: [pageMixin], |
| | | computed: {}, |
| | | data() { |
| | | return { |
| | | isEdit: false, |
| | | silkTableList: {}, |
| | | tableData: [], |
| | | tableList: {}, |
| | | showCol: ["庄口", "生丝等级", "薪酬标准", "单位", "备注"], |
| | | tableColumn: [ |
| | | { label: "庄口", prop: "projectName", projectName: true }, |
| | | { label: "生丝等级", prop: "start", inputFloat: true }, |
| | | { label: "薪酬标准", prop: "end", inputFloat: true }, |
| | | { label: "单位", prop: "price1", inputFloat: true }, |
| | | { label: "备注", prop: "price2", inputFloat: true }, |
| | | { label: "庄口", prop: "marketNumber",}, |
| | | { label: "生丝等级", prop: "rawSilkGrade", }, |
| | | { label: "薪酬标准", prop: "payStandard" }, |
| | | { label: "单位", prop: "unit" }, |
| | | { label: "备注", prop: "notes", }, |
| | | ], |
| | | columnNum: 0, |
| | | dataObj: { |
| | | projectName: "", |
| | | start: 0, |
| | | end: 0, |
| | | price1: 0, |
| | | price2: 0, |
| | | price3: 0 |
| | | editConfig:{ |
| | | visible:false, |
| | | infomitton:{ |
| | | |
| | | } |
| | | }, |
| | | getDataParams:{ |
| | | keyWord:"", |
| | | // page: this.pagerOptions.currPage, |
| | | // pageSize: this.pagerOptions.pageSize |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | this.setTableForm() |
| | | this.setTable() |
| | | this.getData() |
| | | }, |
| | | methods: { |
| | | setTableForm() { |
| | | this.silkTableList = { |
| | | tableData: this.tableData, |
| | | isReturn: false, |
| | | tableColumn: this.tableColumn |
| | | } |
| | | }, |
| | | // 搜索 |
| | | onFilterSearch(searchText) { |
| | | console.log(searchText) |
| | | this.getDataParams.keyWord = searchText |
| | | this.pagerOptions.currPage = 1 |
| | | this.getData() |
| | | }, |
| | | // 新增 |
| | | addBtnClick() { |
| | | if(this.isEdit){ |
| | | this.$message.warning("请先保存当前编辑") |
| | | }else{ |
| | | this.isEdit = true |
| | | // array.splice(index, 0, item) |
| | | this.tableData.splice(0,0,{ |
| | | projectName: "", |
| | | start: 0, |
| | | end: 0, |
| | | price1: 0, |
| | | price2: 0, |
| | | price3: 0, |
| | | isAdd:true, |
| | | }) |
| | | } |
| | | |
| | | |
| | | this.editConfig.dialogTitle="新增" |
| | | this.editConfig.visible=true |
| | | this.editConfig.infomitton={} |
| | | }, |
| | | // 保存 |
| | | saveBtnClick(){ |
| | | this.tableData.forEach((item)=>{ |
| | | item.isAdd=false |
| | | }) |
| | | this.isEdit = false |
| | | }, |
| | | // 刷新 |
| | | refreshClick() {}, |
| | | refreshClick() { |
| | | this.getDataParams.keyWord = "" |
| | | this.pagerOptions.currPage = 1 |
| | | this.pagerOptions.pageSize = 15 |
| | | this.$refs.searchRef.searchInput="" |
| | | this.getData() |
| | | |
| | | }, |
| | | // 打印 |
| | | printClick() {}, |
| | | // 列表输入回调 |
| | | inputContent(val, prop, row) { |
| | | console.log(val, prop, row,"列表打印回调") |
| | | }, |
| | | // 删除 |
| | | clearupProject(data, index) { |
| | | console.log(data) |
| | | this.tableData.splice(index, 1) |
| | | setTable() { |
| | | // top 明细单列表 |
| | | this.tableList = { |
| | | selectIndex: true, |
| | | tableInfomation: [], |
| | | allcol: [], |
| | | showcol: this.showCol, |
| | | tableColumn: this.setColumnVisible(this.showCol, this.tableColumn) |
| | | } |
| | | this.setTableList(this.tableList) |
| | | }, |
| | | // 保存编辑按钮切换 |
| | | editSaveClick() { |
| | | this.isEdit = !this.isEdit |
| | | }, |
| | | // 添加列 |
| | | addColumnClick() { |
| | | let propStr = "trends" + this.columnNum |
| | | this.tableColumn.splice(2, 0, { label: "", prop: propStr, inputFloat: true, addColumn: true }) |
| | | this.$set(this.dataObj, propStr, 0) |
| | | console.log(this.tableColumn) |
| | | this.silkTableList.tableColumn = this.tableColumn |
| | | this.columnNum += 1 |
| | | }, |
| | | // 删除列 |
| | | clearupColumn(prop) { |
| | | let currentIndex = 0 |
| | | this.tableColumn.map((item, index) => { |
| | | if (item.prop == prop) { |
| | | currentIndex = index |
| | | setColumnVisible(showCol, tableColumn) { |
| | | return tableColumn.map((ele) => { |
| | | return { |
| | | ...ele, |
| | | isShowColumn: showCol.includes(ele.label) |
| | | } |
| | | }) |
| | | this.tableColumn.splice(currentIndex, 1) |
| | | this.silkTableList.tableColumn = this.tableColumn |
| | | this.$delete(this.dataObj, prop) |
| | | }, |
| | | // 删除 |
| | | delBtnClick(){ |
| | | |
| | | setTableList(tableList) { |
| | | tableList.allcol = tableList.tableColumn.filter((ele) => !ele.default).map((ele) => ele.label) |
| | | this.searchOptions = [] |
| | | for (let i = 0; i < tableList.tableColumn.length; i++) { |
| | | const label = tableList.tableColumn[i].label |
| | | const value = tableList.tableColumn[i].prop |
| | | this.searchOptions.push({ value: value, label: label }) |
| | | } |
| | | }, |
| | | selTableCol(val) { |
| | | this.showcol = val |
| | | this.tableList.tableColumn = this.setColumnVisible(val, this.tableColumn) |
| | | }, |
| | | // 表格行点击 |
| | | tableRowClick(row){ |
| | | console.log(row,"row") |
| | | }, |
| | | async getData(){ |
| | | await getPriceStandardList({ |
| | | keyWord:this.getDataParams.keyWord, |
| | | page: this.pagerOptions.currPage, |
| | | pageSize: this.pagerOptions.pageSize |
| | | }).then((res)=>{ |
| | | if(res&&res.code===200){ |
| | | this.tableList.tableInfomation=res.data |
| | | this.pagerOptions.totalCount = res.total |
| | | } |
| | | }) |
| | | }, |
| | | handleClick(row,type){ |
| | | if(type==="查看"){ |
| | | this.editConfig.infomitton=row |
| | | this.editConfig.dialogTitle=type |
| | | this.editConfig.visible=true |
| | | }else if(type==="修改"){ |
| | | this.editConfig.infomitton=row |
| | | this.editConfig.dialogTitle=type |
| | | this.editConfig.visible=true |
| | | }else if(type==="删除"){ |
| | | this.$confirm(`确认删除${row.name}吗?`, '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | deletePriceStandard({id:row.ID}).then((res)=>{ |
| | | if(res&&res.code===200){ |
| | | this.getData() |
| | | this.$message({ |
| | | type: 'success', |
| | | message: '删除成功!' |
| | | }); |
| | | } |
| | | }) |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | } |
| | | } |
| | | } |
| | | .list-view { |
| | | height: calc(100% - 60px); |
| | | overflow: hidden; |
| | | } |
| | | .btn-pager { |
| | | display: flex; |
| | | margin-top: 10px; |
| | | .page { |
| | | margin-left: auto; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | :visible.sync="editConfig.visible" |
| | | width="30%" |
| | | :before-close="handleClose"> |
| | | <el-form :inline="true" label-width="20%" style="width: 100%;" :model="form" > |
| | | <el-form-item label="车间" style="width: 100%;" > |
| | | <el-form :inline="true" label-width="20%" style="width: 100%;" :model="editConfig.infomitton" :rules="rules" ref="ruleForm" > |
| | | <el-form-item prop="workshopNumber" label="车间" style="width: 100%;" > |
| | | <el-select |
| | | :disabled="this.editConfig.dialogTitle==='查看'" v-model="editConfig.infomitton.workshopNumber" placeholder="请选择车间"> |
| | | <el-option |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="组别" style="width: 100%;" > |
| | | <el-form-item label="组别" style="width: 100%;" |
| | | prop="groupNumber" > |
| | | <!-- <el-input-number |
| | | v-model="form.workshopNumber" |
| | | placeholder="请输入组别" |
| | |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="editConfig.visible = false">取 消</el-button> |
| | | <el-button type="primary" @click="commitForm">确 定</el-button> |
| | | <el-button type="primary" @click="commitForm('ruleForm')">确 定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | |
| | | dialogTitle:"添加", |
| | | isReadonly:true, |
| | | infomitton: { |
| | | workshopNumber:null, |
| | | groupNumber:null, |
| | | startCarNumber:null, |
| | | endCarNumber:null, |
| | | carFlag:null, |
| | | notes:null |
| | | }, |
| | | } |
| | | } |
| | |
| | | {id:1,name:"左半车"}, |
| | | {id:2,name:"右半车"}, |
| | | {id:3,name:"全车结束"}, |
| | | ], |
| | | rules: { |
| | | workshopNumber: [ |
| | | { required: true, message: '请选择车间', trigger: 'change' } |
| | | ], |
| | | groupNumber: [ |
| | | { required: true, message: '请填写组别', trigger: 'change' } |
| | | ] |
| | | }, |
| | | }; |
| | | }, |
| | | computed: { |
| | |
| | | } |
| | | return params |
| | | }, |
| | | async commitForm(){ |
| | | async commitForm(formName){ |
| | | this.$refs[formName].validate((valid) => { |
| | | if (valid) { |
| | | let params=this.setParams() |
| | | if(this.editConfig.dialogTitle==="新增"){ |
| | | await saveWorkshopManage(params).then((res)=>{ |
| | | saveWorkshopManage(params).then((res)=>{ |
| | | if(res&&res.code===200){ |
| | | this.editConfig.visible=false |
| | | this.$message({ |
| | |
| | | }) |
| | | }else if(this.editConfig.dialogTitle==="修改"){ |
| | | this.editConfig.infomitton.workshopNumber=this.editConfig.infomitton.workshopNumber+"" |
| | | await saveWorkshopManage(this.editConfig.infomitton).then((res)=>{ |
| | | saveWorkshopManage(this.editConfig.infomitton).then((res)=>{ |
| | | if(res&&res.code===200){ |
| | | this.editConfig.visible=false |
| | | this.$message({ |
| | |
| | | } |
| | | }) |
| | | } |
| | | } else { |
| | | console.log('error submit!!'); |
| | | return false; |
| | | } |
| | | }); |
| | | |
| | | |
| | | } |
| | | }, |
| | | components: { |
| | |
| | | <template> |
| | | <div class="silkStandardSetting-container"> |
| | | <div class="filter-card"> |
| | | <CommonSearch :show-add="false" :amount-view="false" placeholder="请输入关键词" @searchClick="onFilterSearch"> |
| | | <CommonSearch ref="searchRef" :show-add="false" :amount-view="false" placeholder="请输入关键词" @searchClick="onFilterSearch"> |
| | | <template slot="leftButton"> |
| | | <el-button size="small" type="primary" @click="addBtnClick" >新增</el-button> |
| | | <el-button size="small" type="primary" @click="refreshClick">刷新</el-button> |
| | |
| | | </CommonSearch> |
| | | </div> |
| | | <div class="body-card"> |
| | | <div> |
| | | <div class="list-view"> |
| | | <TableCommonView |
| | | :table-list="tableList" |
| | | @selTableCol="selTableCol" |
| | |
| | | </el-table-column> |
| | | </template> |
| | | </TableCommonView> |
| | | </div> |
| | | <div class="btn-pager"> |
| | | <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" /> |
| | | </div> |
| | | </div> |
| | | <AddWorkshop |
| | |
| | | import { getWorkshopManageList,deleteWorkshopManage } from "@/api/systemSetting/workshopManage" |
| | | import TableCommonView from '@/components/makepager/TableCommonView.vue' |
| | | import AddWorkshop from '@/views/systemSetting/workshopManage/components/addWorkshop.vue' |
| | | import pageMixin from "@/components/makepager/pager/mixin/pageMixin" |
| | | export default { |
| | | name: "workshopManage", |
| | | props: {}, |
| | | components: { TableCommonView,AddWorkshop,AddDataDictionaries }, |
| | | mixins: [], |
| | | mixins: [pageMixin], |
| | | computed: {}, |
| | | data() { |
| | | return { |
| | |
| | | // 类型 |
| | | workList: [], |
| | | getDataParams: { |
| | | page: 1, |
| | | pageSize: 10, |
| | | keyWord: '', |
| | | }, |
| | | editConfig:{ |
| | |
| | | }, |
| | | methods: { |
| | | setTable() { |
| | | console.log(this.tableColumn,"看看") |
| | | // top 明细单列表 |
| | | this.tableList = { |
| | | selectIndex: true, |
| | |
| | | }, |
| | | // 搜索 |
| | | onFilterSearch(searchText) { |
| | | console.log(searchText,"是啥") |
| | | this.getDataParams.keyWord=searchText, |
| | | this.getData() |
| | | }, |
| | | // 新增 |
| | | addBtnClick() { |
| | | this.editConfig.infomitton=[] |
| | | this.editConfig.infomitton={} |
| | | this.editConfig.dialogTitle="新增" |
| | | this.editConfig.visible=true |
| | | }, |
| | |
| | | |
| | | }, |
| | | // 刷新 |
| | | refreshClick() {}, |
| | | refreshClick() { |
| | | this.getDataParams.keyWord = "" |
| | | this.pagerOptions.currPage = 1 |
| | | this.pagerOptions.pageSize = 15 |
| | | this.$refs.searchRef.searchInput="" |
| | | this.getData() |
| | | }, |
| | | // 打印 |
| | | printClick() {}, |
| | | // 删除 |
| | | delBtnClick(){}, |
| | | // 组别 |
| | | handleShow(item){ |
| | | console.log(item,"item") |
| | | handleShow(){ |
| | | this.$refs.bomTypeDialog.editDialogVisible = true; |
| | | }, |
| | | handleGetBomKindDictList() { |
| | |
| | | // }); |
| | | }, |
| | | handleConfirmSave(data) { |
| | | console.log(data,"data") |
| | | console.log(data) |
| | | // postSaveBomKindDict({ data: data }).then((res) => { |
| | | // if (res.code == 200) { |
| | | // this.$message({ |
| | |
| | | async getData() { |
| | | await getWorkshopManageList({ |
| | | keyWord: this.getDataParams.keyWord, |
| | | page: this.getDataParams.page, |
| | | pageSize: this.getDataParams.pageSize, |
| | | page: this.pagerOptions.currPage, |
| | | pageSize: this.pagerOptions.pageSize |
| | | }).then((res) => { |
| | | this.tableList.tableInfomation = res.data |
| | | this.pagerOptions.totalCount = res.total |
| | | }) |
| | | }, |
| | | getStatusCarFlag(val) { |
| | |
| | | } |
| | | }, |
| | | handleClick(row,type){ |
| | | console.log(row,"row") |
| | | if(type==="查看"){ |
| | | this.editConfig.infomitton=row |
| | | this.editConfig.infomitton.workshopId=row.ID |
| | | this.editConfig.infomitton.workshopNumber=Number(this.editConfig.infomitton.workshopNumber) |
| | | this.editConfig.dialogTitle=type |
| | | this.editConfig.visible=true |
| | | }else if(type==="修改"){ |
| | |
| | | } |
| | | } |
| | | } |
| | | .list-view { |
| | | height: calc(100% - 60px); |
| | | overflow: hidden; |
| | | } |
| | | .btn-pager { |
| | | display: flex; |
| | | margin-top: 10px; |
| | | .page { |
| | | margin-left: auto; |
| | | } |
| | | } |
| | | </style> |
| | | |