| | |
| | | > |
| | | <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-select |
| | | v-model="form.wkshopcode" |
| | | filterable |
| | | multiple |
| | | collapse-tags |
| | | :popper-append-to-body="false" |
| | | style="width: 200px" |
| | | placeholder="请选择" |
| | |
| | | <el-table-column |
| | | show-tooltip-when-overflow |
| | | prop="saleOrderCode" |
| | | label="销售订单" |
| | | label="销售订单/预测单" |
| | | sortable="custom" |
| | | width="150" |
| | | > |
| | |
| | | </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> |
| | | <el-table-column |
| | | prop="qty" |
| | | label="订单数量" |
| | | width="150" |
| | |
| | | width="150" |
| | | sortable="custom" |
| | | /> |
| | | <!-- <el-table-column--> |
| | | <!-- prop="priuserdefnvc1"--> |
| | | <!-- label="客户名称"--> |
| | | <!-- width="110"--> |
| | | <!-- sortable="custom"--> |
| | | <!-- >--> |
| | | <!-- <template slot-scope="{row}">--> |
| | | <!-- {{ row.priuserdefnvc1 ? row.priuserdefnvc1 : '/' }}--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | | <!-- <el-table-column--> |
| | | <!-- prop="priuserdefnvc6"--> |
| | | <!-- label="客户编码"--> |
| | | <!-- width="110"--> |
| | | <!-- sortable="custom"--> |
| | | <!-- >--> |
| | | <!-- <template slot-scope="{row}">--> |
| | | <!-- {{ row.priuserdefnvc6 ? row.priuserdefnvc6 : '/' }}--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | | <!-- <el-table-column--> |
| | | <!-- prop="priuserdefnvc2"--> |
| | | <!-- label="对内名称"--> |
| | | <!-- width="110"--> |
| | | <!-- sortable="custom"--> |
| | | <!-- >--> |
| | | <!-- <template slot-scope="{row}">--> |
| | | <!-- {{ row.priuserdefnvc2 ? row.priuserdefnvc2 : '/' }}--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | | <!-- <el-table-column--> |
| | | <!-- prop="priuserdefnvc3"--> |
| | | <!-- label="CTP日期"--> |
| | | <!-- width="110"--> |
| | | <!-- sortable="custom"--> |
| | | <!-- >--> |
| | | <!-- <template slot-scope="{row}">--> |
| | | <!-- {{ row.priuserdefnvc3 ? row.priuserdefnvc3 : '/' }}--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | | <!-- <el-table-column--> |
| | | <!-- prop="priuserdefnvc4"--> |
| | | <!-- label="钢刀编号"--> |
| | | <!-- width="110"--> |
| | | <!-- sortable="custom"--> |
| | | <!-- >--> |
| | | <!-- <template slot-scope="{row}">--> |
| | | <!-- {{ row.priuserdefnvc4 ? row.priuserdefnvc4 : '/' }}--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | | <!-- <el-table-column--> |
| | | <!-- prop="priuserdefnvc5"--> |
| | | <!-- label="盒型"--> |
| | | <!-- width="110"--> |
| | | <!-- sortable="custom"--> |
| | | <!-- >--> |
| | | <!-- <template slot-scope="{row}">--> |
| | | <!-- {{ row.priuserdefnvc5 ? row.priuserdefnvc5 : '/' }}--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | | <!-- <el-table-column--> |
| | | <!-- prop="priuserdefnvc1"--> |
| | | <!-- label="客户名称"--> |
| | | <!-- width="110"--> |
| | | <!-- sortable="custom"--> |
| | | <!-- >--> |
| | | <!-- <template slot-scope="{row}">--> |
| | | <!-- {{ row.priuserdefnvc1 ? row.priuserdefnvc1 : '/' }}--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | | <!-- <el-table-column--> |
| | | <!-- prop="priuserdefnvc6"--> |
| | | <!-- label="客户编码"--> |
| | | <!-- width="110"--> |
| | | <!-- sortable="custom"--> |
| | | <!-- >--> |
| | | <!-- <template slot-scope="{row}">--> |
| | | <!-- {{ row.priuserdefnvc6 ? row.priuserdefnvc6 : '/' }}--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | | <!-- <el-table-column--> |
| | | <!-- prop="priuserdefnvc2"--> |
| | | <!-- label="对内名称"--> |
| | | <!-- width="110"--> |
| | | <!-- sortable="custom"--> |
| | | <!-- >--> |
| | | <!-- <template slot-scope="{row}">--> |
| | | <!-- {{ row.priuserdefnvc2 ? row.priuserdefnvc2 : '/' }}--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | | <!-- <el-table-column--> |
| | | <!-- prop="priuserdefnvc3"--> |
| | | <!-- label="CTP日期"--> |
| | | <!-- width="110"--> |
| | | <!-- sortable="custom"--> |
| | | <!-- >--> |
| | | <!-- <template slot-scope="{row}">--> |
| | | <!-- {{ row.priuserdefnvc3 ? row.priuserdefnvc3 : '/' }}--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | | <!-- <el-table-column--> |
| | | <!-- prop="priuserdefnvc4"--> |
| | | <!-- label="钢刀编号"--> |
| | | <!-- width="110"--> |
| | | <!-- sortable="custom"--> |
| | | <!-- >--> |
| | | <!-- <template slot-scope="{row}">--> |
| | | <!-- {{ row.priuserdefnvc4 ? row.priuserdefnvc4 : '/' }}--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | | <!-- <el-table-column--> |
| | | <!-- prop="priuserdefnvc5"--> |
| | | <!-- label="盒型"--> |
| | | <!-- width="110"--> |
| | | <!-- sortable="custom"--> |
| | | <!-- >--> |
| | | <!-- <template slot-scope="{row}">--> |
| | | <!-- {{ row.priuserdefnvc5 ? row.priuserdefnvc5 : '/' }}--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | | <el-table-column |
| | | prop="clerkuser" |
| | | label="销售业务员" |
| | |
| | | @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> |
| | |
| | | v-model="dialogForm.ordernum" |
| | | oninput="value=value.replace(/[^0-9.]/g,'')" |
| | | style="width: 200px" |
| | | disabled |
| | | /> |
| | | </el-form-item> |
| | | |
| | |
| | | DeleteErpOrder, |
| | | ErpOrderSearch, |
| | | MarkBatchSaveErpOrder, |
| | | MarkSaveErpOrder |
| | | MarkSaveErpOrder, ReverseClosedErpOrder |
| | | } from '@/api/WorkOrder' |
| | | import { SeaveSearchErpOrder } from '@/api/ErpSyncMes' |
| | | import { PrentOrganizationNoCompany } from '@/api/GeneralBasicData' |
| | |
| | | mainHeight: 0, |
| | | tableHeight: 0, |
| | | form: { |
| | | wkshopcode: '', // 车间编码 |
| | | wkshopcode: [], // 车间编码 |
| | | erporderstus: '', // 订单状态码 |
| | | erpordercode: '', // 订单编号 |
| | | partcode: '', // 产品编码 |
| | |
| | | ordernum: '', // 下单单数 |
| | | relse_qty: '', // 已下单数量 |
| | | |
| | | idTopInventory: '', // 顶级物料id |
| | | TopInventoryCode: '', // 顶级物料编码 |
| | | TopInventoryName: '', // 顶级物料名称 |
| | | |
| | | clerkuser: '', // 销售业务员 |
| | | |
| | | saleOrderDeliveryDate: '', // 预计交付日期 |
| | | |
| | | deptcode: '', |
| | | |
| | | paystartdate: '', // 预计开工日期 |
| | | payenddate: ''// 预计完工日期 |
| | |
| | | const data = { |
| | | |
| | | erporderstus: this.form.erporderstus, // 订单状态码 |
| | | wkshopcode: this.form.wkshopcode, // 车间编码 |
| | | wkshopcode: this.form.wkshopcode.join(','), // 车间编码 |
| | | erpordercode: this.form.erpordercode, // 订单编号 |
| | | saleordercode: this.form.saleordercode, // 销售单号 |
| | | |
| | |
| | | }, |
| | | // 重置 |
| | | reset() { |
| | | this.form.wkshopcode = '' |
| | | this.form.wkshopcode = [] |
| | | this.form.erporderstus = '' |
| | | this.form.erpordercode = '' |
| | | this.form.partcode = '' |
| | |
| | | }) |
| | | }, |
| | | // 订单关闭 |
| | | async orderClose(id) { |
| | | this.tableData.forEach(item => { |
| | | if (item.id === id) { |
| | | if (item.status !== 'NEW') { |
| | | return this.$message.info('此订单非新订单,无法关闭!') |
| | | } else { |
| | | this.$confirm('是否确认关闭订单?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | ClosedErpOrder({ erpordercode: item.wo, erporderid: id }).then(res => { |
| | | if (res.code === '200') { |
| | | this.$message.success('订单关闭成功!') |
| | | this.getErpOrderSearch() |
| | | } |
| | | }) |
| | | }).catch(() => { |
| | | this.$message.info('已取消关闭!') |
| | | }) |
| | | async orderClose(row) { |
| | | if (row.status !== 'NEW') { |
| | | return this.$message.info('此订单非新订单,无法关闭!') |
| | | } else { |
| | | this.$confirm('是否确认关闭订单?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | ClosedErpOrder({ erpordercode: row.wo, erporderid: row.id }).then(res => { |
| | | if (res.code === '200') { |
| | | this.$message.success('订单关闭成功!') |
| | | this.getErpOrderSearch() |
| | | } |
| | | }) |
| | | }).catch(() => { |
| | | 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() { |
| | |
| | | 'saleordercode': i.saleOrderCode, |
| | | // 'saleOrderDeliveryDate': i.saleOrderDeliveryDate |
| | | 'saleOrderDeliveryDate': handleDatetime(new Date()) + ' 00:00:00', |
| | | |
| | | deptcode: i.dept_code, |
| | | 'paystartdate': i.planstartdate, |
| | | 'payenddate': i.planenddate |
| | | }) |
| | |
| | | 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 |
| | | this.dialogForm.payenddate = row.planenddate |
| | | |
| | | this.dialogForm.deptcode = row.dept_code |
| | | }) |
| | | }, |
| | | // 对话框关闭事件 |
| | |
| | | ordernum: '', // 下单单数 |
| | | relse_qty: '', // 已下单数量 |
| | | |
| | | idTopInventory: '', // 顶级物料id |
| | | TopInventoryCode: '', // 顶级物料编码 |
| | | TopInventoryName: '', // 顶级物料名称 |
| | | |
| | | payenddate: '', // 预计完工日期 |
| | | paystartdate: '', // 预计开工日期 |
| | | |
| | | deptcode: '', |
| | | |
| | | saleOrderDeliveryDate: '' // 预计交付日期 |
| | | } |
| | |
| | | '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, |
| | |
| | | 'payenddate': this.dialogForm.payenddate, |
| | | 'paystartdate': this.dialogForm.paystartdate, |
| | | 'relse_qty': this.dialogForm.relse_qty, |
| | | deptcode: this.dialogForm.deptcode, |
| | | 'saleOrderDeliveryDate': handleDatetime(this.dialogForm.saleOrderDeliveryDate) + ' 00:00:00' |
| | | } |
| | | |
| | |
| | | padding: 10px 10px 0 10px; |
| | | } |
| | | |
| | | .statusItem{ |
| | | .statusItem { |
| | | margin-left: 20px; |
| | | cursor: pointer; |
| | | color: #a7a7a7; |
| | | } |
| | | .statusItemLight{ |
| | | |
| | | .statusItemLight { |
| | | font-weight: bolder; |
| | | color: #42b983; |
| | | } |