| | |
| | | v-model="radioSelected" |
| | | :label="row.wo_code" |
| | | style="color: transparent;padding-left: 10px;" |
| | | @change.native="getCurrentRow(row.wo_code)" |
| | | /> |
| | | <!-- @change.native="getCurrentRow(row.wo_code)"--> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | |
| | | label="源单单号" |
| | | sortable="custom" |
| | | min-width="160" |
| | | /> |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.m_po">{{ row.m_po }}</div> |
| | | <div v-else>/</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="wotype" |
| | | label="单据类型" |
| | |
| | | <template slot-scope="{row}"> |
| | | <div class="operationClass"> |
| | | <el-tooltip class="item" effect="dark" content="打印工单" placement="top"> |
| | | <!-- <i--> |
| | | <!-- class="el-icon-tickets"--> |
| | | <!-- style="cursor: pointer;color: #42b983;margin-right: 15px"--> |
| | | <!-- @click="check(row)"--> |
| | | <!-- />--> |
| | | <i |
| | | class="el-icon-tickets" |
| | | style="cursor: pointer;color: #42b983;margin-right: 15px" |
| | |
| | | style="cursor: pointer;color: #42b983;margin-right: 15px" |
| | | @click="supplementSmallClick(row)" |
| | | /> |
| | | </el-tooltip> |
| | | <el-tooltip v-del-tab-index class="item" effect="dark" content="预览" placement="top"> |
| | | <i class="el-icon-files" style="cursor: pointer;color:#42b983;" @click="check(row)" /> |
| | | </el-tooltip> |
| | | </div> |
| | | </template> |
| | |
| | | style="width: 200px;" |
| | | placeholder="请选择" |
| | | :disabled="dialogForm.routecode===''" |
| | | @change="wkshopcodeChange" |
| | | > |
| | | <el-option |
| | | v-for="item in wkshopArr" |
| | |
| | | v-model="dialogForm.planstartdate" |
| | | type="date" |
| | | :clearable="false" |
| | | :picker-options="pickerOptions" |
| | | value-format="yyyy-MM-dd" |
| | | style="width: 200px" |
| | | placeholder="选择日期" |
| | |
| | | v-model="dialogForm.planenddate" |
| | | type="date" |
| | | :clearable="false" |
| | | :picker-options="pickerOptions" |
| | | value-format="yyyy-MM-dd" |
| | | style="width: 200px" |
| | | placeholder="选择日期" |
| | |
| | | <el-button @click="dialogVisibleCancel">取 消</el-button> |
| | | <!-- <el-button v-if="operation==='add'" type="primary" @click="dialogVisibleConfirmPreview('add')">预览</el-button>--> |
| | | <el-button |
| | | v-if="!sumbitBottonIsDisabled" |
| | | v-waves |
| | | type="primary" |
| | | :loading="$store.state.app.buttonIsDisabled" |
| | | :disabled="$store.state.app.buttonIsDisabled" |
| | | @click="dialogVisibleConfirm" |
| | | >确 定</el-button> |
| | | |
| | | <el-button |
| | | v-if="sumbitBottonIsDisabled" |
| | | v-waves |
| | | type="primary" |
| | | disabled |
| | | @click="dialogVisibleConfirm" |
| | | >确 定</el-button> |
| | | </div> |
| | |
| | | </span> |
| | | </el-dialog> |
| | | |
| | | <el-dialog |
| | | title="文件预览" |
| | | :visible.sync="dialogVisibleCheck" |
| | | width="800px" |
| | | :close-on-click-modal="false" |
| | | top="15vh" |
| | | @closed="handleCloseCheck" |
| | | @close="handleCloseCheck" |
| | | > |
| | | <el-form label-width="80px"> |
| | | <el-form-item label="文件版本"> |
| | | <el-select |
| | | v-model="sopSelectValue" |
| | | style="width: 200px" |
| | | placeholder="请选择" |
| | | filterable |
| | | :popper-append-to-body="false" |
| | | > |
| | | <el-option |
| | | v-for="item in sopSelectArr" |
| | | :key="item.id" |
| | | :label="item.define_name" |
| | | :value="item.id" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | |
| | | </el-form> |
| | | |
| | | <span slot="footer" class="dialog-footer"> |
| | | <div class="footerButton"> |
| | | <el-button @click="dialogVisibleCancelCheck">返 回</el-button> |
| | | <el-button |
| | | type="primary" |
| | | @click="dialogVisibleConfirmCheck" |
| | | >预 览</el-button> |
| | | </div> |
| | | </span> |
| | | </el-dialog> |
| | | |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | AddUpdateMesOrder, |
| | | ClosedMesOrder, |
| | | DeleteMesOrder, ErpOrderSearch, |
| | | MesOrderSearch, PartSelectRoute, RouteSelectWkshop, SearchWorkStep, |
| | | MesOrderSearch, PartSelectRoute, RouteSelectWkshop, SearchWorkStep, SearchWorkStepSopList, SelectRouteOrWkshop, |
| | | SelectRouteStep |
| | | } from '@/api/scgl' |
| | | import { InventoryFileAssociationRoute, PartSelect, SaveInventoryFile } from '@/api/zzmx' |
| | |
| | | import { urlAddRandomNo, webapp_ws_ajax_run, webapp_ws_autoupdate } from '@/utils/grwebapp' |
| | | import QRCode from 'qrcodejs2' |
| | | import $ from 'jquery' |
| | | import { SystemSopView } from '@/api/xtsz' |
| | | |
| | | export default { |
| | | name: 'GD', |
| | |
| | | // { code: 3, name: '50*40' }, |
| | | // { code: 4, name: '50*80' }, |
| | | // { code: 5, name: '40*30' } |
| | | ] |
| | | ], |
| | | pickerOptions: { |
| | | disabledDate(time) { |
| | | return time.getTime() < Date.now() - 8.64e7 |
| | | } |
| | | }, |
| | | /* 文件预览部分*/ |
| | | dialogVisibleCheck: false, |
| | | sopSelectArr: [], // sop下拉选项数组 |
| | | sopSelectValue: '', // sop下拉选中值 |
| | | |
| | | sumbitBottonIsDisabled: false |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | getCurrentRow(wo_code) { |
| | | this.radioSelected = wo_code |
| | | }, |
| | | // 生产车间值改变时 |
| | | wkshopcodeChange(val) { |
| | | const data = { |
| | | partcode: this.dialogForm.partcode, |
| | | routecode: this.dialogForm.routecode, |
| | | wkshopcode: val |
| | | } |
| | | SelectRouteOrWkshop(data).then((res) => { |
| | | // console.log(res, 1) |
| | | }).catch(err => { |
| | | // console.log(err, 2) |
| | | this.sumbitBottonIsDisabled = true |
| | | }) |
| | | }, |
| | | // 新增按钮 |
| | | async add(operation) { |
| | | this.operation = operation |
| | |
| | | } |
| | | |
| | | this.dialogForm.wkshopcode = '' |
| | | |
| | | this.sumbitBottonIsDisabled = false |
| | | }, |
| | | // 工艺路线值改变 |
| | | async routecodeChange(val) { |
| | |
| | | this.wkshopArr = res2 |
| | | this.dialogForm.wkshopcode = '' |
| | | }, |
| | | // 工序任务 |
| | | // 预览 |
| | | async check(row) { |
| | | const { data: res } = await SearchWorkStep({ wo_code: row.wo_code }) |
| | | this.taskTableData = res |
| | | |
| | | if (this.taskTableData.length === 0) { |
| | | return this.$message.info('无生产任务数据!') |
| | | this.dialogVisibleCheck = true |
| | | const data = { |
| | | partcode: row.partcode, |
| | | routecode: this.tableData.find(i => i.wo_code === this.radioSelected).route_code, |
| | | stepcode: row.stepcode |
| | | } |
| | | this.dialogForm.mesordercode = res[0].wo_code |
| | | this.dialogVisibleTask = true |
| | | const { data: res } = await SearchWorkStepSopList(data) |
| | | this.sopSelectArr = res |
| | | this.sopSelectValue = res[0].id |
| | | }, |
| | | // 预览关闭 |
| | | handleCloseCheck() { |
| | | this.sopSelectValue = '' |
| | | }, |
| | | // 预览返回 |
| | | dialogVisibleCancelCheck() { |
| | | this.dialogVisibleCheck = false |
| | | }, |
| | | // 预览新开浏览器页签 |
| | | async dialogVisibleConfirmCheck() { |
| | | const { data: res } = await SystemSopView({ id: this.sopSelectValue, filepath: this.sopSelectArr.find(i => i.id === this.sopSelectValue).file_path }) |
| | | window.open(res) |
| | | }, |
| | | |
| | | dialogVisibleBack() { |
| | | this.dialogVisibleTask = false |
| | | }, |
| | |
| | | }).then(() => { |
| | | console.log(row, 1) |
| | | const data = { |
| | | souceid: row.sourceid, |
| | | souceid: row.sourceid ? row.sourceid : '', |
| | | wocode: row.wo_code, |
| | | m_po: row.m_po, |
| | | orderqty: row.plan_qty |
| | |
| | | this.dialogForm.orderlev = '' // 工单等级 |
| | | |
| | | this.$refs.dialogForm.clearValidate() |
| | | this.sumbitBottonIsDisabled = false |
| | | }, |
| | | // 对话框取消 |
| | | dialogVisibleCancel() { |
| | |
| | | // div.scrollTop = div.scrollHeight // 滚动条位于最底部 |
| | | div.scrollTop = 0 // 滚动条位于最顶部 |
| | | }) |
| | | this.dialogVisibleApprove = true |
| | | } |
| | | }) |
| | | this.dialogVisibleApprove = true |
| | | }, |
| | | dialogVisibleTaskClose() { |
| | | this.dialogForm.mesordercode = '' |
| | |
| | | async rowClick(row, event, column) { |
| | | console.log(row, event, column) |
| | | console.log(row.wo_code, event, column) |
| | | this.radioSelected = row.wo_code |
| | | const { data: res } = await SearchWorkStep({ wo_code: row.wo_code }) |
| | | this.tableDataDetail = res |
| | | }, |