feat: acs对接、手持接口
This commit is contained in:
@@ -154,7 +154,7 @@ export default {
|
||||
presenter(),
|
||||
header(),
|
||||
form(function() {
|
||||
return Object.assign({ dict: { id: this.dictId }}, defaultForm)
|
||||
return Object.assign({ code_rule_id: this.dictId }, defaultForm)
|
||||
})],
|
||||
data() {
|
||||
return {
|
||||
|
||||
@@ -70,6 +70,9 @@
|
||||
<el-form-item label="标准数量">
|
||||
<el-input v-model="form.standard_qty" style="width: 240px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="标准重量">
|
||||
<el-input v-model="form.standard_weight" style="width: 240px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="工艺号">
|
||||
<el-input v-model="form.technique_num" style="width: 240px;" />
|
||||
</el-form-item>
|
||||
@@ -137,7 +140,8 @@ const defaultForm = {
|
||||
material_name: null,
|
||||
material_spec: null,
|
||||
material_model: null,
|
||||
standard_qty: null,
|
||||
standard_qty: 0,
|
||||
standard_weight: 0,
|
||||
technique_num: null,
|
||||
class_id: null,
|
||||
standing_time: null,
|
||||
|
||||
@@ -19,6 +19,26 @@
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="标题">
|
||||
<el-select v-model="query.interact_name" placeholder="标题" clearable @change="crud.toQuery()">
|
||||
<el-option
|
||||
v-for="item in interact_name_list"
|
||||
:key="item"
|
||||
:label="item"
|
||||
:value="item"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="响应编码">
|
||||
<el-select v-model="query.http_code" placeholder="响应编码" clearable>
|
||||
<el-option
|
||||
v-for="item in http_codes"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="请求方向">
|
||||
<el-select v-model="query.interact_direction" placeholder="请求方向" clearable>
|
||||
<el-option
|
||||
@@ -186,7 +206,18 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
permission: {},
|
||||
rules: {}
|
||||
rules: {},
|
||||
interact_name_list: [],
|
||||
http_codes: [
|
||||
{
|
||||
'label': '200',
|
||||
'value': '200'
|
||||
},
|
||||
{
|
||||
'label': '400',
|
||||
'value': '400'
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -219,10 +250,18 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getNameList()
|
||||
},
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
},
|
||||
getNameList() {
|
||||
crudSysInteractRecord.getAllName().then((res) => {
|
||||
this.interact_name_list = res
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,5 +23,12 @@ export function edit(data) {
|
||||
data
|
||||
})
|
||||
}
|
||||
export function getAllName(params) {
|
||||
return request({
|
||||
url: 'api/sysInteractRecord/getAllName',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del }
|
||||
export default { add, edit, del, getAllName }
|
||||
|
||||
199
lms/nladmin-ui/src/views/wms/pdm/solidifyplan/index.vue
Normal file
199
lms/nladmin-ui/src/views/wms/pdm/solidifyplan/index.vue
Normal file
@@ -0,0 +1,199 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!--工具栏-->
|
||||
<div class="head-container">
|
||||
<div style="margin: 0 3px 3px 0; border: 1px solid #9eabf6; border-radius: 5px;">
|
||||
<el-form
|
||||
style="margin: 6px 0 -12px 0"
|
||||
:inline="true"
|
||||
label-position="right"
|
||||
label-width="90px"
|
||||
label-suffix=":"
|
||||
>
|
||||
<el-form-item label="固化方案">
|
||||
<el-select
|
||||
v-model="curingPlan"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="固化方案"
|
||||
class="filter-item"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.gh_plan"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="curingPlan === '3'" label="混料方案">
|
||||
<span>{{ mixingScheme }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button :disabled="curingPlan === null || curingPlan === ''" type="success" @click="saveConfig">保存配置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission" />
|
||||
<!--表单组件-->
|
||||
<el-dialog
|
||||
:close-on-click-modal="false"
|
||||
:before-close="crud.cancelCU"
|
||||
:visible.sync="crud.status.cu > 0"
|
||||
:title="crud.status.title"
|
||||
width="80%"
|
||||
>
|
||||
<el-form
|
||||
ref="form"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
size="mini"
|
||||
label-width="80px"
|
||||
>
|
||||
<el-form-item v-if="false" label="方案编码">
|
||||
<el-input v-model="form.plan_code" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<solidify-plan-transfer
|
||||
ref="SolidifyPlanTransfer"
|
||||
v-model="tableData"
|
||||
:code="code"
|
||||
:show-query="true"
|
||||
:show-pagination="true"
|
||||
:title-texts="['待选物料','已选物料']"
|
||||
:button-texts="['添加','去除']"
|
||||
:table-row-key="row => row.name"
|
||||
/>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="text" @click="crud.cancelCU">取消</el-button>
|
||||
<el-button :loading="crud.cu === 2" type="primary" @click="commitSavePlan">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
v-loading="crud.loading"
|
||||
:data="crud.data"
|
||||
size="mini"
|
||||
style="width: 100%;"
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
>
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column prop="plan_code" label="方案编码" :min-width="flexWidth('plan_code',crud.data,'方案编码')" />
|
||||
<el-table-column prop="create_name" label="创建人" :min-width="flexWidth('create_name',crud.data,'创建人')" />
|
||||
<el-table-column prop="create_time" label="创建时间" :min-width="flexWidth('create_time',crud.data,'创建时间')" />
|
||||
<el-table-column prop="update_name" label="修改人" :min-width="flexWidth('update_name',crud.data,'修改人')" />
|
||||
<el-table-column prop="update_time" label="修改时间" :min-width="flexWidth('update_time',crud.data,'修改时间')" />
|
||||
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<udOperation
|
||||
:data="scope.row"
|
||||
:permission="permission"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudPdmBdSolidifyPlan from './pdmBdSolidifyPlan'
|
||||
import CRUD, { crud, form, header, presenter } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import SolidifyPlanTransfer from '@/views/wms/pdm/solidifyplan/solidifyplan-transfer.vue'
|
||||
|
||||
const defaultForm = {
|
||||
plan_id: null,
|
||||
plan_code: null,
|
||||
create_id: null,
|
||||
create_name: null,
|
||||
create_time: null,
|
||||
update_id: null,
|
||||
update_name: null,
|
||||
update_time: null,
|
||||
material_ids: []
|
||||
}
|
||||
export default {
|
||||
name: 'PdmBdSolidifyPlan',
|
||||
components: { SolidifyPlanTransfer, pagination, crudOperation, rrOperation, udOperation },
|
||||
dicts: ['gh_plan'],
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '固化方案',
|
||||
url: 'api/pdmBdSolidifyPlan',
|
||||
idField: 'plan_id',
|
||||
sort: 'plan_id,desc',
|
||||
crudMethod: { ...crudPdmBdSolidifyPlan }
|
||||
})
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
permission: {
|
||||
},
|
||||
rules: {
|
||||
},
|
||||
curingPlan: null,
|
||||
mixingScheme: null,
|
||||
tableData: [],
|
||||
code: null
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getSolidifyPlan()
|
||||
this.getMixingScheme()
|
||||
},
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
},
|
||||
[CRUD.HOOK.beforeToEdit]() {
|
||||
this.code = this.$data.form.plan_code
|
||||
},
|
||||
// 获取固化方案
|
||||
getSolidifyPlan() {
|
||||
this.getValueByCode('CuringPlan').then(res => {
|
||||
this.curingPlan = res.value
|
||||
})
|
||||
},
|
||||
// 获取混放方案
|
||||
getMixingScheme() {
|
||||
this.getValueByCode('CurrentMaterials').then(res => {
|
||||
this.mixingScheme = res.value
|
||||
})
|
||||
},
|
||||
saveConfig() {
|
||||
if (this.curingPlan === '3' && this.crud.selections.length !== 1) {
|
||||
this.crud.notify('必须且仅能选择一个方案', CRUD.NOTIFICATION_TYPE.WARNING)
|
||||
return
|
||||
}
|
||||
// 执行保存
|
||||
const param = {
|
||||
curingPlan: this.curingPlan,
|
||||
planCode: this.crud.selections.length === 0 ? null : this.crud.selections[0].plan_code
|
||||
}
|
||||
crudPdmBdSolidifyPlan.changePlan(param).then(res => {
|
||||
this.mixingScheme = param.planCode
|
||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
})
|
||||
},
|
||||
commitSavePlan() {
|
||||
this.crud.form.material_ids = this.tableData.map(item => item.material_id)
|
||||
// 提交
|
||||
this.crud.submitCU('form')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,50 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function add(data) {
|
||||
return request({
|
||||
url: 'api/pdmBdSolidifyPlan',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function del(ids) {
|
||||
return request({
|
||||
url: 'api/pdmBdSolidifyPlan/',
|
||||
method: 'delete',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
export function edit(data) {
|
||||
return request({
|
||||
url: 'api/pdmBdSolidifyPlan',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function details(code) {
|
||||
return request({
|
||||
url: 'api/pdmBdSolidifyPlan/details',
|
||||
method: 'post',
|
||||
data: code
|
||||
})
|
||||
}
|
||||
|
||||
export function detailMaterials(code) {
|
||||
return request({
|
||||
url: 'api/pdmBdSolidifyPlan/detailMaterials',
|
||||
method: 'post',
|
||||
data: code
|
||||
})
|
||||
}
|
||||
export function changePlan(data) {
|
||||
return request({
|
||||
url: 'api/pdmBdSolidifyPlan/changePlan',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, details, detailMaterials, changePlan }
|
||||
@@ -0,0 +1,472 @@
|
||||
<template>
|
||||
<div class="transfer">
|
||||
<div class="transfer-panel">
|
||||
<p class="transfer-panel-header">
|
||||
<span>{{ titleTexts && titleTexts[0] }}</span>
|
||||
<span>{{ leftSelection.length }}/{{ crud.data.length }}</span>
|
||||
</p>
|
||||
<div v-if="showQuery">
|
||||
<el-form :inline="true" :model="leftQueryCondition" class="query-form">
|
||||
<el-form-item label="模糊搜索">
|
||||
<el-input
|
||||
v-model="query.blurry"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="编码名称"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="onLeftQuerySubmit()">{{ queryTexts[0] }}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<!-- 左边数据-分页 -->
|
||||
<el-table
|
||||
ref="table"
|
||||
v-loading="crud.loading"
|
||||
size="mini"
|
||||
:max-height="maxHeight"
|
||||
:height="minHeight"
|
||||
:data="crud.data"
|
||||
:row-key="tableRowKey"
|
||||
:row-style="handleRowStyle"
|
||||
border
|
||||
stripe
|
||||
@row-click="handleLeftRowClick"
|
||||
@selection-change="handleLeftSelectionChange"
|
||||
>
|
||||
<el-table-column
|
||||
width="40px"
|
||||
type="selection"
|
||||
:selectable="handleSelectable"
|
||||
/>
|
||||
<el-table-column prop="material_code" label="物料编码" width="160" />
|
||||
<el-table-column prop="material_name" label="物料名称" width="180" show-overflow-tooltip />
|
||||
<el-table-column prop="material_spec" label="物料规格" />
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</div>
|
||||
<div class="transfer-buttons">
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
:class="buttonClasses"
|
||||
:disabled="disabledLeftButton"
|
||||
@click.native="addToRight"
|
||||
>
|
||||
<span v-if="buttonTexts[0] !== undefined" class="button-text">{{ buttonTexts[0] }}</span>
|
||||
<i class="el-icon-arrow-right" />
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
:class="buttonClasses"
|
||||
:disabled="rightSelection.length === 0"
|
||||
@click.native="addToLeft"
|
||||
>
|
||||
<i class="el-icon-arrow-left" />
|
||||
<span v-if="buttonTexts[1] !== undefined" class="button-text">{{ buttonTexts[1] }}</span>
|
||||
</el-button>
|
||||
</div>
|
||||
<div class="transfer-panel">
|
||||
<p class="transfer-panel-header">
|
||||
<span>{{ titleTexts && titleTexts[1] }}</span>
|
||||
<span>{{ rightSelection.length }}/{{ rightTableData.length }}</span>
|
||||
</p>
|
||||
<div v-if="showQuery">
|
||||
<el-form :inline="true" :model="rightQueryCondition" class="query-form">
|
||||
<slot name="rightCondition" :scope="rightQueryCondition" />
|
||||
<el-form-item>
|
||||
<el-button disabled type="primary" @click="onRightQuerySubmit()">{{ queryTexts[1] }}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<el-table
|
||||
ref="rightTable"
|
||||
size="small"
|
||||
:max-height="maxHeight"
|
||||
:height="minHeight"
|
||||
:data="calcRightTableData"
|
||||
:row-key="tableRowKey"
|
||||
border
|
||||
stripe
|
||||
@row-click="handleRightRowClick"
|
||||
@selection-change="handleRightSelectionChange"
|
||||
>
|
||||
<el-table-column width="40px" type="selection" />
|
||||
<el-table-column prop="material_code" label="物料编码" width="160" />
|
||||
<el-table-column prop="material_name" label="物料名称" width="180" show-overflow-tooltip />
|
||||
<el-table-column prop="material_spec" label="物料规格" />
|
||||
</el-table>
|
||||
<el-pagination
|
||||
v-if="showPagination"
|
||||
:total="rightTableData.length"
|
||||
layout="total"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudPdmBdSolidifyPlan from './pdmBdSolidifyPlan'
|
||||
import CRUD, { header, presenter } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||
|
||||
export default {
|
||||
name: 'EltTransfer',
|
||||
components: { rrOperation, pagination },
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '物料数据',
|
||||
url: 'api/mdBaseMaterial',
|
||||
optShow: {},
|
||||
query: {
|
||||
is_used: true
|
||||
}
|
||||
})
|
||||
},
|
||||
mixins: [presenter(), header()],
|
||||
props: {
|
||||
value: {
|
||||
type: Array,
|
||||
default() {
|
||||
return []
|
||||
}
|
||||
},
|
||||
code: {
|
||||
type: String,
|
||||
default: null
|
||||
},
|
||||
// 显示条件查询
|
||||
showQuery: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
// 显示分页
|
||||
showPagination: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
// 左侧分页回调
|
||||
paginationCallBack: {
|
||||
type: Function,
|
||||
default: function() {
|
||||
return new Promise((resolve, reject) => {
|
||||
try {
|
||||
resolve({ total: 0, data: null })
|
||||
} catch {
|
||||
reject()
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
// 标题文本
|
||||
titleTexts: {
|
||||
type: Array,
|
||||
default() {
|
||||
return ['待选项', '已选项']
|
||||
}
|
||||
},
|
||||
// 按钮文本
|
||||
buttonTexts: {
|
||||
type: Array,
|
||||
default() {
|
||||
return []
|
||||
}
|
||||
},
|
||||
// 查询按钮文本
|
||||
queryTexts: {
|
||||
type: Array,
|
||||
default() {
|
||||
return ['查询', '筛选']
|
||||
}
|
||||
},
|
||||
// 左侧参数
|
||||
leftColumns: {
|
||||
type: Array,
|
||||
default() {
|
||||
return []
|
||||
}
|
||||
},
|
||||
// 右侧参数
|
||||
rightColumns: {
|
||||
type: Array,
|
||||
default() {
|
||||
return undefined
|
||||
}
|
||||
},
|
||||
// 表格最小高度
|
||||
minHeight: {
|
||||
type: String,
|
||||
default: '300px'
|
||||
},
|
||||
// 表格最大高度
|
||||
maxHeight: {
|
||||
type: String,
|
||||
default: '500px'
|
||||
},
|
||||
// 表格行数据的Key
|
||||
tableRowKey: {
|
||||
type: Function,
|
||||
default(row) {
|
||||
return row && row && row.id
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
leftTableData: [],
|
||||
rightTableData: this.value || [],
|
||||
pageIndex: 1,
|
||||
pageSize: 20,
|
||||
totalSize: 0,
|
||||
leftSelection: [],
|
||||
rightSelection: [],
|
||||
leftQueryCondition: {},
|
||||
rightQueryCondition: {},
|
||||
rightConditionTemp: undefined
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
hasButtonTexts() {
|
||||
return this.buttonTexts.length === 2
|
||||
},
|
||||
buttonClasses() {
|
||||
return ['transfer-button', { 'is-with-texts': this.hasButtonTexts }]
|
||||
},
|
||||
disabledLeftButton() {
|
||||
return !this.leftSelection.some(leftRow => !this.rightTableData.some(rightRow => this.checkObjectIsEqual(leftRow, rightRow)))
|
||||
},
|
||||
calcRightTableData() {
|
||||
if (this.showQuery && this.rightConditionTemp) {
|
||||
const conditionKeys = Object.keys(this.rightConditionTemp)
|
||||
return this.rightTableData.filter(data => {
|
||||
return conditionKeys.some(key => {
|
||||
const rowCellData = data[key]
|
||||
const condVal = this.rightConditionTemp[key].trim()
|
||||
if (rowCellData) {
|
||||
return String(rowCellData).indexOf(condVal) > -1
|
||||
}
|
||||
return true
|
||||
})
|
||||
})
|
||||
}
|
||||
return this.rightTableData
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getDefaultTable()
|
||||
this.handlePaginationCallBack()
|
||||
},
|
||||
methods: {
|
||||
getDefaultTable() {
|
||||
if (this.code === null) return
|
||||
crudPdmBdSolidifyPlan.detailMaterials(this.code).then(res => {
|
||||
this.rightTableData = res
|
||||
})
|
||||
},
|
||||
handleLeftSelectionChange(selection) {
|
||||
this.leftSelection = selection
|
||||
},
|
||||
handleRightSelectionChange(selection) {
|
||||
this.rightSelection = selection
|
||||
},
|
||||
handleLeftRowClick(row) {
|
||||
if (!this.rightTableData.some(rightRow => this.checkObjectIsEqual(rightRow, row))) {
|
||||
this.$refs.table.toggleRowSelection(row)
|
||||
}
|
||||
},
|
||||
handleRightRowClick(row) {
|
||||
this.$refs.rightTable.toggleRowSelection(row)
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.pageSize = val
|
||||
this.handlePaginationCallBack()
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.pageIndex = val
|
||||
this.handlePaginationCallBack()
|
||||
},
|
||||
handlePaginationCallBack() {
|
||||
if (this.showPagination && this.paginationCallBack) {
|
||||
const condition = {
|
||||
pageIndex: this.pageIndex,
|
||||
pageSize: this.pageSize,
|
||||
...this.leftQueryCondition
|
||||
}
|
||||
this.paginationCallBack.call(null, condition).then(result => {
|
||||
if (result && Array.isArray(result.data)) {
|
||||
this.crud.data = result.data
|
||||
this.totalSize = result.total
|
||||
}
|
||||
|
||||
this.$nextTick(() => {
|
||||
this.crud.data.forEach(leftRow => {
|
||||
const isHave = this.rightTableData.some(rightRow => this.checkObjectIsEqual(rightRow, leftRow))
|
||||
this.$refs.table.toggleRowSelection(leftRow, isHave)
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
handleRowStyle({ row }) {
|
||||
if (this.rightTableData.some(rightRow => this.checkObjectIsEqual(rightRow, row))) {
|
||||
return {
|
||||
color: 'blue'
|
||||
}
|
||||
}
|
||||
return {}
|
||||
},
|
||||
handleSelectable(row) {
|
||||
return !this.rightTableData.some(rightRow => this.checkObjectIsEqual(rightRow, row))
|
||||
},
|
||||
// 添加到右边的方法
|
||||
addToRight() {
|
||||
for (const item of this.leftSelection) {
|
||||
const isHave = this.rightTableData.some(rightRow => this.checkObjectIsEqual(rightRow, item))
|
||||
if (!isHave) {
|
||||
this.rightTableData.push(item)
|
||||
}
|
||||
}
|
||||
this.$emit('input', this.rightTableData)
|
||||
},
|
||||
addToLeft() {
|
||||
this.rightSelection.forEach(item => {
|
||||
const index = this.rightTableData.findIndex(rightRow => this.checkObjectIsEqual(rightRow, item))
|
||||
if (index !== -1) {
|
||||
this.rightTableData.splice(index, 1)
|
||||
|
||||
const leftRow = this.crud.data.find(leftRow => this.checkObjectIsEqual(leftRow, item))
|
||||
if (leftRow) {
|
||||
this.$refs.table.toggleRowSelection(leftRow, false)
|
||||
}
|
||||
}
|
||||
})
|
||||
this.$emit('input', this.rightTableData)
|
||||
},
|
||||
// 查询
|
||||
onLeftQuerySubmit() {
|
||||
this.crud.toQuery()
|
||||
this.handlePaginationCallBack()
|
||||
},
|
||||
onRightQuerySubmit() {
|
||||
// this.rightConditionTemp = JSON.parse(JSON.stringify(this.rightQueryCondition))
|
||||
},
|
||||
checkObjectIsEqual(rowObj1, rowObj2) {
|
||||
return rowObj1.material_id === rowObj2.material_id
|
||||
},
|
||||
clear() {
|
||||
this.rightTableData = []
|
||||
this.$refs.leftTable.clearSelection()
|
||||
for (const key in this.leftQueryCondition) {
|
||||
this.leftQueryCondition[key] = undefined
|
||||
}
|
||||
for (const key in this.rightQueryCondition) {
|
||||
this.rightQueryCondition[key] = undefined
|
||||
}
|
||||
this.pageIndex = 1
|
||||
this.handlePaginationCallBack()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.transfer {
|
||||
font-size: 14px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.el-icon-arrow-right, .el-icon-arrow-left {
|
||||
font-size: 40px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.transfer-panel {
|
||||
border: 1px solid #EBEEF5;
|
||||
border-radius: 4px;
|
||||
overflow: hidden;
|
||||
background: #FFF;
|
||||
display: inline-block;
|
||||
width: calc((100% - 100px) / 2);
|
||||
max-height: 100%;
|
||||
box-sizing: border-box;
|
||||
position: relative
|
||||
}
|
||||
|
||||
.transfer-panel .transfer-panel-header {
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
background: #F5F7FA;
|
||||
margin: 0;
|
||||
padding-left: 15px;
|
||||
border-bottom: 1px solid #EBEEF5;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.transfer-panel-header span:last-child {
|
||||
position: absolute;
|
||||
right: 15px;
|
||||
}
|
||||
|
||||
.transfer-buttons {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
.transfer-button {
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
padding: 10px;
|
||||
border-radius: 4px;
|
||||
color: #FFF;
|
||||
background-color: #409EFF;
|
||||
font-size: 0
|
||||
}
|
||||
|
||||
.transfer-button .button-text {
|
||||
margin-left: 2px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.transfer-button.is-with-texts {
|
||||
border-radius: 4px
|
||||
}
|
||||
|
||||
.transfer-button.is-disabled, .transfer-button.is-disabled:hover {
|
||||
border: 1px solid #DCDFE6;
|
||||
background-color: #F5F7FA;
|
||||
color: #C0C4CC
|
||||
}
|
||||
|
||||
.transfer-button:first-child {
|
||||
margin-bottom: 10px
|
||||
}
|
||||
|
||||
.transfer-button:nth-child(2) {
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.transfer-button i, .transfer-button span {
|
||||
font-size: 14px
|
||||
}
|
||||
|
||||
.query-form {
|
||||
margin: 5px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<style>
|
||||
.query-form .el-form-item {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
</style>
|
||||
119
lms/nladmin-ui/src/views/wms/pdm/track/index.vue
Normal file
119
lms/nladmin-ui/src/views/wms/pdm/track/index.vue
Normal file
@@ -0,0 +1,119 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!--工具栏-->
|
||||
<div class="head-container">
|
||||
<div v-if="crud.props.searchToggle">
|
||||
<el-form
|
||||
:inline="true"
|
||||
class="demo-form-inline"
|
||||
label-position="right"
|
||||
label-width="80px"
|
||||
label-suffix=":"
|
||||
>
|
||||
<el-form-item label="链路ID">
|
||||
<el-input
|
||||
v-model="query.buss_move_id"
|
||||
clearable
|
||||
style="width: 180px"
|
||||
placeholder="输入链路ID"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="日期">
|
||||
<el-date-picker
|
||||
v-model="query.createTime"
|
||||
type="datetimerange"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
@change="crud.toQuery">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<rrOperation />
|
||||
</el-form>
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission" />
|
||||
<!--表单组件-->
|
||||
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="500px">
|
||||
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="80px">
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="text" @click="crud.cancelCU">取消</el-button>
|
||||
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!--表格渲染-->
|
||||
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column prop="buss_move_id" label="链路ID" :min-width="flexWidth('buss_move_id',crud.data,'链路id')"/>
|
||||
<el-table-column prop="process_action" label="动作" :min-width="flexWidth('process_action',crud.data,'动作')"/>
|
||||
<el-table-column prop="process_location" label="地点" :min-width="flexWidth('process_location',crud.data,'地点')"/>
|
||||
<el-table-column prop="point_name" label="名称" :min-width="flexWidth('point_name',crud.data,'地点')"/>
|
||||
<el-table-column prop="vehicle_code" label="载具编码" :min-width="flexWidth('vehicle_code',crud.data,'载具编码')"/>
|
||||
<el-table-column prop="record_time" label="记录时间" :min-width="flexWidth('record_time',crud.data,'记录时间')"/>
|
||||
<el-table-column prop="device_code" label="设备" :min-width="flexWidth('device_code',crud.data,'记录时间')"/>
|
||||
<el-table-column prop="material_code" label="产品编码" :min-width="flexWidth('material_code',crud.data,'记录时间')"/>
|
||||
<el-table-column prop="pcsn" label="批次" :min-width="flexWidth('pcsn',crud.data,'批次')"/>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudPdmBdProductionProcessTracking from './pdmBdProductionProcessTracking'
|
||||
import CRUD, { crud, form, header, presenter } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
|
||||
const defaultForm = {
|
||||
process_id: null,
|
||||
record_time: null,
|
||||
process_action: null,
|
||||
process_location: null,
|
||||
buss_move_id: null
|
||||
}
|
||||
export default {
|
||||
name: 'ProcessTracking',
|
||||
components: { pagination, crudOperation, rrOperation, udOperation },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '生产过程跟踪表',
|
||||
url: 'api/pdmBdProductionProcessTracking',
|
||||
idField: 'process_id',
|
||||
sort: 'process_id,desc',
|
||||
crudMethod: { ...crudPdmBdProductionProcessTracking },
|
||||
optShow: {
|
||||
add: false,
|
||||
edit: false,
|
||||
del: false,
|
||||
download: false,
|
||||
reset: true
|
||||
}
|
||||
})
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
permission: {
|
||||
},
|
||||
rules: {
|
||||
} }
|
||||
},
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,27 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function add(data) {
|
||||
return request({
|
||||
url: 'api/pdmBdProductionProcessTracking',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function del(ids) {
|
||||
return request({
|
||||
url: 'api/pdmBdProductionProcessTracking/',
|
||||
method: 'delete',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
export function edit(data) {
|
||||
return request({
|
||||
url: 'api/pdmBdProductionProcessTracking',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del }
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div v-loading.fullscreen.lock="fullscreenLoading" class="app-container">
|
||||
<!--工具栏-->
|
||||
<div class="head-container">
|
||||
<div v-if="crud.props.searchToggle">
|
||||
@@ -60,7 +60,30 @@
|
||||
</el-form>
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission" />
|
||||
<crudOperation :permission="permission" >
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
icon="el-icon-position"
|
||||
size="mini"
|
||||
:disabled="!(crud.selections[0]) || crud.selections[1]"
|
||||
@click="submits(crud.selections[0])"
|
||||
>
|
||||
开工
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="danger"
|
||||
icon="el-icon-position"
|
||||
size="mini"
|
||||
:disabled="!(crud.selections[0]) || crud.selections[1]"
|
||||
@click="forceFinish(crud.selections[0])"
|
||||
>
|
||||
强制完工
|
||||
</el-button>
|
||||
</crudOperation>
|
||||
<!--表单组件-->
|
||||
<el-dialog
|
||||
:close-on-click-modal="false"
|
||||
@@ -188,15 +211,15 @@
|
||||
<el-form-item label="设备名称">
|
||||
<el-input v-model="form.point_name" style="width: 240px;" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="静置时间(分钟)" prop="standing_time">
|
||||
<el-input-number
|
||||
v-model.number="form.standing_time"
|
||||
:min="0"
|
||||
:max="999"
|
||||
style="width: 240px;"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="crud.status.edit" label="实际数量" prop="real_qty">
|
||||
<!-- <el-form-item label="静置时间(分钟)" prop="standing_time">-->
|
||||
<!-- <el-input-number-->
|
||||
<!-- v-model.number="form.standing_time"-->
|
||||
<!-- :min="0"-->
|
||||
<!-- :max="999"-->
|
||||
<!-- style="width: 240px;"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item v-show="crud.status.edit" label="实际数量" prop="real_qty">
|
||||
<el-input-number
|
||||
v-model.number="form.real_qty"
|
||||
:min="0"
|
||||
@@ -209,7 +232,6 @@
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="请选择"
|
||||
class="filter-item"
|
||||
style="width: 240px;"
|
||||
>
|
||||
<el-option
|
||||
@@ -222,6 +244,22 @@
|
||||
<el-form-item v-if="false" label="工单类型" prop="workorder_type">
|
||||
<el-input v-model="form.workorder_type" style="width: 240px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="班组">
|
||||
<el-select
|
||||
v-model="form.team"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="请选择"
|
||||
class="filter-item"
|
||||
style="width: 240px;"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.Team"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否自动搬运" prop="is_needmove">
|
||||
<el-radio-group v-model="form.is_needmove" style="width: 240px">
|
||||
<el-radio :label="true">是</el-radio>
|
||||
@@ -266,6 +304,7 @@
|
||||
<el-table-column prop="region_name" label="区域名称" :min-width="flexWidth('region_name',crud.data,'区域名称')" />
|
||||
<el-table-column prop="point_code" label="设备编码" :min-width="flexWidth('point_code',crud.data,'设备编码')" />
|
||||
<el-table-column prop="point_name" label="设备名称" :min-width="flexWidth('point_name',crud.data,'设备名称')" />
|
||||
<el-table-column prop="operator" label="开工人" :min-width="flexWidth('operator',crud.data,'开工人')" />
|
||||
<el-table-column prop="material_code" label="物料编码" :min-width="flexWidth('material_name',crud.data,'物料标识')" />
|
||||
<el-table-column prop="material_name" label="物料名称" :min-width="flexWidth('material_name',crud.data,'物料标识')" />
|
||||
<el-table-column prop="material_spec" label="物料规格" :min-width="flexWidth('material_name',crud.data,'物料标识')" />
|
||||
@@ -356,6 +395,7 @@ const defaultForm = {
|
||||
real_qty: null,
|
||||
material_id: null,
|
||||
vehicle_type: null,
|
||||
team: null,
|
||||
planproducestart_date: null,
|
||||
planproduceend_date: null,
|
||||
realproducestart_date: null,
|
||||
@@ -372,6 +412,7 @@ const defaultForm = {
|
||||
is_needmove: true,
|
||||
workorder_type: null,
|
||||
passback_status: null,
|
||||
operator: null,
|
||||
workshop_code: null,
|
||||
ext_id: null,
|
||||
is_delete: false,
|
||||
@@ -379,7 +420,7 @@ const defaultForm = {
|
||||
}
|
||||
export default {
|
||||
name: 'PdmBdWorkorder',
|
||||
dicts: ['vehicle_type', 'pdm_workorder_status'],
|
||||
dicts: ['vehicle_type', 'pdm_workorder_status', 'Team'],
|
||||
components: { MaterialDialog, pagination, crudOperation, rrOperation, udOperation },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
@@ -425,7 +466,8 @@ export default {
|
||||
regionList: [],
|
||||
pointList: [],
|
||||
regionCodeParam: null,
|
||||
materialDialog: false
|
||||
materialDialog: false,
|
||||
fullscreenLoading: false
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@@ -492,6 +534,29 @@ export default {
|
||||
this.crud.query.more_order_status = value.toString()
|
||||
}
|
||||
this.crud.toQuery()
|
||||
},
|
||||
// 下发
|
||||
submits(row) {
|
||||
this.fullscreenLoading = true
|
||||
crudPdmBdWorkorder.submits(row).then(res => {
|
||||
this.crud.notify('下发成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
}).catch(() => {
|
||||
this.fullscreenLoading = false
|
||||
}).finally(() => {
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
},
|
||||
forceFinish(row) {
|
||||
this.fullscreenLoading = true
|
||||
crudPdmBdWorkorder.forceFinish(row).then(res => {
|
||||
this.crud.notify('报工完成', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
}).catch(() => {
|
||||
this.fullscreenLoading = false
|
||||
}).finally(() => {
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,4 +24,20 @@ export function edit(data) {
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del }
|
||||
export function submits(param) {
|
||||
return request({
|
||||
url: 'api/pdmBdWorkorder/submits',
|
||||
method: 'post',
|
||||
data: param
|
||||
})
|
||||
}
|
||||
|
||||
export function forceFinish(param) {
|
||||
return request({
|
||||
url: 'api/pdmBdWorkorder/forceFinish',
|
||||
method: 'post',
|
||||
data: param
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, submits, forceFinish }
|
||||
|
||||
@@ -254,8 +254,6 @@
|
||||
<!-- <el-table-column prop="flow_code" label="流程编码" :min-width="flexWidth('flow_code',crud.data,'流程编码')"/>-->
|
||||
<!-- <el-table-column prop="flow_num" label="流程顺序" :min-width="flexWidth('flow_num',crud.data,'流程顺序')"/>-->
|
||||
<el-table-column prop="move_way" label="移动途径" :min-width="flexWidth('move_way',crud.data,'移动途径')" />
|
||||
<el-table-column prop="before_task_code" label="上一任务" :min-width="flexWidth('before_task_code',crud.data,'上一任务')" />
|
||||
<el-table-column prop="next_task_code" label="下一任务" :min-width="flexWidth('next_task_code',crud.data,'上一任务')" />
|
||||
<el-table-column prop="remark" label="备注" :min-width="flexWidth('remark',crud.data,'备注')" />
|
||||
<el-table-column prop="create_name" label="创建人" :min-width="flexWidth('create_name',crud.data,'创建人')" />
|
||||
<el-table-column prop="create_time" label="创建时间" :min-width="flexWidth('create_time',crud.data,'创建时间')" />
|
||||
|
||||
@@ -180,11 +180,11 @@
|
||||
</el-table-column>
|
||||
<el-table-column prop="remark" label="提示信息" :min-width="flexWidth('remark',crud.data,'提示信息')" />
|
||||
<el-table-column prop="config_code" label="配置编码" :min-width="flexWidth('config_code',crud.data,'配置编码')" />
|
||||
<el-table-column prop="point_code1" label="起点1" :min-width="flexWidth('point_code1',crud.data,'点位1')" />
|
||||
<el-table-column prop="point_code2" label="终点1" :min-width="flexWidth('point_code2',crud.data,'点位2')" />
|
||||
<el-table-column prop="point_code3" label="起点2" :min-width="flexWidth('point_code3',crud.data,'点位3')" />
|
||||
<el-table-column prop="point_code4" label="终点2" :min-width="flexWidth('point_code4',crud.data,'点位4')" />
|
||||
<el-table-column prop="start_wait_point" label="取货等待点" :min-width="flexWidth('start_wait_point',crud.data,'取货等待点')" />
|
||||
<el-table-column prop="point_code1" label="起点" :min-width="flexWidth('point_code1',crud.data,'点位1')" />
|
||||
<el-table-column prop="point_code2" label="终点" :min-width="flexWidth('point_code2',crud.data,'点位2')" />
|
||||
<!-- <el-table-column prop="point_code3" label="起点2" :min-width="flexWidth('point_code3',crud.data,'点位3')" />-->
|
||||
<!-- <el-table-column prop="point_code4" label="终点2" :min-width="flexWidth('point_code4',crud.data,'点位4')" />-->
|
||||
<!-- <el-table-column prop="start_wait_point" label="取货等待点" :min-width="flexWidth('start_wait_point',crud.data,'取货等待点')" />-->
|
||||
<el-table-column prop="next_wait_point" label="放货等待点" :min-width="flexWidth('next_wait_point',crud.data,'放货等待点')" />
|
||||
<el-table-column prop="vehicle_type" label="载具类型" :min-width="flexWidth('vehicle_type',crud.data,'载具类型', 20)">
|
||||
<template slot-scope="scope">
|
||||
|
||||
Reference in New Issue
Block a user