| | |
| | | > |
| | | <div style="font-weight: bolder;">订单状态</div> |
| | | <div class="statusItem" :class="{statusItemLight:form.erporderstus===''}" @click="statusChange('')">全部</div> |
| | | <div class="statusItem" :class="{statusItemLight:form.erporderstus==='NEW'}" @click="statusChange('NEW')">新订单</div> |
| | | <div class="statusItem" :class="{statusItemLight:form.erporderstus==='CREATING'}" @click="statusChange('CREATING')">部分下达</div> |
| | | <div class="statusItem" :class="{statusItemLight:form.erporderstus==='CREATED'}" @click="statusChange('CREATED')">全部下达</div> |
| | | <div class="statusItem" :class="{statusItemLight:form.erporderstus==='CLOSED'}" @click="statusChange('CLOSED')">已关闭</div> |
| | | <div class="statusItem" :class="{statusItemLight:form.erporderstus==='NEW'}" @click="statusChange('NEW')">新订单 |
| | | </div> |
| | | <div class="statusItem" :class="{statusItemLight:form.erporderstus==='CREATING'}" |
| | | @click="statusChange('CREATING')">部分下达 |
| | | </div> |
| | | <div class="statusItem" :class="{statusItemLight:form.erporderstus==='CREATED'}" |
| | | @click="statusChange('CREATED')">全部下达 |
| | | </div> |
| | | <div class="statusItem" :class="{statusItemLight:form.erporderstus==='CLOSED'}" @click="statusChange('CLOSED')"> |
| | | 已关闭 |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="bodyTopButtonGroup" style="justify-content: space-between;margin-top: 5px;"> |
| | |
| | | <el-table-column |
| | | show-tooltip-when-overflow |
| | | prop="saleOrderCode" |
| | | label="销售订单" |
| | | label="销售订单/预测单" |
| | | sortable="custom" |
| | | width="150" |
| | | > |
| | |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.partspec">{{ row.partspec }}</div> |
| | | <div v-else>/</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="TopInventoryCode" |
| | | label="顶级物料编码" |
| | | sortable="custom" |
| | | show-tooltip-when-overflow |
| | | min-width="130" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.TopInventoryCode">{{ row.TopInventoryCode }}</div> |
| | | <div v-else>/</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="TopInventoryName" |
| | | label="顶级物料名称" |
| | | sortable="custom" |
| | | show-tooltip-when-overflow |
| | | min-width="130" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.TopInventoryName">{{ row.TopInventoryName }}</div> |
| | | <div v-else>/</div> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | @click="edit('edit',row)" |
| | | /> |
| | | </el-tooltip> |
| | | <el-tooltip v-del-tab-index class="item" effect="dark" content="订单关闭" placement="top"> |
| | | <el-tooltip v-del-tab-index class="item" effect="dark" :content="row.status!=='CLOSED'?'订单关闭':'订单启动'" placement="top"> |
| | | <i |
| | | v-if="row.status!=='CLOSED'" |
| | | class="el-icon-switch-button" |
| | | :style="{color:'red'}" |
| | | style="cursor: pointer;margin-left: 15px" |
| | | @click="orderClose(row)" |
| | | /> |
| | | |
| | | <i |
| | | v-if="row.status==='CLOSED'" |
| | | class="el-icon-thumb" |
| | | :style="{color:$store.state.settings.theme}" |
| | | style="cursor: pointer;margin-left: 15px" |
| | | @click="orderClose(row.id)" |
| | | @click="orderOpen(row)" |
| | | /> |
| | | </el-tooltip> |
| | | |
| | |
| | | <el-form-item label="产品规格" prop="partspec"> |
| | | <el-input v-model="dialogForm.partspec" disabled style="width: 200px" /> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="顶级物料编码" prop="TopInventoryCode"> |
| | | <el-input v-model="dialogForm.TopInventoryCode" disabled style="width: 200px"/> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="顶级物料名称" prop="TopInventoryName"> |
| | | <el-input v-model="dialogForm.TopInventoryName" disabled style="width: 200px"/> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="生产车间" prop="wkshopname"> |
| | | <el-input v-model="dialogForm.wkshopname" disabled style="width: 200px" /> |
| | | </el-form-item> |
| | |
| | | DeleteErpOrder, |
| | | ErpOrderSearch, |
| | | MarkBatchSaveErpOrder, |
| | | MarkSaveErpOrder |
| | | MarkSaveErpOrder, ReverseClosedErpOrder |
| | | } from '@/api/WorkOrder' |
| | | import { SeaveSearchErpOrder } from '@/api/ErpSyncMes' |
| | | import { PrentOrganizationNoCompany } from '@/api/GeneralBasicData' |
| | |
| | | markqty: '', // 下单数量 |
| | | ordernum: '', // 下单单数 |
| | | relse_qty: '', // 已下单数量 |
| | | |
| | | idTopInventory: '', // 顶级物料id |
| | | TopInventoryCode: '', // 顶级物料编码 |
| | | TopInventoryName: '', // 顶级物料名称 |
| | | |
| | | clerkuser: '', // 销售业务员 |
| | | |
| | |
| | | }) |
| | | }, |
| | | // 订单关闭 |
| | | async orderClose(id) { |
| | | this.tableData.forEach(item => { |
| | | if (item.id === id) { |
| | | if (item.status !== 'NEW') { |
| | | async orderClose(row) { |
| | | if (row.status !== 'NEW') { |
| | | return this.$message.info('此订单非新订单,无法关闭!') |
| | | } else { |
| | | this.$confirm('是否确认关闭订单?', '提示', { |
| | |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | ClosedErpOrder({ erpordercode: item.wo, erporderid: id }).then(res => { |
| | | ClosedErpOrder({erpordercode: row.wo, erporderid: row.id}).then(res => { |
| | | if (res.code === '200') { |
| | | this.$message.success('订单关闭成功!') |
| | | this.getErpOrderSearch() |
| | |
| | | this.$message.info('已取消关闭!') |
| | | }) |
| | | } |
| | | }, |
| | | // 订单开启 |
| | | async orderOpen(row) { |
| | | this.$confirm('是否确认启动订单,该订单下的所有工单将会开启!', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | ReverseClosedErpOrder({erpordercode: row.wo, erporderid: row.id}).then(res => { |
| | | if (res.code === '200') { |
| | | this.$message.success('订单启动成功!') |
| | | this.getErpOrderSearch() |
| | | } |
| | | }) |
| | | }).catch(() => { |
| | | this.$message.info('已取消关闭!') |
| | | }) |
| | | }, |
| | | batchHandle() { |
| | |
| | | this.dialogForm.markqty = parseFloat(row.qty) - parseFloat(row.relse_qty) |
| | | this.dialogForm.ordernum = 1 |
| | | this.dialogForm.relse_qty = row.relse_qty |
| | | |
| | | this.dialogForm.idTopInventory = row.idTopInventory |
| | | this.dialogForm.TopInventoryCode = row.TopInventoryCode |
| | | this.dialogForm.TopInventoryName = row.TopInventoryName |
| | | |
| | | this.dialogForm.clerkuser = row.clerkuser |
| | | |
| | | this.dialogForm.paystartdate = row.planstartdate |
| | |
| | | markqty: '', // 下单数量 |
| | | ordernum: '', // 下单单数 |
| | | relse_qty: '', // 已下单数量 |
| | | |
| | | idTopInventory: '', // 顶级物料id |
| | | TopInventoryCode: '', // 顶级物料编码 |
| | | TopInventoryName: '', // 顶级物料名称 |
| | | |
| | | payenddate: '', // 预计完工日期 |
| | | paystartdate: '', // 预计开工日期 |
| | |
| | | 'partcode': this.dialogForm.partcode, |
| | | 'wkshopcode': this.dialogForm.wkshopcode, |
| | | 'warehousecode': this.dialogForm.warehousecode, |
| | | |
| | | 'idTopInventory': this.dialogForm.idTopInventory, |
| | | 'TopInventoryCode': this.dialogForm.TopInventoryCode, |
| | | 'TopInventoryName': this.dialogForm.TopInventoryName, |
| | | |
| | | 'clerkuser': this.dialogForm.clerkuser, |
| | | 'erpqty': this.dialogForm.erpqty, |
| | | 'markqty': this.dialogForm.markqty, |
| | |
| | | cursor: pointer; |
| | | color: #a7a7a7; |
| | | } |
| | | |
| | | .statusItemLight{ |
| | | font-weight: bolder; |
| | | color: #42b983; |