| | |
| | | |
| | | <div class="elTableDiv"> |
| | | <el-table |
| | | ref="tableDataRef2" |
| | | :data="tableDataDetail" |
| | | border |
| | | height="210px" |
| | |
| | | :header-cell-style="this.$headerCellStyle" |
| | | :cell-style="this.$cellStyle" |
| | | > |
| | | <!-- <el-table-column--> |
| | | <!-- width="50"--> |
| | | <!-- type="index"--> |
| | | <!-- prop="序号"--> |
| | | <!-- fixed--> |
| | | <!-- /> --> |
| | | <el-table-column |
| | | width="50" |
| | | prop="seq" |
| | | label="序号" |
| | | type="index" |
| | | prop="序号" |
| | | fixed |
| | | /> |
| | | <!-- <el-table-column--> |
| | | <!-- width="50"--> |
| | | <!-- prop="seq"--> |
| | | <!-- label="序号"--> |
| | | <!-- fixed--> |
| | | <!-- />--> |
| | | <el-table-column |
| | | prop="wo_code" |
| | | show-tooltip-when-overflow |
| | |
| | | @click="pre(row,2)" |
| | | /> |
| | | </el-tooltip> |
| | | <!-- <el-tooltip class="item" effect="dark" content="打印工序" placement="top">--> |
| | | <!-- <i--> |
| | | <!-- v-if="tableDataDetail.length!==row.seq"--> |
| | | <!-- class="el-icon-printer"--> |
| | | <!-- :style="{color:$store.state.settings.theme}"--> |
| | | <!-- style="cursor: pointer;margin-right: 15px"--> |
| | | <!-- @click="supplementSmallClick(row)"--> |
| | | <!-- />--> |
| | | <!-- </el-tooltip>--> |
| | | <!-- <el-tooltip class="item" effect="dark" content="补打生产入库条码" placement="top">--> |
| | | <!-- <i--> |
| | | <!-- v-if="tableDataDetail.length===row.seq"--> |
| | | <!-- class=" el-icon-camera"--> |
| | | <!-- :style="{color:$store.state.settings.theme}"--> |
| | | <!-- style="cursor: pointer;margin-right: 15px"--> |
| | | <!-- @click="getProductInHouseLabCode(row.wo_code)"--> |
| | | <!-- />--> |
| | | <!-- </el-tooltip>--> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | v-model="dialogForm.mesqty" |
| | | oninput="value=value.replace(/[^\d]/g,'')" |
| | | style="width: 200px" |
| | | @input="mesqtyInputChange" |
| | | /> |
| | | <!-- oninput="value=value.replace(/[^0-9*.{1}0-9*]/g,'')"--> |
| | | </el-form-item> |
| | |
| | | label="产品名称/编码" |
| | | prop="partcode" |
| | | > |
| | | <el-select |
| | | v-model="dialogForm.partcode" |
| | | filterable |
| | | :disabled="operation!=='add'" |
| | | :popper-append-to-body="false" |
| | | <el-button |
| | | v-waves |
| | | type="primary" |
| | | style="width: 200px" |
| | | placeholder="请选择" |
| | | @change="partcodeChangeDialog" |
| | | > |
| | | <el-option |
| | | v-for="item in partArr" |
| | | :key="item.partcode" |
| | | :label="item.partname+'/'+item.partcode" |
| | | :value="item.partcode" |
| | | /> |
| | | </el-select> |
| | | icon="el-icon-circle-plus-outline" |
| | | @click="selectSuitpart" |
| | | >选择物料</el-button> |
| | | <div v-if="dialogForm.partcode.toString().trim().length>0"> |
| | | 已选择{{ dialogForm.partcode }} {{ dialogForm.partname }} |
| | | </div> |
| | | <!-- <el-select--> |
| | | <!-- v-model="dialogForm.partcode"--> |
| | | <!-- filterable--> |
| | | <!-- :disabled="operation!=='add'"--> |
| | | <!-- :popper-append-to-body="false"--> |
| | | <!-- style="width: 200px"--> |
| | | <!-- placeholder="请选择"--> |
| | | <!-- @change="partcodeChangeDialog"--> |
| | | <!-- >--> |
| | | <!-- <el-option--> |
| | | <!-- v-for="item in partArr"--> |
| | | <!-- :key="item.partcode"--> |
| | | <!-- :label="item.partname+'/'+item.partcode"--> |
| | | <!-- :value="item.partcode"--> |
| | | <!-- />--> |
| | | <!-- </el-select>--> |
| | | </el-form-item> |
| | | <!-- <el-form-item v-if="operation!=='add'" label="产品名称" prop="partname">--> |
| | | <!-- <el-input v-model="dialogForm.partname" disabled style="width: 200px" />--> |
| | |
| | | class="stepSelectedValueClass" |
| | | style="width: 930px;" |
| | | multiple |
| | | filterable |
| | | placeholder="请选择相对应工序" |
| | | @change="stepSelectedValueChange" |
| | | > |
| | |
| | | </div> |
| | | <div |
| | | id="qrCode0" |
| | | :key="formApprove.mesordercode" |
| | | style="width: 22%;height:90px; |
| | | margin-top: 20px; |
| | | overflow-y: scroll;display: flex; |
| | |
| | | width="70" |
| | | align="center" |
| | | /> |
| | | <!-- <el-table-column--> |
| | | <!-- id="column1"--> |
| | | <!-- prop="stepqrcode"--> |
| | | <!-- label="工序二维码"--> |
| | | <!-- width="100"--> |
| | | <!-- align="center"--> |
| | | <!-- >--> |
| | | <!-- <template slot-scope="{row}">--> |
| | | |
| | | <!-- <div :id="'qrCode'+row.seq" :ref="'qrCodeDiv'+row.seq" :key="'qrCodeDiv'+row.seq" class="tableColumn" />--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | | <el-table-column |
| | | id="column1" |
| | | prop="stepqrcode" |
| | | label="工序二维码" |
| | | prop="stepcode" |
| | | label="工序编码" |
| | | width="100" |
| | | align="center" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | |
| | | <div :id="'qrCode'+row.seq" :ref="'qrCodeDiv'+row.seq" :key="'qrCodeDiv'+row.seq" class="tableColumn" /> |
| | | </template> |
| | | </el-table-column> |
| | | /> |
| | | <el-table-column |
| | | id="column2" |
| | | prop="stepname" |
| | | label="工序" |
| | | label="工序名称" |
| | | width="120" |
| | | align="center" |
| | | /> |
| | |
| | | </div> |
| | | <div |
| | | id="qrCode1" |
| | | :key="formApprove.mesordercode" |
| | | style="width: 22%;height:90px; |
| | | margin-top: 20px; |
| | | overflow-y: scroll;display: flex; |
| | |
| | | width="70" |
| | | align="center" |
| | | /> |
| | | <!-- <el-table-column--> |
| | | <!-- id="column1"--> |
| | | <!-- prop="stepqrcode"--> |
| | | <!-- label="工序二维码"--> |
| | | <!-- width="100"--> |
| | | <!-- align="center"--> |
| | | <!-- >--> |
| | | <!-- <template slot-scope="{row}">--> |
| | | |
| | | <!-- <div :id="'qrCode'+row.seq" :ref="'qrCodeDiv'+row.seq" :key="'qrCodeDiv'+row.seq" class="tableColumn" />--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | | <el-table-column |
| | | id="column1" |
| | | prop="stepqrcode" |
| | | label="工序二维码" |
| | | prop="stepcode" |
| | | label="工序编码" |
| | | width="100" |
| | | align="center" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | |
| | | <div :id="'qrCode'+row.seq" :ref="'qrCodeDiv'+row.seq" :key="'qrCodeDiv'+row.seq" class="tableColumn" /> |
| | | </template> |
| | | </el-table-column> |
| | | /> |
| | | <el-table-column |
| | | id="column2" |
| | | prop="stepname" |
| | |
| | | label="产品名称" |
| | | prop="partcode" |
| | | > |
| | | <div style="width: 200px;">{{ partArr.find(item => item.partcode === i.partcode).partname }}</div> |
| | | <div style="width: 200px;">{{ suitobjectTableData.find(item => item.partcode === i.partcode).partname }}</div> |
| | | </el-form-item> |
| | | <el-form-item |
| | | label="产品编码" |
| | |
| | | |
| | | <el-form-item label="产品规格" prop="partspec"> |
| | | <div style="width: 200px;">{{ |
| | | partArr.find(item => item.partcode === i.partcode).partspec ? partArr.find(item => item.partcode === i.partcode).partspec : '/' |
| | | suitobjectTableData.find(item => item.partcode === i.partcode).partspec ? suitobjectTableData.find(item => item.partcode === i.partcode).partspec : '/' |
| | | }} |
| | | </div> |
| | | </el-form-item> |
| | |
| | | class="stepSelectedValueClass" |
| | | style="width: 930px;" |
| | | multiple |
| | | filterable |
| | | placeholder="请选择相对应工序" |
| | | @change="val=>stepSelectedValueChangeBatchUpdate(val,index)" |
| | | > |
| | |
| | | </span> |
| | | </el-dialog> |
| | | |
| | | <!--选择物料--> |
| | | <el-dialog |
| | | v-el-drag-dialog |
| | | :title="dialogForm.suitobject==='P'?'选择物料':'选择物料类别'" |
| | | :visible.sync="dialogVisibleSuitobject" |
| | | width="1460px" |
| | | :close-on-click-modal="false" |
| | | top="5vh" |
| | | @closed="handleCloseSuitobject" |
| | | @close="handleCloseSuitobject" |
| | | > |
| | | |
| | | <div style="display: flex"> |
| | | <div style="width: 300px;margin-right: 20px;background:#fff"> |
| | | |
| | | <div style="margin: 20px 10px 0 10px;display: flex;justify-content: space-between;"> |
| | | <div style="display: flex;"> |
| | | <div |
| | | style="width: 5px;height: 100%;border-radius: 5px;" |
| | | :style="{background:$store.state.settings.theme}" |
| | | /> |
| | | <div style="margin-left: 8px;">存货档案</div> |
| | | </div> |
| | | </div> |
| | | |
| | | <el-tree |
| | | ref="treeLeftRef" |
| | | style="padding: 10px;overflow: auto;height: 600px;" |
| | | :data="treeLeft" |
| | | node-key="code" |
| | | highlight-current |
| | | :props="defaultPropsLeft" |
| | | :default-expand-all="true" |
| | | :expand-on-click-node="false" |
| | | @node-click="getTMaterielData" |
| | | /> |
| | | </div> |
| | | <div |
| | | style=" width:calc(100% - 300px);" |
| | | > |
| | | <div class="bodyTopFormGroup"> |
| | | <el-form |
| | | ref="suitobjectForm" |
| | | :model="suitobjectForm" |
| | | label-width="80px" |
| | | inline |
| | | style="display: flex;" |
| | | > |
| | | <div class="elForm"> |
| | | <el-form-item label="存货编码" style=" display: flex;"> |
| | | <el-input |
| | | v-model="suitobjectForm.partcode" |
| | | placeholder="请输入" |
| | | :style="{minWidth:'100px',width:150+'px'}" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="存货名称" style=" display: flex;"> |
| | | <el-input |
| | | v-model="suitobjectForm.partname" |
| | | placeholder="请输入" |
| | | :style="{minWidth:'100px',width:150+'px'}" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="存货规格" style=" display: flex;"> |
| | | <el-input |
| | | v-model="suitobjectForm.partspec" |
| | | placeholder="请输入" |
| | | :style="{minWidth:'100px',width:150+'px'}" |
| | | /> |
| | | </el-form-item> |
| | | |
| | | </div> |
| | | <div class="bodySearchReset"> |
| | | <el-button |
| | | v-waves |
| | | type="primary" |
| | | icon="el-icon-search" |
| | | @click="getTMaterielData($refs.treeLeftRef.getCurrentNode())" |
| | | >查询 |
| | | </el-button> |
| | | <el-button |
| | | v-waves |
| | | type="info" |
| | | icon="el-icon-refresh" |
| | | @click="resetSuitobject" |
| | | >重置 |
| | | </el-button> |
| | | </div> |
| | | </el-form> |
| | | </div> |
| | | |
| | | <div class="elTableDiv"> |
| | | <el-table |
| | | ref="tableDataRef3" |
| | | class="tableFixed" |
| | | :data="suitobjectTableData" |
| | | height="520" |
| | | border |
| | | row-class-name="custom-row" |
| | | highlight-current-row |
| | | :header-cell-style="this.$headerCellStyle" |
| | | :cell-style="this.$cellStyle" |
| | | row-key="partcode" |
| | | @row-click="rowClick2" |
| | | > |
| | | |
| | | <el-table-column |
| | | width="50" |
| | | fixed |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <el-radio |
| | | v-model="dialogForm.partcode" |
| | | :label="row.partcode" |
| | | style="color: transparent;padding-left: 10px;" |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="rowNum" |
| | | width="70" |
| | | fixed |
| | | label="序号" |
| | | /> |
| | | <el-table-column |
| | | prop="partcode" |
| | | label="存货编码" |
| | | /> |
| | | <el-table-column |
| | | prop="partname" |
| | | label="存货名称" |
| | | show-tooltip-when-overflow |
| | | min-width="200" |
| | | /> |
| | | <el-table-column |
| | | prop="partspec" |
| | | label="规格型号" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | {{ row.partspec ? row.partspec : '/' }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="idinventoryclassname" |
| | | label="所属类别" |
| | | /> |
| | | </el-table> |
| | | </div> |
| | | |
| | | <!--分页--> |
| | | <pagination |
| | | :total="suitobjectTotal" |
| | | :page.sync="suitobjectForm.page" |
| | | :limit.sync="suitobjectForm.rows" |
| | | align="right" |
| | | layout="total,prev, pager, next,sizes,jumper" |
| | | popper-class="select_bottom" |
| | | @pagination="getTMaterielData($refs.treeLeftRef.getCurrentNode())" |
| | | /> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | <span slot="footer" class="dialog-footer"> |
| | | <div class="footerButton"> |
| | | <el-button v-waves @click="dialogVisibleCancelSuitobject">返 回</el-button> |
| | | <el-button |
| | | v-waves |
| | | :loading="$store.state.app.buttonIsDisabled" |
| | | :disabled="$store.state.app.buttonIsDisabled" |
| | | type="primary" |
| | | @click="dialogVisibleConfirmSuitobject" |
| | | >确 认</el-button> |
| | | </div> |
| | | </span> |
| | | </el-dialog> |
| | | |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | MesOrderSearch, MesOrderSopSearch, UpdateMesOrderStepListSearch, |
| | | UpdateMesOrderStepSearch |
| | | } from '@/api/WorkOrder' |
| | | import { PartSelect } from '@/api/ProductModel' |
| | | import { PartSelect, TMaterielClassTree, TMaterielData } from '@/api/ProductModel' |
| | | import { PrentOrganization, PrentOrganizationNoCompany, StepData } from '@/api/GeneralBasicData' |
| | | import Sortable from 'sortablejs' |
| | | import ElDragSelect from '@/components/DragSelect' |
| | |
| | | import DateType from '@/components/DateType' |
| | | import { PartSelectRpute, PartSelectRputeList, RouteSelectStep, RouteSelectStepList } from '@/api/basicSettings' |
| | | import { DeviceSopSearch } from '@/api/DeviceManager' |
| | | import arrayToTree from 'array-to-tree' |
| | | |
| | | export default { |
| | | name: 'WorkOrderList', |
| | |
| | | partCode: '', |
| | | |
| | | dialogVisibleBatchUpdate: false, // 批量修改 |
| | | formData3: [] |
| | | formData3: [], |
| | | |
| | | dialogVisibleSuitobject: false, |
| | | treeLeft: [ |
| | | { |
| | | code: '-1', |
| | | name: '全部' |
| | | } |
| | | ], // 左侧树 |
| | | treeLeftArr: [], |
| | | defaultPropsLeft: { |
| | | children: 'children', |
| | | label: 'name' |
| | | }, |
| | | |
| | | suitobjectTableData: [], |
| | | suitobjectForm: { |
| | | inventoryclasscode: '', |
| | | partcode: '', |
| | | partname: '', |
| | | partspec: '', |
| | | page: 1, |
| | | rows: 20, |
| | | prop: 'lm_date', // 排序字段 |
| | | order: 'desc' // 排序字段 |
| | | }, |
| | | suitobjectTotal: 0 |
| | | |
| | | } |
| | | }, |
| | | watch: { |
| | |
| | | // do something with the new and old value of stepSelectedValue |
| | | console.log(val, 1) |
| | | console.log(this.stepTableData, 3) |
| | | |
| | | const arr = JSON.parse(JSON.stringify(this.stepTableData)) |
| | | console.log(arr, 33, this.dialogForm.mesqty) |
| | | const arrStepcode = arr.map(i => i.stepcode) |
| | | this.stepTableData = [] |
| | | val.forEach(i => { |
| | |
| | | // }) |
| | | }, |
| | | methods: { |
| | | selectSuitpart() { |
| | | this.dialogVisibleSuitobject = true |
| | | this.$nextTick(() => { |
| | | this.$refs.treeLeftRef.setCurrentKey('-1') |
| | | this.getTMaterielData(this.$refs.treeLeftRef.getCurrentNode()) |
| | | }) |
| | | }, |
| | | handleCloseSuitobject() { |
| | | this.suitobjectForm = { |
| | | inventoryclasscode: '', |
| | | partcode: '', |
| | | partname: '', |
| | | partspec: '', |
| | | page: 1, |
| | | rows: 20, |
| | | prop: 'lm_date', // 排序字段 |
| | | order: 'desc' // 排序字段 |
| | | } |
| | | }, |
| | | dialogVisibleCancelSuitobject() { |
| | | this.dialogVisibleSuitobject = false |
| | | }, |
| | | |
| | | dialogVisibleConfirmSuitobject() { |
| | | this.dialogForm.routecode = '' |
| | | |
| | | if (this.mesSetting.route) { |
| | | this.getPartcodeChangeDialog() |
| | | } else { |
| | | this.getBasicProcessData() |
| | | } |
| | | |
| | | this.dialogVisibleSuitobject = false |
| | | }, |
| | | |
| | | rowClick2(row, event, column) { |
| | | this.dialogForm.partcode = row.partcode |
| | | this.dialogForm.partname = this.suitobjectTableData.find(i => i.partcode === row.partcode).partname |
| | | this.dialogForm.partspec = this.suitobjectTableData.find(i => i.partcode === row.partcode).partspec |
| | | }, |
| | | |
| | | resetSuitobject() { |
| | | this.suitobjectForm.inventoryclasscode = '' |
| | | this.suitobjectForm.partcode = '' |
| | | this.suitobjectForm.partname = '' |
| | | this.suitobjectForm.partspec = '' |
| | | this.$refs.treeLeftRef.setCurrentKey('-1') |
| | | this.getTMaterielData(this.$refs.treeLeftRef.getCurrentNode()) |
| | | }, |
| | | async getTMaterielClassTree() { |
| | | const res = await TMaterielClassTree() |
| | | res.data.forEach(i => { |
| | | i.idparent = i.idparent ? i.idparent : '-1' |
| | | }) |
| | | this.treeLeftArr = res.data |
| | | this.treeLeftArr.forEach(e => { |
| | | e.name = e.code + ' ' + e.name |
| | | }) |
| | | this.treeLeft = arrayToTree(this.treeLeft.concat(res.data), { |
| | | parentProperty: 'idparent', |
| | | customID: 'code', |
| | | childrenProperty: 'children' |
| | | }) |
| | | }, |
| | | async getTMaterielData(node) { |
| | | const result = this.getChildrenCodeMethod(node, []) |
| | | if (result.includes('-1')) { |
| | | result.shift() |
| | | } |
| | | this.suitobjectForm.inventoryclasscode = result.join(',') |
| | | const res = await TMaterielData(this.suitobjectForm) |
| | | |
| | | this.suitobjectTableData = res.data |
| | | this.suitobjectTotal = res.count |
| | | |
| | | this.$nextTick(() => { |
| | | this.$refs.tableDataRef3.doLayout() |
| | | }) |
| | | }, |
| | | // 递归取子集的所有code |
| | | getChildrenCodeMethod(node, result) { |
| | | result.push(node.code) |
| | | if (node.children && node.children.length > 0) { |
| | | node.children.forEach(i => { |
| | | this.getChildrenCodeMethod(i, result) |
| | | }) |
| | | } |
| | | return result |
| | | }, |
| | | |
| | | mesqtyInputChange(val) { |
| | | if (this.stepTableData && this.stepTableData.length > 0) { |
| | | this.stepTableData.forEach(i => { |
| | | i.sumqty = Math.floor(parseFloat(val) * (1 + (parseFloat(i.ratio) / 100))) |
| | | }) |
| | | } |
| | | }, |
| | | statusChange(val) { |
| | | this.form.mesorderstus = val |
| | | this.getMesOrderSearch() |
| | |
| | | if (i.stepdata.length > 0) { |
| | | i.stepdata.forEach(j => { |
| | | j.ratio = parseFloat(j.ratio) > 0 ? parseFloat(j.ratio) : 0 |
| | | j.sumqty = Math.round(parseFloat(i.canupdate_qty) * (1 + (parseFloat(j.ratio) > 0 ? parseFloat(j.ratio) / 100 : 0))) |
| | | // j.sumqty = Math.round(parseFloat(i.canupdate_qty) * (1 + (parseFloat(j.ratio) > 0 ? parseFloat(j.ratio) / 100 : 0))) |
| | | j.sumqty = Math.round(parseFloat(this.formData3[index].mesqty) * (1 + (parseFloat(j.ratio) > 0 ? parseFloat(j.ratio) / 100 : 0))) |
| | | }) |
| | | this.formData3[index].stepTableData = i.stepdata |
| | | this.formData3[index].stepSelectedValue = i.stepdata.map(j => j.stepcode) |
| | |
| | | const flag2 = [] |
| | | const data = [] |
| | | this.formData3.forEach((i, index) => { |
| | | const islastreport = this.wkshopcodeArr.find(j => j.torg_code === i.wkshopcode).islastreport |
| | | const workListSub = [] |
| | | if (i.stepTableData.length > 0) { |
| | | i.stepTableData.forEach((it, j) => { |
| | |
| | | isbott: j === 0 ? 'Y' : 'N', |
| | | isend: j === i.stepTableData.length - 1 ? 'Y' : 'N', |
| | | ratio: it.ratio, |
| | | sumqty: it.sumqty |
| | | sumqty: it.sumqty, |
| | | isShow: islastreport === 'N' ? 'Y' : (j === i.stepTableData.length - 1 ? 'Y' : 'N') |
| | | } |
| | | ) |
| | | }) |
| | | console.log(JSON.parse(JSON.stringify(workListSub))) |
| | | |
| | | if (this.mesSetting.isOrder) { |
| | | const f = workListSub.every((item, index, array) => { |
| | |
| | | if (res.code === '200') { |
| | | this.getSelect() |
| | | this.getPrentOrganizationNoCompany() |
| | | this.getTMaterielClassTree() |
| | | } |
| | | }) |
| | | }, |
| | |
| | | }, |
| | | async getSelect() { |
| | | // 获取产品信息 |
| | | const { data: res1 } = await PartSelect() |
| | | this.partArr = res1 |
| | | // const { data: res1 } = await PartSelect() |
| | | // this.partArr = res1 |
| | | |
| | | // 获取组织 |
| | | const { data: res2 } = await PrentOrganization() |
| | |
| | | this.dialogForm.mesmaxqty = res.canupdate_qty |
| | | if (this.mesSetting.route) { // 按工艺路线走模式 |
| | | if (!this.dialogForm.routecode) { |
| | | return this.$message.error('请先将产品绑定工艺路线!') |
| | | } |
| | | if (!this.dialogForm.routecode) { |
| | | await this.getPartcodeChangeDialog() |
| | | } else { |
| | | const { data: res } = await PartSelectRpute({ partcode: this.dialogForm.partcode }) |
| | |
| | | stepname: i.stepname, |
| | | stepprice: i.stepprice, |
| | | ratio: parseFloat(i.ratio) > 0 ? parseFloat(i.ratio) : 0, |
| | | sumqty: Math.round(parseFloat(res.canupdate_qty) * (1 + (parseFloat(i.ratio) > 0 ? parseFloat(i.ratio) / 100 : 0))) |
| | | // sumqty: Math.round(parseFloat(res.canupdate_qty) * (1 + (parseFloat(i.ratio) > 0 ? parseFloat(i.ratio) / 100 : 0))) |
| | | sumqty: Math.round(parseFloat(this.dialogForm.mesqty) * (1 + (parseFloat(i.ratio) > 0 ? parseFloat(i.ratio) / 100 : 0))) |
| | | } |
| | | ) |
| | | }) |
| | |
| | | stepname: i.stepname, |
| | | stepprice: i.stepprice, |
| | | ratio: parseFloat(i.ratio) > 0 ? parseFloat(i.ratio) : 0, |
| | | sumqty: Math.round(parseFloat(res.canupdate_qty) * (1 + (parseFloat(i.ratio) > 0 ? parseFloat(i.ratio) / 100 : 0))) |
| | | // sumqty: Math.round(parseFloat(res.canupdate_qty) * (1 + (parseFloat(i.ratio) > 0 ? parseFloat(i.ratio) / 100 : 0))) |
| | | sumqty: Math.round(parseFloat(this.dialogForm.mesqty) * (1 + (parseFloat(i.ratio) > 0 ? parseFloat(i.ratio) / 100 : 0))) |
| | | } |
| | | ) |
| | | }) |
| | |
| | | this.routecodeArr = res |
| | | |
| | | // if (this.mesSetting.route) { // 按工艺路线走模式 |
| | | this.dialogForm.routecode = this.partArr.find(item => item.partcode === this.dialogForm.partcode).default_route |
| | | this.dialogForm.routecode = this.suitobjectTableData.find(item => item.partcode === this.dialogForm.partcode).default_route |
| | | if (this.dialogForm.routecode && !this.sourceType) { |
| | | await this.routecodeChange() |
| | | } else { |
| | |
| | | if (this.mesSetting.route && !this.dialogForm.routecode) { |
| | | return this.$message.error('请选择工艺路线!') |
| | | } |
| | | |
| | | const islastreport = this.wkshopcodeArr.find(i => i.torg_code === this.dialogForm.wkshopcode).islastreport |
| | | |
| | | // console.log(islastreport === 'N', islastreport) |
| | | const workListSub = [] |
| | | this.stepTableData.forEach((i, j) => { |
| | | workListSub.push( |
| | |
| | | isbott: j === 0 ? 'Y' : 'N', |
| | | isend: j === this.stepTableData.length - 1 ? 'Y' : 'N', |
| | | ratio: i.ratio, |
| | | sumqty: i.sumqty |
| | | sumqty: i.sumqty, |
| | | isShow: islastreport === 'N' ? 'Y' : (j === this.stepTableData.length - 1 ? 'Y' : 'N') |
| | | } |
| | | ) |
| | | }) |
| | |
| | | return this.$message.error('有序报工情况下,超报比例后道工序不能大于前道工序!') |
| | | } |
| | | } |
| | | console.log(isNaN(this.dialogForm.mesqty - this.dialogForm.mesqtyinit)) |
| | | // console.log(isNaN(this.dialogForm.mesqty - this.dialogForm.mesqtyinit)) |
| | | const data = { |
| | | wostatus: this.dialogForm.mesorderstus, // 工单状态 |
| | | wocode: this.dialogForm.mesordercode, // 工单号 |
| | |
| | | routecode: this.dialogForm.routecode, |
| | | workListSub |
| | | } |
| | | |
| | | // console.log(JSON.parse(JSON.stringify(data))) |
| | | |
| | | this.$store.state.app.buttonIsDisabled = true |
| | | AddUpdateMesOrder(data, this.operation === 'add' ? 'Add' : 'Update').then(res => { |
| | |
| | | } |
| | | this.isIpad = window.innerHeight < 769 && window.innerWidth < 1367 |
| | | this.$refs.tableDataRef.doLayout() |
| | | this.$refs.tableDataRef2.doLayout() |
| | | }) |
| | | }, |
| | | // 工艺路线放大镜点击 |
| | |
| | | MesOrderPrintSearch(data2).then(res2 => { |
| | | if (res2.code === '200') { |
| | | this.dialogVisibleApprove = true |
| | | let res3 = [] |
| | | if (row.islastreport === 'Y') { |
| | | res3 = res2.data.recordset.filter(i => i.isshow === 'Y') |
| | | } else { |
| | | res3 = res2.data.recordset |
| | | } |
| | | |
| | | const res3 = res2.data.recordset |
| | | console.log(JSON.parse(JSON.stringify(res2.data.recordset))) |
| | | |
| | | // this.tableDataPrint = res3 |
| | | this.tableDataPrint = this.chunkArray(res3, 8) |
| | | this.tableDataPrint = this.chunkArray(res3, 15) |
| | | |
| | | this.formApprove.mesordercode = res3[0].wo_code |
| | | this.formApprove.m_po = res3[0].m_po || '/' |
| | |
| | | correctLevel: QRCode.CorrectLevel.L// 容错率,L/M/H |
| | | }) |
| | | } else { |
| | | new QRCode(this.$refs['qrCodeDiv' + seq], { |
| | | text: text, |
| | | width: size === 'big' ? 90 : 60, |
| | | height: size === 'big' ? 90 : 60, |
| | | // colorDark: '#333333', // 二维码颜色 |
| | | colorDark: '#000', // 二维码颜色 |
| | | colorLight: '#ffffff', // 二维码背景色 |
| | | correctLevel: QRCode.CorrectLevel.L// 容错率,L/M/H |
| | | }) |
| | | // new QRCode(this.$refs['qrCodeDiv' + seq], { |
| | | // text: text, |
| | | // width: size === 'big' ? 90 : 60, |
| | | // height: size === 'big' ? 90 : 60, |
| | | // // colorDark: '#333333', // 二维码颜色 |
| | | // colorDark: '#000', // 二维码颜色 |
| | | // colorLight: '#ffffff', // 二维码背景色 |
| | | // correctLevel: QRCode.CorrectLevel.L// 容错率,L/M/H |
| | | // }) |
| | | } |
| | | }, |
| | | |
| | |
| | | } |
| | | const { data: res } = await UpdateMesOrderStepSearch(data) |
| | | this.tableDataDetail = res.stepdata |
| | | // if (row.islastreport === 'Y') { |
| | | // this.tableDataDetail = res.stepdata.filter(i => i.isend === 'Y') |
| | | // } else { |
| | | // this.tableDataDetail = res.stepdata |
| | | // } |
| | | }, |
| | | // 工序删除 |
| | | stepDel(row) { |
| | |
| | | getSummaries(param) { |
| | | const { columns, data } = param |
| | | const sums = [] |
| | | const i = 9 |
| | | const i = 11 |
| | | columns.forEach((column, index) => { |
| | | if (index === i) { |
| | | sums[index] = '总数' |
| | |
| | | |
| | | this.$nextTick(() => { |
| | | this.$refs.tableDataRef.doLayout() |
| | | this.$refs.tableDataRef2.doLayout() |
| | | }) |
| | | return sums |
| | | } |
| | |
| | | $main_color: #42b983; |
| | | |
| | | .stepSelectedValueClass { |
| | | ::v-deep input { |
| | | //min-height: 34px !important; |
| | | height: 68px !important; |
| | | //::v-deep input { |
| | | // //min-height: 34px !important; |
| | | // height: 98px !important; |
| | | //} |
| | | |
| | | ::v-deep .el-input__inner{ |
| | | height: 120px!important; |
| | | } |
| | | |
| | | ::v-deep .el-select__tags>span{ |
| | | display: flex ; |
| | | align-items: center; |
| | | justify-content: flex-start; |
| | | flex-wrap: wrap; |
| | | } |
| | | |
| | | } |
| | | |
| | | .dialogVisibleRoute { |