| | |
| | | dialogVisibleCancel() { |
| | | this.settingDialogVisible = false |
| | | this.getAnDengTypeSearch() |
| | | this.$forceUpdate() |
| | | }, |
| | | // 允许关闭点击事件 |
| | | async allowCloseChange() { |
| | |
| | | /> |
| | | </el-tooltip> |
| | | <el-tooltip v-del-tab-index class="item" effect="dark" content="删除" placement="top"> |
| | | <i :style="{color:$store.state.settings.theme}" class="el-icon-delete" @click="del(row.id)" /> |
| | | <i :style="{color:$store.state.settings.theme}" class="el-icon-delete" @click="del(row)" /> |
| | | </el-tooltip> |
| | | <!-- <el-button type="primary" size="mini" />--> |
| | | <!-- <el-button type="danger" size="mini">删除</el-button>--> |
| | |
| | | <el-form-item label="组织名称" prop="OrgName"> |
| | | <el-input v-model="dialogForm.OrgName" style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item v-if="dialogForm.OrgType!=='部门'" prop="SupUnit" label="上级单位"> |
| | | <el-form-item v-if="dialogForm.OrgType!=='部门'&&$store.state.settings.orgType===''" prop="SupUnit" label="上级单位"> |
| | | <el-select |
| | | v-model="dialogForm.SupUnit" |
| | | style="width: 200px" |
| | |
| | | // this.numvalue = res.numvalue |
| | | }, |
| | | // 修改按钮 |
| | | edit(operation, row) { |
| | | async edit(operation, row) { |
| | | if (this.$store.state.settings.orgType === 'W') { |
| | | return this.$message.info('当前用户无修改权限!') |
| | | } |
| | | |
| | | await this.getPrentOrganization() |
| | | this.operation = operation |
| | | this.dialogVisible = true |
| | | // if (row.description === 'F') { |
| | |
| | | }) |
| | | }, |
| | | // 删除按钮 |
| | | async del(id) { |
| | | async del(row) { |
| | | if (this.$store.state.settings.orgType === 'W') { |
| | | return this.$message.info('当前用户无删除权限!') |
| | | } |
| | |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | DeleteOrganization({ orgid: id }).then(res => { |
| | | DeleteOrganization({ orgid: row.id, orgcode: row.org_code }).then(res => { |
| | | if (res.code === '200') { |
| | | this.$message.success('删除成功!') |
| | | if (this.form.page > 1 && this.tableData.length === 1) { |
| | |
| | | // this.dialogVisibleEqp = false |
| | | this.$store.state.app.buttonIsDisabled = true |
| | | const data = [] |
| | | console.log(this.dialogFormEqp.eqpAll, 888) |
| | | this.dialogFormEqp.eqpAll.forEach((item, index) => { |
| | | if (item.children && item.children.length > 0) { |
| | | item.children.forEach(it => { |
| | | if (this.dialogFormEqp.eqpCodeSelectedArr.includes(it.code)) { |
| | | data.push({ |
| | | name: it.name, |
| | | code: it.code |
| | | code: it.code, |
| | | flag: item.code |
| | | }) |
| | | } |
| | | }) |
| | |
| | | if (this.dialogFormEqp.eqpCodeSelectedArr.includes(it.code)) { |
| | | data.push({ |
| | | name: it.name, |
| | | code: it.code |
| | | code: it.code, |
| | | flag: item.code |
| | | }) |
| | | } |
| | | }) |
| | |
| | | sortable: true |
| | | }, { |
| | | minWidth: false, |
| | | width: 110, |
| | | width: 150, |
| | | prop: 'route_name', |
| | | label: '工艺路线', |
| | | id: 9, |
| | |
| | | }, { |
| | | minWidth: false, |
| | | width: 130, |
| | | prop: 'stepcode', |
| | | prop: 'eqp_code', |
| | | label: '加工工序编码', |
| | | id: 10, |
| | | show: false, |
| | | fixed: false, |
| | | sortable: true |
| | | }, { |
| | | minWidth: false, |
| | | width: 110, |
| | | prop: 'stepname', |
| | | minWidth: 110, |
| | | width: false, |
| | | prop: 'eqp_name', |
| | | label: '加工设备', |
| | | id: 11, |
| | | show: true, |
| | |
| | | sortable: true |
| | | }, { |
| | | minWidth: false, |
| | | width: 130, |
| | | prop: 'eqp_code', |
| | | width: 150, |
| | | prop: 'stepcode', |
| | | label: '加工设备编码', |
| | | id: 12, |
| | | show: false, |
| | |
| | | }, { |
| | | minWidth: 110, |
| | | width: false, |
| | | prop: 'eqp_name', |
| | | prop: 'stepname', |
| | | label: '加工工序', |
| | | id: 13, |
| | | show: true, |
| | |
| | | <el-form-item label="工艺描述" style=" display: flex;"> |
| | | <el-input v-model="form.description" placeholder="请输入" style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item v-show="isExpandForm" label="创建人员" style=" display: flex;"> |
| | | <el-form-item v-if="isExpandForm" label="创建人员" style=" display: flex;"> |
| | | <el-input v-model="form.createuser" style="width: 200px" placeholder="请输入" /> |
| | | </el-form-item> |
| | | </div> |
| | |
| | | :popper-append-to-body="false" |
| | | style="width: 220px" |
| | | placeholder="请选择" |
| | | @change="wkshopcodeChange" |
| | | @change="getStepSelectArr" |
| | | > |
| | | <el-option |
| | | v-for="item in WorkShopArr" |
| | |
| | | return (res.value.toLowerCase().indexOf(queryString.toLowerCase()) !== -1) |
| | | } |
| | | }, |
| | | wkshopcodeChange() { |
| | | this.getStepSelectArr() |
| | | }, |
| | | // 工艺设置 下拉获取所有 |
| | | async getStepSelectArr() { |
| | | const { data: res } = await StepSelect({ WorkShop: this.dialogForm.wkshopcode }) |
| | |
| | | this.operation = operation |
| | | this.dialogVisible = true |
| | | |
| | | if (this.$store.state.settings.orgType === 'W') { |
| | | // if (this.$store.state.settings.orgType === 'W') { |
| | | this.getStepSelectArr() |
| | | } |
| | | // } |
| | | }, |
| | | // 工艺路线预览 |
| | | async edit(operation, row) { |
| | |
| | | :visible.sync="dialogVisible" |
| | | width="850px" |
| | | class="dialogVisible" |
| | | :top="dialogTitle==='自制报工'?'5vh':'15vh'" |
| | | :top="dialogTitle==='自制报工'?'15vh':'15vh'" |
| | | :close-on-click-modal="false" |
| | | @close="handleClose" |
| | | @closed="handleClose" |
| | |
| | | v-waves |
| | | type="primary" |
| | | :loading="$store.state.app.buttonIsDisabled" |
| | | :disabled="$store.state.app.buttonIsDisabled" |
| | | :disabled="$store.state.app.buttonIsDisabled||badTableDataDialog.length===0||badTableDataDialog.find(i=>i.isVisible===1)" |
| | | @click="badDialogVisibleConfirm " |
| | | >保 存/打 印</el-button> |
| | | </div> |
| | |
| | | |
| | | startqtySum: '', // 不能超过的数值 |
| | | |
| | | reckway: 'group', // 计件方式 |
| | | reckway: 'person', // 计件方式 |
| | | |
| | | operation: getCookie('navTabId'), // 报工人(收料人) |
| | | remarks: '', // 备注 |
| | |
| | | } |
| | | const res = await MesOrderStepStart(data) |
| | | if (res.code === '200' && res.count === 0) { |
| | | // console.log(res, 777) |
| | | // if (parseFloat(res.data.startqty) === 0) { |
| | | // return this.$message.error('') |
| | | // } |
| | | await this.ZZstart(res.data) |
| | | } |
| | | if (res.code === '200' && res.count === 1) { |
| | |
| | | |
| | | // this.dialogForm.inbarcode = '' // 入库码 |
| | | |
| | | this.dialogForm.reckway = 'group' |
| | | this.dialogForm.reckway = 'person' |
| | | |
| | | this.dialogForm.remarks = '' // 备注 |
| | | this.dialogForm.operation = getCookie('navTabId') // 报工人(收料人) |
| | |
| | | this.dialogVisible = false |
| | | this.$message.success('收料成功!') |
| | | // if (this.dialogForm.nextstepcode === '') { |
| | | // this.WXprint2(this.OperationArr.find(item => item.usercode === this.dialogForm.inuser).username) |
| | | this.WXprint2(this.OperationArr.find(item => item.usercode === getCookie('navTabId')).username) |
| | | this.dialogVisible2 = true |
| | | // this.WXprint2(this.OperationArr.find(item => item.usercode === getCookie('navTabId')).username) |
| | | // this.dialogVisible2 = true |
| | | // } |
| | | this.tabClick() |
| | | this.$store.state.app.buttonIsDisabled = false |
| | |
| | | this.$message.success('报工成功!') |
| | | // this.dialogForm.nextstepcode==='' //当为空的时候 代表是末道工序 |
| | | // if (this.dialogForm.nextstepcode !== '') { |
| | | this.ZZprint2(this.OperationArr.find(item => item.usercode === getCookie('navTabId')).username) |
| | | this.dialogVisible2 = true |
| | | // this.ZZprint2(this.OperationArr.find(item => item.usercode === getCookie('navTabId')).username) |
| | | // this.dialogVisible2 = true |
| | | // } |
| | | this.tabClick() |
| | | this.$store.state.app.buttonIsDisabled = false |
| | |
| | | /> |
| | | |
| | | <div class="elTableDiv"> |
| | | |
| | | <div |
| | | v-if="$store.state.settings.orgType === 'W'" |
| | | style="position:absolute;z-index: 1000;left: 20px;top: -50px" |
| | | > |
| | | <el-switch |
| | | v-model="switchButton" |
| | | style="display: block" |
| | | active-text="所有车间" |
| | | inactive-text="当前车间" |
| | | @change="rowClick" |
| | | /> |
| | | <!-- active-color="#13ce66"--> |
| | | <!-- inactive-color="#ff4949"--> |
| | | </div> |
| | | |
| | | <el-table |
| | | :data="tableDataDetail" |
| | | border |
| | |
| | | <!-- <el-input v-model="dialogForm.mesordercode" :disabled="operation!=='add'" style="width: 200px" />--> |
| | | <el-input v-model="dialogForm.mesordercode" disabled style="width: 200px" /> |
| | | </el-form-item> |
| | | <div style="display: flex"> |
| | | <!-- <div style="display: flex">--> |
| | | <el-form-item label="工单类型" prop="mesorderstus"> |
| | | <el-select |
| | | v-model="dialogForm.ordertype" |
| | |
| | | placeholder="请选择" |
| | | @change="mesordertypeChange" |
| | | > |
| | | |
| | | <el-option |
| | | v-for="item in ordertypeArr" |
| | | :key="item.code" |
| | |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <div style="display: flex;flex-wrap: nowrap"> |
| | | <!-- <div style="display: flex;flex-wrap: nowrap">--> |
| | | <el-form-item label="源单单号"> |
| | | <el-input |
| | | v-model="dialogForm.sourceorder" |
| | | :disabled="dialogForm.ordertype==='PO'" |
| | | style="width: 172px" |
| | | /> |
| | | </el-form-item> |
| | | style="width: 200px" |
| | | > |
| | | <el-button |
| | | v-waves |
| | | type="primary" |
| | | style="padding: 0 10px;margin-left: -8px;margin-top: 3px" |
| | | class="el-icon-search" |
| | | slot="append" |
| | | icon="el-icon-search" |
| | | :disabled="operation!=='add'||dialogForm.ordertype==='PO'" |
| | | @click="mesordertsourcesearchclick" |
| | | /> |
| | | </div> |
| | | </div> |
| | | </el-input> |
| | | </el-form-item> |
| | | <!-- <el-button--> |
| | | <!-- v-waves--> |
| | | <!-- type="primary"--> |
| | | <!-- style="padding: 0 10px;margin-left: -8px;margin-top: 3px"--> |
| | | <!-- class="el-icon-search"--> |
| | | <!-- :disabled="operation!=='add'||dialogForm.ordertype==='PO'"--> |
| | | <!-- @click="mesordertsourcesearchclick"--> |
| | | <!-- />--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | <el-form-item label="工单数量" prop="mesqty"> |
| | | <el-input |
| | | v-model="dialogForm.mesqty" |
| | |
| | | <el-form-item label="产品规格" prop="partspec"> |
| | | <el-input v-model="dialogForm.partspec" disabled style="width: 200px" /> |
| | | </el-form-item> |
| | | <div style="display: flex"> |
| | | <!-- <div style="display: flex">--> |
| | | <el-form-item label="生产车间" prop="wkshopcode"> |
| | | <el-select |
| | | v-model="dialogForm.wkshopcode" |
| | |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <div style="display: flex;flex-wrap: nowrap"> |
| | | |
| | | <!-- <div style="display: flex;flex-wrap: nowrap">--> |
| | | <el-form-item label="工艺路线" prop="routecode"> |
| | | <el-select |
| | | v-model="dialogForm.routecode" |
| | | filterable |
| | | :popper-append-to-body="false" |
| | | style="width: 172px" |
| | | style="width: 200px" |
| | | placeholder="请选择" |
| | | :disabled="dialogForm.wkshopcode===''" |
| | | @change="routecodeChange" |
| | |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-button |
| | | v-waves |
| | | type="primary" |
| | | style="padding: 0 10px;margin-left: -8px;margin-top:3px" |
| | | class="el-icon-search" |
| | | @click="searchClick" |
| | | /> |
| | | <!-- <el-button--> |
| | | <!-- v-waves--> |
| | | <!-- type="primary"--> |
| | | <!-- style="padding: 0 10px;margin-left: -8px;margin-top:3px"--> |
| | | <!-- class="el-icon-search"--> |
| | | <!-- @click="searchClick"--> |
| | | <!-- />--> |
| | | <!-- :disabled="dialogForm.routecode===''"--> |
| | | |
| | | </div> |
| | | </div> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | <el-form-item label="是否排程" prop="isAps"> |
| | | <el-radio-group v-model="dialogForm.isAps" style="width:200px" @change="changeIsAps"> |
| | | <el-radio key="Y" label="Y" value="Y">是</el-radio> |
| | |
| | | |
| | | isLastPrint: false, // 是否是末道打印 |
| | | lastPrintArr: [], // 末道打印的数组(所有) |
| | | lastPrintArrSelected: []// 末道打印的数组(选中) |
| | | lastPrintArrSelected: [], // 末道打印的数组(选中) |
| | | |
| | | switchButton: false |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | }, |
| | | // 行点击事件 |
| | | async rowClick(row, event, column) { |
| | | this.radioSelected = row.wo_code |
| | | const { data: res } = await SearchWorkStep({ wo_code: row.wo_code }) |
| | | this.radioSelected = row.wo_code ? row.wo_code : this.radioSelected |
| | | const { data: res } = await SearchWorkStep({ wo_code: this.radioSelected, storg_code: this.$store.state.settings.orgType === 'W' ? (this.switchButton ? '' : getCookie('stu_torgcode')) : '' }) |
| | | this.tableDataDetail = res |
| | | }, |
| | | // 打印工单 |
| | |
| | | v-for="item in PartSelectArr" |
| | | v-if="dialogForm.suitobject==='P'" |
| | | :key="item.partcode" |
| | | :label="item.partname" |
| | | :label="item.partname+'/'+item.partcode" |
| | | :value="item.partcode" |
| | | /> |
| | | <el-option |
| | |
| | | groupcode: '', // 生产班组 |
| | | username: '', // 操作人员 |
| | | wkshopcode: this.$store.state.settings.orgType === 'W' ? getCookie('stu_torgcode') : '', // 所属车间 |
| | | operdate: '', // 操作时间 |
| | | operdate: [new Date().getFullYear() + '-' + (new Date().getMonth() + 1).toString().padStart( |
| | | 2, '0') + '-01', new Date().toISOString().slice(0, 10)], // 操作时间 |
| | | rejectstepcode: [], // 剔除工序(固定薪资工序不参与计算 |
| | | compute: 'last', // 计件方式 逐道工序:contin 末道工序:last |
| | | prop: 'lm_date', // 排序字段 |
| | |
| | | this.form.stepname = '' |
| | | this.form.groupcode = '' |
| | | this.form.username = '' |
| | | this.form.operdate = '' |
| | | this.form.operdate = [new Date().getFullYear() + '-' + (new Date().getMonth() + 1).toString().padStart( |
| | | 2, '0') + '-01', new Date().toISOString().slice(0, 10)] |
| | | this.form.wkshopcode = this.$store.state.settings.orgType === 'W' ? getCookie('stu_torgcode') : '' // 所属车间 |
| | | this.getGroupSalaryReportSearch() |
| | | }, |
| | |
| | | stepname: '', // 工序名称 |
| | | groupcode: '', // 生产班组 |
| | | reportname: '', // 操作人员 |
| | | reportdate: '', // 操作时间 |
| | | reportdate: [new Date().getFullYear() + '-' + (new Date().getMonth() + 1).toString().padStart( |
| | | 2, '0') + '-01', new Date().toISOString().slice(0, 10)], // 操作时间 |
| | | wkshopcode: this.$store.state.settings.orgType === 'W' ? getCookie('stu_torgcode') : '', // 所属车间 |
| | | rejectstepcode: [], // 剔除工序(固定薪资工序不参与计算 |
| | | compute: 'last', // 计件方式 |
| | |
| | | this.form.stepname = '' |
| | | this.form.groupcode = '' |
| | | this.form.reportname = '' |
| | | this.form.reportdate = '' |
| | | this.form.reportdate = [new Date().getFullYear() + '-' + (new Date().getMonth() + 1).toString().padStart( |
| | | 2, '0') + '-01', new Date().toISOString().slice(0, 10)] |
| | | this.form.wkshopcode = this.$store.state.settings.orgType === 'W' ? getCookie('stu_torgcode') : '' // 所属车间 |
| | | this.getPeopleSalaryReportSearch() |
| | | }, |