| | |
| | | <el-button type="primary" icon="el-icon-connection" @click="send('send')">派发</el-button> |
| | | </div> |
| | | |
| | | <el-button icon="el-icon-switch-button" @click="orderClose">工单关闭</el-button> |
| | | <el-button icon="el-icon-switch-button" @click="orderClose">关闭工单</el-button> |
| | | </div> |
| | | |
| | | <div class="bodyTopFormGroup"> |
| | |
| | | <el-table-column |
| | | prop="route_name" |
| | | label="工艺路线" |
| | | show-tooltip-when-overflow |
| | | sortable="custom" |
| | | min-width="130" |
| | | min-width="140" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.route_name">{{ row.route_name }}</div> |
| | | <div v-else>/</div> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <el-table-column |
| | | prop="route_name" |
| | | label="关联工艺路线" |
| | | min-width="110" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <i v-if="row.route_name" class="el-icon-share" @click="routeClick(row)" /> |
| | | <i v-else style="color:rgb(180 ,181, 185)" class="el-icon-share" @click="routeClick(row)" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="plan_startdate" |
| | | label="计划开始时间" |
| | |
| | | style="width: 200px" |
| | | :disabled="operation!=='add'" |
| | | placeholder="请选择" |
| | | @change="mesordertypeChange" |
| | | > |
| | | <!-- @change="mesordertypeChange"--> |
| | | |
| | | <el-option |
| | | v-for="item in ordertypeArr" |
| | | :key="item.code" |
| | |
| | | type="primary" |
| | | style="padding: 0 10px;margin-left: -8px;margin-top: 3px" |
| | | class="el-icon-search" |
| | | :disabled="operation!=='add'" |
| | | :disabled="operation!=='add'||dialogForm.ordertype==='PO'" |
| | | @click="mesordertsourcesearchclick" |
| | | /> |
| | | </div> |
| | |
| | | <el-form-item v-if="operation!=='add'" label="产品名称" prop="partname"> |
| | | <el-input v-model="dialogForm.partname" disabled style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item label="产品编码" prop="partcode"> |
| | | <el-form-item label="产品编码"> |
| | | <el-input v-model="dialogForm.partcode" disabled style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item label="产品规格" prop="partspec"> |
| | |
| | | </span> |
| | | </el-dialog> |
| | | |
| | | <!-- 工艺路线对话框--> |
| | | <el-dialog |
| | | :close-on-click-modal="false" |
| | | title="关联工艺路线" |
| | | :visible.sync="dialogVisibleRoute" |
| | | width="800px" |
| | | top="10vh" |
| | | :fullscreen="isIpad" |
| | | class="dialogVisibleRoute" |
| | | @closed="handleCloseRoute" |
| | | @close="handleCloseRoute" |
| | | > |
| | | <div> |
| | | <i class="el-icon-s-comment" style="color:#42b983;" /> 产品名称:{{ dialogFormRoute.projectName }} |
| | | </div> |
| | | <el-divider /> |
| | | <div style="margin-bottom: 10px"> |
| | | <i class="el-icon-s-operation" style="color:#42b983;" /> 工艺路线集合 |
| | | </div> |
| | | |
| | | <div class="myCheckboxGroup"> |
| | | <div |
| | | v-for="item in dialogFormRoute.routeOperationArr" |
| | | :key="item.code" |
| | | :style="{border:item.isSelected1?'1px solid #42b983':'1px solid #eee'}" |
| | | class="myCheckbox" |
| | | @click="myCheckboxClick(item)" |
| | | > |
| | | <input |
| | | class="myCheckboxInput" |
| | | type="checkbox" |
| | | :value="item.code" |
| | | :name="item.name" |
| | | :style="{color:item.isSelected2?'#42b983':'#fff'}" |
| | | @click="myCheckboxInputClick(item)" |
| | | >{{ item.name }} |
| | | <!-- 父子点击事件不影响--> |
| | | <!-- onClick="event.cancelBubble = true"--> |
| | | </div> |
| | | </div> |
| | | |
| | | <el-divider /> |
| | | <div> |
| | | <i class="el-icon-s-operation" style="color:#42b983;" /> 默认工艺路线 |
| | | </div> |
| | | <div style="margin-top: 20px"> |
| | | <el-select |
| | | v-model="defaultroute_code" |
| | | filterable |
| | | style="width: 200px;" |
| | | placeholder="请选择" |
| | | class="defaultroute_code" |
| | | > |
| | | <el-option |
| | | v-for="item in defaultroute_codeArr" |
| | | :key="item.code" |
| | | :label="item.name" |
| | | :value="item.code" |
| | | /> |
| | | </el-select> |
| | | </div> |
| | | <el-divider /> |
| | | <div style="margin-bottom: 10px"> |
| | | <i class="el-icon-s-operation" style="color:#42b983;" /> 工序列表 |
| | | </div> |
| | | <div style="overflow-y: scroll"> |
| | | <el-table |
| | | ref="projectTableData" |
| | | :data="projectTableData" |
| | | border |
| | | height="280" |
| | | :row-class-name="tableRowClassName" |
| | | highlight-current-row |
| | | :header-cell-style="this.$headerCellStyle" |
| | | :cell-style="this.$cellStyle" |
| | | > |
| | | <el-table-column |
| | | prop="seq" |
| | | width="100" |
| | | label="工序序号" |
| | | fixed |
| | | /> |
| | | <el-table-column |
| | | prop="stepcode" |
| | | label="工序编码" |
| | | /> |
| | | <el-table-column |
| | | prop="stepname" |
| | | label="工序名称" |
| | | /> |
| | | <el-table-column |
| | | prop="enable" |
| | | label="启用状态" |
| | | fixed="right" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.enable==='Y'"><svg-icon icon-class="circleYes" style="margin-right: 2px" />是</div> |
| | | <div v-if="row.enable==='N'"><svg-icon icon-class="circleNo" style="margin-right: 2px" />否</div> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <div class="footerButton"> |
| | | <el-button @click="routeDialogVisibleCancel">取 消</el-button> |
| | | <el-button type="primary" @click="routeDialogVisibleConfirm">确 定</el-button> |
| | | </div> |
| | | </span> |
| | | </el-dialog> |
| | | |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | MesOrderSearch, PartSelectRoute, RouteSelectWkshop, SearchWorkStep, |
| | | SelectRouteStep |
| | | } from '@/api/scgl' |
| | | import { PartSelect } from '@/api/zzmx' |
| | | import { InventoryFileAssociationRoute, PartSelect, SaveInventoryFile } from '@/api/zzmx' |
| | | import { handleDatetime, handleDatetime2 } from '@/utils/global' |
| | | import { getCookie } from '@/utils/auth' |
| | | import { MesOrderPrintSearch1, PrintOrder } from '@/api/utils' |
| | | import { urlAddRandomNo, webapp_ws_ajax_run, webapp_ws_autoupdate } from '@/utils/grwebapp' |
| | | import QRCode from 'qrcodejs2' |
| | | import $ from 'jquery' |
| | | |
| | | const SER_HZ = /^[\u4e00-\u9fa5]+$/ |
| | | export default { |
| | |
| | | }, |
| | | sourceFormTotal: 10, |
| | | radioSelectedId: '', |
| | | isExpand: false// 是否张开,默认不展开 |
| | | isExpand: false, // 是否张开,默认不展开 |
| | | dialogVisibleRoute: false, |
| | | dialogFormRoute: { |
| | | projectName: '', // 产品名称 |
| | | projectCode: '', // 产品代码 |
| | | routeOperationArr: [] // 工艺路线集合 |
| | | }, |
| | | defaultroute_code: '', // 默认工艺路线选中值 |
| | | defaultroute_codeArr: '', // 默认工艺路线数组 |
| | | projectTableData: []// 设备列表 |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | }, |
| | | // 删除按钮 |
| | | async del(row) { |
| | | console.log(row.status) |
| | | if (row.status === 'START' || row.status === 'CLOSED') { |
| | | return this.$message.info('此工单不可删除!') |
| | | } |
| | |
| | | }).then(() => { |
| | | console.log(row, 1) |
| | | const data = { |
| | | souceid: row.sourceid, |
| | | wocode: row.wo_code, |
| | | m_po: row.m_po, |
| | | orderqty: row.plan_qty |
| | | } |
| | | console.log(data, 2) |
| | | DeleteMesOrder(data).then(res => { |
| | | if (res.code === '200') { |
| | | this.$message.success('删除成功!') |
| | |
| | | } |
| | | |
| | | const res = await ErpOrderSearch(data) |
| | | this.sourceTableData = res.data |
| | | this.sourceTableData = res.data.filter(item => item.status !== 'NEW') |
| | | this.sourceFormTotal = res.count |
| | | }, |
| | | // 单选框选中获取当前行信息 |
| | |
| | | this.sourceTableData.forEach(item => { |
| | | if (item.id === this.radioSelectedId) { |
| | | this.dialogForm.sourceorder = item.wo |
| | | this.dialogForm.partcode = item.partcode |
| | | this.dialogForm.partspec = item.partspec |
| | | } |
| | | }) |
| | | this.dialogVisibleSource = false |
| | | } |
| | | this.partcodeChange(this.dialogForm.partcode) |
| | | }, |
| | | mesordertypeChange(val) { |
| | | if (val === 'PO') { |
| | | this.dialogForm.sourceorder = '' |
| | | this.dialogForm.partcode = '' |
| | | this.dialogForm.partspec = '' |
| | | } |
| | | }, |
| | | /* 关联工艺路线模块*/ |
| | | // 关联工艺路线 |
| | | async routeClick(row) { |
| | | console.log(row) |
| | | // this.defaultroute_code = row.default_route |
| | | this.dialogFormRoute.projectCode = row.partcode |
| | | this.dialogFormRoute.projectName = row.partname |
| | | this.dialogVisibleRoute = true |
| | | const { data: res } = await InventoryFileAssociationRoute({ partcode: this.dialogFormRoute.projectCode }) |
| | | this.dialogFormRoute.routeOperationArr = res |
| | | |
| | | this.dialogFormRoute.routeOperationArr.forEach((item, index) => { |
| | | item.isSelected1 = false |
| | | item.isSelected2 = false |
| | | if (index === 0) { |
| | | item.isSelected1 = true |
| | | this.projectTableData = item.Data |
| | | } |
| | | if (item.flag === 'Y') { |
| | | item.isSelected2 = true |
| | | this.$nextTick(() => { |
| | | $('input:checkbox').eq(index).prop('checked', true) |
| | | }) |
| | | } |
| | | }) |
| | | |
| | | this.defaultroute_codeArr = this.dialogFormRoute.routeOperationArr.filter(item => item.flag === 'Y') |
| | | }, |
| | | // 对话框关闭 |
| | | handleCloseRoute() { |
| | | this.dialogFormRoute.routeOperationArr = [] |
| | | this.defaultroute_codeArr = [] |
| | | this.defaultroute_code = '' |
| | | this.projectTableData = [] |
| | | }, |
| | | // 取消 |
| | | routeDialogVisibleCancel() { |
| | | this.dialogVisibleRoute = false |
| | | }, |
| | | // 确定 |
| | | async routeDialogVisibleConfirm() { |
| | | const temp = this.dialogFormRoute.routeOperationArr.filter(item => item.isSelected2) |
| | | if (this.defaultroute_code === '' && temp.length > 0) { |
| | | return this.$message.info('默认工艺路线不能为空!') |
| | | } |
| | | |
| | | // 提交格式 |
| | | const data = [] |
| | | this.dialogFormRoute.routeOperationArr.forEach(item => { |
| | | if (item.isSelected2) { |
| | | data.push({ code: item.code, name: item.name }) |
| | | } |
| | | }) |
| | | |
| | | const res = await SaveInventoryFile(this.dialogFormRoute.projectCode, this.defaultroute_code, data) |
| | | if (res.code === '200') { |
| | | this.$message.success('保存成功!') |
| | | await this.getMesOrderSearch() |
| | | this.dialogVisibleRoute = false |
| | | } |
| | | }, |
| | | // 大盒子点击事件 |
| | | myCheckboxClick(val) { |
| | | console.log(val, 1) |
| | | this.dialogFormRoute.routeOperationArr.forEach(item => { |
| | | item.isSelected1 = val.code === item.code |
| | | }) |
| | | |
| | | this.projectTableData = val.Data |
| | | }, |
| | | // 小盒子点击事件 |
| | | myCheckboxInputClick(val) { |
| | | console.log(val, 2) |
| | | val.isSelected2 = !val.isSelected2 |
| | | |
| | | this.dialogFormRoute.routeOperationArr.forEach((item, index) => { |
| | | if (val.code === item.code) { |
| | | item.flag = !item.flag |
| | | } |
| | | }) |
| | | if (val.code === this.defaultroute_code) { |
| | | this.defaultroute_code = '' |
| | | } |
| | | this.defaultroute_codeArr = this.dialogFormRoute.routeOperationArr.filter(item => item.isSelected2) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | $main_color: #42b983; |
| | | .dialogVisibleRoute { |
| | | .myCheckboxGroup { |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | |
| | | .myCheckbox { |
| | | //border: 1px solid $main_color; |
| | | border: 1px solid #eee; |
| | | display: flex; |
| | | min-width: 100px; |
| | | padding: 10px; |
| | | margin: 10px 30px 0 0; |
| | | border-radius: 5px; |
| | | cursor: default; |
| | | |
| | | .myCheckboxInput { |
| | | margin: 1px 5px 0 0; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | } |
| | | |
| | | //.myCheckbox{ |
| | | // border: 1px solid $main_color; |
| | | //} |
| | | |
| | | input[type=checkbox] { |
| | | cursor: pointer; |
| | | position: relative; |
| | | width: 14px; |
| | | height: 14px; |
| | | font-size: 14px; |
| | | } |
| | | |
| | | input[type=checkbox]::after { |
| | | position: absolute; |
| | | top: 0; |
| | | //color: rgb(130, 35, 35); |
| | | color: $main_color; |
| | | width: 14px; |
| | | height: 14px; |
| | | display: inline-block; |
| | | visibility: visible; |
| | | padding-left: 0px; |
| | | text-align: center; |
| | | content: ' '; |
| | | border-radius: 3px |
| | | } |
| | | |
| | | input[type=checkbox]:checked::after { |
| | | //content: "✓"; |
| | | content: "√"; |
| | | color: #fff; |
| | | font-size: 12px; |
| | | font-weight: bold; |
| | | background-color: $main_color; |
| | | } |
| | | } |
| | | } |
| | | .dialogVisibleRoute { |
| | | ::v-deep .el-dialog__body { |
| | | padding: 20px 20px !important; |
| | | } |
| | | } |
| | | .defaultroute_code ::v-deep .el-input__suffix-inner{ |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | margin-top: -3px; |
| | | } |
| | | .el-date-editor { |
| | | font-size: 14px; |
| | | } |
| | |
| | | <!--公共页面样式--> |
| | | <style lang="scss" scoped> |
| | | $main_color: #42b983; |
| | | |
| | | ::v-deep .el-range-input{ |
| | | font-size: 14px !important; |
| | | } |