6 changed files with 1074 additions and 9 deletions
-
12src/api/shopOrder/shopOrder.js
-
138src/views/modules/schedule/order_schedule_expand.vue
-
455src/views/modules/shopOrder/shopOrder/common/shop_order_tool.vue
-
299src/views/modules/shopOrder/shopOrder/common/tool_add_and_edit.vue
-
39src/views/modules/shopOrder/shopOrder/shopOrder.vue
-
140src/views/modules/yieldReport/produce_order.vue
@ -0,0 +1,455 @@ |
|||
<template> |
|||
<div class="mod-config"> |
|||
<el-dialog |
|||
v-drag |
|||
@close="closeDialog" |
|||
width="880px" |
|||
:title="'生产订单-工具维护'" |
|||
:close-on-click-modal="false" |
|||
:visible.sync="visible"> |
|||
<el-row> |
|||
<el-col :span="24"> |
|||
<el-button @click="toolAddAndEditModal(0)" type="primary" style="margin-left: 2px;margin-top: 0px">{{ '新增' }} |
|||
</el-button> |
|||
<el-button @click="toolAddAndEditModal(1)" :disabled="disabledFlag" type="primary" |
|||
style="margin-left: 2px;margin-top: 0px">{{ '修改' }} |
|||
</el-button> |
|||
<el-button @click="removeShopOrderTool" :disabled="disabledFlag" type="primary" |
|||
style="margin-left: 2px;margin-top: 0px">{{ '删除' }} |
|||
</el-button> |
|||
<el-button @click="toolAddAndEditModal(2)" :disabled="disabledFlag" type="primary" |
|||
style="margin-left: 2px;margin-top: 0px">{{ '复制' }} |
|||
</el-button> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col style="margin-top: -5px" :span="24"> |
|||
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 0px;"> |
|||
<el-form-item :label="'订单号'"> |
|||
<el-input class="customer-input-color-red" disabled v-model="shopOrderRow.orderNo"></el-input> |
|||
</el-form-item> |
|||
<el-form-item :label="'物料编码'"> |
|||
<el-input class="customer-input-color-red" disabled v-model="shopOrderRow.partNo"></el-input> |
|||
</el-form-item> |
|||
<el-form-item :label="'物料名称/规格'"> |
|||
<el-input class="customer-input-color-red" disabled style="width: 260px" |
|||
v-model="shopOrderRow.partDesc"></el-input> |
|||
</el-form-item> |
|||
<el-form-item :label="'工厂编号'"> |
|||
<el-input class="customer-input-color-red" disabled style="width: 80px" |
|||
v-model="shopOrderRow.site"></el-input> |
|||
</el-form-item> |
|||
</el-form> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="24"> |
|||
<el-table |
|||
ref="routingTable" |
|||
:height="height" |
|||
:data="dataList" |
|||
highlight-current-row |
|||
@current-change="handleCurrentChange" |
|||
border |
|||
v-loading="dataListLoading" |
|||
style="width: 100%;"> |
|||
<el-table-column |
|||
v-for="(item,index) in columnList" :key="index" |
|||
:sortable="item.columnSortable" |
|||
:prop="item.columnProp" |
|||
:header-align="item.headerAlign" |
|||
:show-overflow-tooltip="item.showOverflowTooltip" |
|||
:align="item.align" |
|||
:fixed="item.fixed==''?false:item.fixed" |
|||
:width="item.columnWidth" |
|||
:label="item.columnLabel"> |
|||
<template slot-scope="scope"> |
|||
<span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span> |
|||
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" |
|||
style="width: 100px; height: 80px"/></span> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
</el-col> |
|||
</el-row> |
|||
</el-dialog> |
|||
|
|||
<toolAddAndEdit ref="toolAddAndEdit" @searchShopOrderTools="searchShopOrderTools"></toolAddAndEdit> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { |
|||
getShopOrderToolDatas, |
|||
insertRouteInShopOrder, |
|||
getOrderNoRouteInMaxItemNo, |
|||
deleteShopOrderToolData, |
|||
} from "@/api/shopOrder/shopOrder.js" |
|||
|
|||
import toolAddAndEdit from './tool_add_and_edit';/*工具的新增和修改*/ |
|||
|
|||
export default { |
|||
components: { |
|||
toolAddAndEdit,/*工具的新增和修改*/ |
|||
}, |
|||
data() { |
|||
return { |
|||
visible: false, |
|||
height: 350, |
|||
dataListLoading: false, |
|||
disabledFlag: true, |
|||
columnList: [ |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 6031, |
|||
serialNumber: '6031Table4ItemNo', |
|||
tableId: "6031Table4", |
|||
tableName: "生产订单工具信息表", |
|||
columnProp: "itemNo", |
|||
headerAlign: "center", |
|||
align: "left", |
|||
columnLabel: "工序号", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: false, |
|||
columnWidth: 80 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 6031, |
|||
serialNumber: '6031Table4ToolID', |
|||
tableId: "6031Table4", |
|||
tableName: "生产订单工具信息表", |
|||
columnProp: "toolId", |
|||
headerAlign: "center", |
|||
align: "left", |
|||
columnLabel: "工具编号", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: false, |
|||
columnWidth: 100 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 6031, |
|||
serialNumber: '6031Table4ToolDescription', |
|||
tableId: "6031Table4", |
|||
tableName: "生产订单工具信息表", |
|||
columnProp: "toolDesc", |
|||
headerAlign: "center", |
|||
align: "left", |
|||
columnLabel: "工具名称", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: false, |
|||
columnWidth: 160 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 6031, |
|||
serialNumber: '6031Table4Spec', |
|||
tableId: "6031Table4", |
|||
tableName: "生产订单工具信息表", |
|||
columnProp: "spec", |
|||
headerAlign: "center", |
|||
align: "left", |
|||
columnLabel: "规格型号", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: false, |
|||
columnWidth: 120 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 6031, |
|||
serialNumber: '6031Table4ToolQty', |
|||
tableId: "6031Table4", |
|||
tableName: "生产订单工具信息表", |
|||
columnProp: "toolQty", |
|||
headerAlign: "center", |
|||
align: "right", |
|||
columnLabel: "工具数量", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: false, |
|||
columnWidth: 80 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 6031, |
|||
serialNumber: '6031Table4UMID', |
|||
tableId: "6031Table4", |
|||
tableName: "生产订单工具信息表", |
|||
columnProp: "umid", |
|||
headerAlign: "center", |
|||
align: "left", |
|||
columnLabel: "计量单位", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: false, |
|||
columnWidth: 80 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 6031, |
|||
serialNumber: '6031Table4Active', |
|||
tableId: "6031Table4", |
|||
tableName: "生产订单工具信息表", |
|||
columnProp: "active", |
|||
headerAlign: "center", |
|||
align: "left", |
|||
columnLabel: "在用", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: false, |
|||
columnWidth: 40 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 6031, |
|||
serialNumber: '6031Table4FamilyID', |
|||
tableId: "6031Table4", |
|||
tableName: "生产订单工具信息表", |
|||
columnProp: "familyId", |
|||
headerAlign: "center", |
|||
align: "left", |
|||
columnLabel: "工具分类", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: false, |
|||
columnWidth: 80 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 6031, |
|||
serialNumber: '6031Table4FamilyName', |
|||
tableId: "6031Table4", |
|||
tableName: "生产订单工具信息表", |
|||
columnProp: "familyName", |
|||
headerAlign: "center", |
|||
align: "left", |
|||
columnLabel: "工具分类名称", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: false, |
|||
columnWidth: 120 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 6031, |
|||
serialNumber: '6031Table4Remark', |
|||
tableId: "6031Table4", |
|||
tableName: "生产订单工具信息表", |
|||
columnProp: "remark", |
|||
headerAlign: "center", |
|||
align: "left", |
|||
columnLabel: "备注", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: false, |
|||
columnWidth: 160 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 6031, |
|||
serialNumber: '6031Table4CreateDate', |
|||
tableId: "6031Table4", |
|||
tableName: "生产订单工具信息表", |
|||
columnProp: "createdDate", |
|||
headerAlign: "center", |
|||
align: "left", |
|||
columnLabel: "录入日期", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: false, |
|||
columnWidth: 160 |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: 6031, |
|||
serialNumber: '6031Table4CreatedBy', |
|||
tableId: "6031Table4", |
|||
tableName: "生产订单工具信息表", |
|||
columnProp: "createdBy", |
|||
headerAlign: "center", |
|||
align: "left", |
|||
columnLabel: "录入人", |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: false, |
|||
columnWidth: 60 |
|||
} |
|||
], |
|||
dataList: [], |
|||
shopOrderRow: { |
|||
site: this.$store.state.user.site, |
|||
orderNo: '', |
|||
partNo: '', |
|||
partDesc: '', |
|||
username: this.$store.state.user.name, |
|||
}, |
|||
selectRow: null |
|||
} |
|||
}, |
|||
watch: { |
|||
selectRow: { |
|||
deep: true, |
|||
handler: function (newV, oldV) { |
|||
if (newV == null) { |
|||
this.disabledFlag = true |
|||
} else { |
|||
this.disabledFlag = false |
|||
} |
|||
} |
|||
} |
|||
}, |
|||
methods: { |
|||
init(modelData) { |
|||
this.visible = true |
|||
this.shopOrderRow = modelData |
|||
this.searchShopOrderTools() |
|||
}, |
|||
// 获取数据 |
|||
searchShopOrderTools() { |
|||
getShopOrderToolDatas(this.shopOrderRow).then(({data}) => { |
|||
if (data.code === 200) { |
|||
this.dataList = data.rows |
|||
} |
|||
}) |
|||
}, |
|||
|
|||
// 编辑或新增 |
|||
toolAddAndEditModal(val) { |
|||
this.$nextTick(() => { |
|||
if (val === 1 || val === 2) { |
|||
//设置人员信息 |
|||
this.$refs.toolAddAndEdit.init(this.selectRow, val); |
|||
} else { |
|||
let selectRow = { |
|||
site: this.shopOrderRow.site, |
|||
username: this.$store.state.user.name, |
|||
orderNo: this.shopOrderRow.orderNo, |
|||
itemNo: null, |
|||
itemDesc: null, |
|||
toolId: '', |
|||
toolQty: null, |
|||
toolSpec: '', |
|||
remark: '', |
|||
} |
|||
this.$refs.toolAddAndEdit.init(JSON.parse(JSON.stringify(selectRow)), 0) |
|||
} |
|||
}) |
|||
}, |
|||
|
|||
// 删除 订单工序刀具 |
|||
removeShopOrderTool() { |
|||
this.$confirm('确认删除该刀具?', '提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
type: 'warning' |
|||
}).then(() => { |
|||
deleteShopOrderToolData(this.selectRow).then(({data}) => { |
|||
if (data.code == 200) { |
|||
this.$message.success(data.msg) |
|||
//刷新数据 |
|||
this.searchShopOrderTools(); |
|||
} else { |
|||
this.$message.error(data.msg) |
|||
} |
|||
}) |
|||
}) |
|||
}, |
|||
// 复制 |
|||
copyToolData() { |
|||
// 获取最大工序 |
|||
getOrderNoRouteInMaxItemNo(this.shopOrderRow).then(({data}) => { |
|||
if (data.code == 0) { |
|||
let maxItem = JSON.parse(JSON.stringify(this.selectRow)) |
|||
maxItem.itemNo = Number(data.data) + 10 |
|||
let barcodeID = '0000'+maxItem.itemNo |
|||
maxItem.barcodeID = maxItem.site+'-00000'+maxItem.orderNo+"-"+barcodeID.slice(-4) |
|||
// 保存信息 |
|||
this.addRouteInShopOrder(maxItem) |
|||
} |
|||
}) |
|||
}, |
|||
// 保存订单工序 |
|||
addRouteInShopOrder(val) { |
|||
insertRouteInShopOrder(val).then(({data}) => { |
|||
if (data.code == 0) { |
|||
this.$message.success(data.msg) |
|||
this.searchRouteInShopOrder() |
|||
} else { |
|||
this.$message.warning(data.msg) |
|||
} |
|||
}) |
|||
}, |
|||
handleCurrentChange(val) { |
|||
this.selectRow = val; |
|||
}, |
|||
closeDialog() { |
|||
this.$nextTick(() => { |
|||
this.$emit('tableHanddle', this.shopOrderRow) |
|||
Object.assign(this.$data, this.$options.data.call(this)); |
|||
}) |
|||
} |
|||
}, |
|||
created() { |
|||
|
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
.mod-config /deep/ .el-card__header { |
|||
padding: 0px 2px; |
|||
font-size: 12px; |
|||
} |
|||
|
|||
/*统一的input内容颜色样式*/ |
|||
.customer-input-color-red /deep/ .el-input__inner { |
|||
color: red; |
|||
|
|||
} |
|||
|
|||
.mod-config /deep/ .el-form-item--medium .el-form-item__content { |
|||
height: 20px; |
|||
line-height: 20px; |
|||
} |
|||
</style> |
|||
@ -0,0 +1,299 @@ |
|||
<template> |
|||
<div class="mod-config"> |
|||
<el-dialog |
|||
v-drag |
|||
@close="closeDialog" |
|||
width="390px" |
|||
class="sxm" |
|||
:title="titile" |
|||
:close-on-click-modal="false" |
|||
:visible.sync="visible"> |
|||
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: 0px;"> |
|||
<el-row> |
|||
<el-col :span="24"> |
|||
<el-form-item :label="'工序号:'"> |
|||
<el-select v-model="selectRow.itemNo" placeholder="请选择" @change="getItemDesc()" |
|||
:class="operationFlag?'customer-input-color-red':''" style="width: 150px;text-align: right"> |
|||
<el-option |
|||
v-for="item in itemRows" |
|||
:key="item.itemNo" |
|||
:label="item.itemLabel" |
|||
:value="item.itemNo"> |
|||
</el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
<el-form-item :label="'工序名称:'"> |
|||
<el-input v-model="selectRow.itemDesc" class="customer-input-color-red" style="width: 150px" disabled></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="24"> |
|||
<el-form-item> |
|||
<span slot="label" style="" @click="getBaseList(70)"><a herf="#">工具编码:</a></span> |
|||
<el-input v-model="selectRow.toolId" style="width: 150px;text-align: right"></el-input> |
|||
</el-form-item> |
|||
<el-form-item :label="'工具名称:'"> |
|||
<el-input v-model="selectRow.toolDesc" class="customer-input-color-red" style="width: 150px" disabled></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="24"> |
|||
<el-form-item :label="'规格型号:'"> |
|||
<el-input class="customer-input-color-red" disabled v-model="selectRow.toolSpec" |
|||
style="width: 150px"></el-input> |
|||
</el-form-item> |
|||
<el-form-item :label="'工具数量:'"> |
|||
<el-input oninput="value=value.replace(/[^0-9.]/g,'')" v-model="selectRow.toolQty" |
|||
style="width: 150px"></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="24"> |
|||
<el-form-item :label="'备注:'"> |
|||
<el-input v-model="selectRow.remark" style="width: 150px"></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
<el-footer style="height:40px;margin-top: 20px;text-align:center"> |
|||
<el-button type="primary" @click="saveOrEdit">保存</el-button> |
|||
<el-button type="primary" @click="visible = false">关闭</el-button> |
|||
</el-footer> |
|||
</el-dialog> |
|||
|
|||
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist> |
|||
|
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { |
|||
getRouteInShopOrder, |
|||
insertShopOrderToolData, |
|||
updateShopOrderToolData, |
|||
} from "@/api/shopOrder/shopOrder.js" |
|||
import Chooselist from '@/views/modules/common/Chooselist' |
|||
|
|||
import {debounce, throttle} from "../../../../../utils/common"; |
|||
|
|||
export default { |
|||
components: { |
|||
Chooselist |
|||
}, |
|||
data() { |
|||
return { |
|||
visible: false, |
|||
operationFlag: true, |
|||
operationType: 0, |
|||
oriToolId: '', |
|||
username: this.$store.state.user.name, |
|||
titile: '', |
|||
selectRow: { |
|||
site: this.$store.state.user.site, |
|||
username: this.$store.state.user.name, |
|||
orderNo: '', |
|||
partNo: '', |
|||
itemNo: null, |
|||
itemDesc: null, |
|||
toolDesc: null, |
|||
toolSpec: null, |
|||
toolQty: 0, |
|||
remark: null, |
|||
}, |
|||
itemRows:[], |
|||
} |
|||
}, |
|||
methods: { |
|||
/*初始化页面的参数*/ |
|||
init(selectRow, operationType) { |
|||
this.visible = true; |
|||
this.selectRow = Object.assign(this.selectRow, selectRow); |
|||
this.operationType = operationType; |
|||
if (operationType === 1) { |
|||
this.operationFlag = true; |
|||
this.oriToolId = selectRow.toolId; |
|||
} else if (operationType === 2){ |
|||
this.operationFlag = true; |
|||
} else { |
|||
this.operationFlag = false; |
|||
} |
|||
//设置标题 |
|||
if(operationType === 0){ |
|||
this.titile = '新增工具信息'; |
|||
}else if(operationType === 1){ |
|||
this.titile = '编辑工具信息'; |
|||
}else if(operationType === 2){ |
|||
this.titile = '复制工具信息'; |
|||
} |
|||
//查询当前工单的工序信息 |
|||
this.searchShopOrderSoRouting(); |
|||
}, |
|||
|
|||
// 查询当前工序信息 |
|||
searchShopOrderSoRouting() { |
|||
getRouteInShopOrder(this.selectRow).then(({data}) => { |
|||
if (data.code == 0) { |
|||
//遍历信息 |
|||
this.itemRows = data.dataList.map(item => { |
|||
let itemRow = { |
|||
itemNo: item.itemNo, |
|||
itemLabel: item.itemNo +" | " +item.operationDesc, |
|||
itemDesc: item.operationDesc, |
|||
} |
|||
return itemRow; |
|||
}); |
|||
} |
|||
}); |
|||
//判断是否刷新当前的工序描述 |
|||
if(this.operationFlag){ |
|||
this.getItemDesc();//刷新工序的描述 |
|||
} |
|||
}, |
|||
|
|||
// 根据工序号 获取当前工序的描述 |
|||
getItemDesc() { |
|||
//循环遍历前段的数据 |
|||
this.itemRows.forEach(item => { |
|||
//判断当前的工序是否等于选择的工序 |
|||
if(this.selectRow.itemNo === item.itemNo){ |
|||
this.selectRow.itemDesc = item.itemDesc; |
|||
} |
|||
}); |
|||
let order = { |
|||
orderNo: this.selectRow.orderNo, |
|||
site: this.selectRow.site, |
|||
} |
|||
}, |
|||
|
|||
// 保存或修改订单工序 |
|||
saveOrEdit() { |
|||
if (!this.selectRow.itemNo) { |
|||
this.$message.warning('工序号不能为空!') |
|||
return false; |
|||
} |
|||
if (!this.selectRow.toolId) { |
|||
this.$message.warning('工具编码不能为空!') |
|||
return false; |
|||
} |
|||
if (!this.selectRow.toolQty) { |
|||
this.$message.warning('工具的数量必须大于零!') |
|||
return false; |
|||
} |
|||
//区分修改还是保存信息 |
|||
if(this.operationType === 1){ |
|||
//修改信息 |
|||
this.saveShopOrderToolData(); |
|||
}else{ |
|||
//新增信息 |
|||
this.addShopOrderToolData(); |
|||
} |
|||
}, |
|||
|
|||
// 保存订单工序this. |
|||
addShopOrderToolData() { |
|||
//设置人员参数 |
|||
this.selectRow.createdBy = this.username; |
|||
insertShopOrderToolData(this.selectRow).then(({data}) => { |
|||
if (data.code == 200) { |
|||
debugger; |
|||
this.$message.success(data.msg); |
|||
//关闭弹窗 |
|||
this.closeDialog(); |
|||
} else { |
|||
this.$message.error(data.msg) |
|||
} |
|||
}) |
|||
}, |
|||
|
|||
// 保存订单工序this. |
|||
saveShopOrderToolData() { |
|||
//设置人员参数 |
|||
this.selectRow.updatedBy = this.username; |
|||
//设置老的机台 |
|||
this.selectRow.oriToolId = this.oriToolId; |
|||
updateShopOrderToolData(this.selectRow).then(({data}) => { |
|||
if (data.code == 200) { |
|||
this.$message.success(data.msg); |
|||
//关闭弹窗 |
|||
this.closeDialog(); |
|||
} else { |
|||
this.$message.error(data.msg); |
|||
} |
|||
}) |
|||
}, |
|||
|
|||
/*当前行改变事件*/ |
|||
handleCurrentChange(val) { |
|||
this.selectRow = val |
|||
}, |
|||
|
|||
// 获取基础数据列表 |
|||
getBaseList(val) { |
|||
this.tagNo = val |
|||
this.$nextTick(() => { |
|||
let strVal = ""; |
|||
if (val === 94) { |
|||
strVal = this.selectRow.orderNo; |
|||
} |
|||
this.$refs.baseList.init(val, strVal) |
|||
}) |
|||
}, |
|||
|
|||
getBaseData(val) { |
|||
if (this.tagNo === 70) { |
|||
//设置参数 |
|||
this.selectRow.toolId = val.ToolID; |
|||
//先判断是否存在描述 |
|||
if(val.ToolDescription == null || "" === val.ToolDescription){ |
|||
this.selectRow.toolDesc = ''; |
|||
this.selectRow.toolSpec = ''; |
|||
}else if(val.ToolDescription.indexOf(" | ") > -1){ |
|||
let mixedToolData = val.ToolDescription.split(" | "); |
|||
this.selectRow.toolDesc = mixedToolData[0].trim(); |
|||
this.selectRow.toolSpec = mixedToolData[1].trim(); |
|||
}else{ |
|||
this.selectRow.toolDesc = mixedToolData[0].trim(); |
|||
this.selectRow.toolSpec = ''; |
|||
} |
|||
} |
|||
}, |
|||
|
|||
closeDialog() { |
|||
this.$nextTick(() => { |
|||
this.$emit('searchShopOrderTools') |
|||
Object.assign(this.$data, this.$options.data.call(this)); |
|||
}) |
|||
} |
|||
}, |
|||
created() { |
|||
|
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
.mod-config /deep/ .el-card__header { |
|||
padding: 0px 2px; |
|||
font-size: 12px; |
|||
} |
|||
|
|||
.mod-config /deep/ .el-form-item--medium .el-form-item__content { |
|||
height: 20px; |
|||
line-height: 20px; |
|||
} |
|||
|
|||
.customer-input-color-red /deep/ .el-input__inner { |
|||
color: red; |
|||
} |
|||
|
|||
.sxm /deep/ .el-input--prefix .el-input__inner { |
|||
padding-left: 20px; |
|||
} |
|||
|
|||
.sxm /deep/ .el-input__prefix { |
|||
left: 0px; |
|||
} |
|||
</style> |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue