出入库初始化
This commit is contained in:
@@ -8,442 +8,386 @@
|
||||
:inline="true"
|
||||
class="demo-form-inline"
|
||||
label-position="right"
|
||||
label-width="90px"
|
||||
label-width="80px"
|
||||
label-suffix=":"
|
||||
>
|
||||
<el-form-item label="单据编号">
|
||||
<el-form-item label="模糊查询">
|
||||
<el-input
|
||||
v-model="query.bill_code"
|
||||
size="mini"
|
||||
clearable
|
||||
placeholder="单据编号"
|
||||
style="width: 185px;"
|
||||
class="filter-item"
|
||||
placeholder="入库单号"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料编码">
|
||||
<el-input
|
||||
v-model="query.material_code"
|
||||
clearable
|
||||
placeholder="物料编码、名称"
|
||||
style="width: 185px;"
|
||||
class="filter-item"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="载具编号">
|
||||
<el-input
|
||||
v-model="query.vehicle_code"
|
||||
clearable
|
||||
placeholder="载具编码"
|
||||
style="width: 185px;"
|
||||
class="filter-item"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="批次">
|
||||
<el-input
|
||||
v-model="query.pcsn"
|
||||
clearable
|
||||
placeholder="批次"
|
||||
style="width: 185px;"
|
||||
class="filter-item"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="单据状态">
|
||||
<el-form-item label="所属仓库">
|
||||
<el-select
|
||||
v-model="query.bill_status"
|
||||
v-model="query.stor_id"
|
||||
clearable
|
||||
filterable
|
||||
size="mini"
|
||||
placeholder="全部"
|
||||
class="filter-item"
|
||||
style="width: 185px;"
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.st_bill_status"
|
||||
v-for="item in storlist"
|
||||
:key="item.stor_id"
|
||||
:label="item.stor_name"
|
||||
:value="item.stor_id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="创建时间">
|
||||
<el-date-picker
|
||||
v-model="query.createTime"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:default-time="['00:00:00', '23:59:59']"
|
||||
@change="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="生成方式">
|
||||
<el-select
|
||||
v-model="query.create_mode"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="生成方式"
|
||||
class="filter-item"
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.ST_CREATE_MODE"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="起始点位">
|
||||
<el-input
|
||||
v-model="query.start_point_code"
|
||||
|
||||
<el-form-item label="单据状态">
|
||||
<el-select
|
||||
v-model="query.bill_status"
|
||||
clearable
|
||||
placeholder="点位编码、名称"
|
||||
style="width: 185px;"
|
||||
size="mini"
|
||||
placeholder="单据状态"
|
||||
class="filter-item"
|
||||
/>
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.io_bill_status"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="终点点位">
|
||||
<el-input
|
||||
v-model="query.end_point_code"
|
||||
|
||||
<el-form-item label="业务类型">
|
||||
<el-select
|
||||
v-model="query.bill_type"
|
||||
clearable
|
||||
placeholder="点位编码、名称"
|
||||
style="width: 185px;"
|
||||
filterable
|
||||
size="mini"
|
||||
placeholder="业务类型"
|
||||
class="filter-item"
|
||||
/>
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in billtypelist"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="起始区域">
|
||||
<el-input
|
||||
v-model="query.start_region_code"
|
||||
clearable
|
||||
placeholder="区域编码、名称"
|
||||
style="width: 185px;"
|
||||
class="filter-item"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="终点区域">
|
||||
<el-input
|
||||
v-model="query.end_region_code"
|
||||
clearable
|
||||
placeholder="区域编码、名称"
|
||||
style="width: 185px;"
|
||||
class="filter-item"
|
||||
/>
|
||||
</el-form-item>
|
||||
<rrOperation :crud="crud" />
|
||||
<rrOperation />
|
||||
</el-form>
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission">
|
||||
<!-- <el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="warning"
|
||||
icon="el-icon-check"
|
||||
size="mini"
|
||||
:disabled="audit_flag"
|
||||
@click="audit"
|
||||
>
|
||||
审核
|
||||
</el-button>-->
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
:disabled="dis_flag"
|
||||
icon="el-icon-position"
|
||||
size="mini"
|
||||
:loading="loading"
|
||||
:disabled="crud.selections.length !== 1"
|
||||
@click="createTask"
|
||||
@click="divOpen"
|
||||
>
|
||||
生成任务
|
||||
分配
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
:disabled="dis_flag"
|
||||
icon="el-icon-position"
|
||||
size="mini"
|
||||
@click="taskOpen"
|
||||
>
|
||||
作业任务
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="warning"
|
||||
icon="el-icon-check"
|
||||
size="mini"
|
||||
:disabled="task_flag"
|
||||
@click="confirm"
|
||||
>
|
||||
强制确认
|
||||
</el-button>
|
||||
</crudOperation>
|
||||
<!--表单组件-->
|
||||
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0 || crud.status.view > 0 " :title="crud.status.title" width="700px">
|
||||
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="100px">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="物料" prop="material_id">
|
||||
<label slot="label">物 料:</label>
|
||||
<el-input v-model="form.material_name" style="width: 200px;" :disabled="crud.status.view > 0" @focus="getMater" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="批次">
|
||||
<label slot="label">批 次:</label>
|
||||
<el-input v-model="form.pcsn" style="width: 200px;" :disabled="crud.status.view > 0" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="载具编码:">
|
||||
<el-input v-model="form.vehicle_code" style="width: 200px;" :disabled="crud.status.view > 0" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="数量" prop="qty">
|
||||
<label slot="label">数 量:</label>
|
||||
<el-input v-model="form.qty" style="width: 200px;" :disabled="crud.status.view > 0" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="起始区域:" prop="start_region_id">
|
||||
<el-select
|
||||
v-model="form.start_region_id"
|
||||
placeholder="请选择"
|
||||
style="width: 200px;"
|
||||
:disabled="crud.status.view > 0"
|
||||
@change="changeStart"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in reginoList"
|
||||
:label="item.region_name"
|
||||
:value="item.region_id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="终点区域:" prop="end_region_id">
|
||||
<el-select
|
||||
v-model="form.end_region_id"
|
||||
placeholder="请选择"
|
||||
style="width: 200px;"
|
||||
:disabled="crud.status.view > 0"
|
||||
@change="changeEnd"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in reginoList"
|
||||
:label="item.region_name"
|
||||
:value="item.region_id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="起始点位:" prop="start_point_code">
|
||||
<el-input v-model="form.start_point_name" style="width: 200px;" :disabled="crud.status.view > 0" @focus="openStartPonit" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="终点点位:" prop="end_point_code">
|
||||
<el-input v-model="form.end_point_name" style="width: 200px;" :disabled="crud.status.view > 0" @focus="openEndPonit" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="备注:">
|
||||
<el-input v-model="form.remark" type="textarea" style="width: 530px;" :disabled="crud.status.view > 0" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</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" :disabled="crud.status.view > 0" @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
|
||||
ref="table"
|
||||
v-loading="crud.loading"
|
||||
size="mini"
|
||||
:data="crud.data"
|
||||
highlight-current-row
|
||||
style="width: 100%;"
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
@current-change="handleCurrentChange"
|
||||
@select="handleSelectionChange"
|
||||
@select-all="onSelectAll"
|
||||
>
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column v-if="false" prop="iostorinv_id" label="出入单标识" />
|
||||
<el-table-column prop="bill_code" label="单据编号" show-overflow-tooltip width="120px">
|
||||
<template slot-scope="scope">
|
||||
<el-link type="warning" @click="crud.toView(scope.row)">{{ scope.row.bill_code }}</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="bill_status" label="单据状态">
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.st_bill_status[scope.row.bill_status] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="material_code" label="物料编码" show-overflow-tooltip width="120px" />
|
||||
<el-table-column prop="material_name" label="物料名称" show-overflow-tooltip width="120px" />
|
||||
<el-table-column prop="pcsn" label="批次" />
|
||||
<el-table-column prop="vehicle_code" label="载具编码" />
|
||||
<el-table-column prop="qty" label="数量" :formatter="crud.formatNum2" />
|
||||
<el-table-column prop="unit_name" label="单位" />
|
||||
<el-table-column prop="start_point_name" label="起始点位" show-overflow-tooltip width="120px" />
|
||||
<el-table-column prop="end_point_name" label="终点点位" show-overflow-tooltip width="120px" />
|
||||
<el-table-column prop="start_region_name" label="起始区域" />
|
||||
<el-table-column prop="end_region_name" label="终点区域" />
|
||||
<el-table-column prop="task_id" label="任务标识" show-overflow-tooltip width="120px" />
|
||||
<el-table-column prop="create_mode" label="生成方式">
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.ST_CREATE_MODE[scope.row.create_mode] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="remark" label="备注" show-overflow-tooltip />
|
||||
<el-table-column prop="create_name" label="创建人" />
|
||||
<el-table-column prop="create_time" label="创建时间" show-overflow-tooltip width="140px" />
|
||||
<el-table-column prop="update_optname" label="修改人" />
|
||||
<el-table-column prop="update_time" label="修改时间" show-overflow-tooltip width="140px" />
|
||||
<el-table-column prop="confirm_optname" label="确认人" />
|
||||
<el-table-column prop="confirm_time" label="确认时间" show-overflow-tooltip width="140px" />
|
||||
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
|
||||
<el-table-column
|
||||
label="操作"
|
||||
width="115"
|
||||
align="center"
|
||||
fixed="right"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<udOperation
|
||||
:disabled-edit="scope.row.bill_status !== '10'"
|
||||
:disabled-dle="scope.row.bill_status !== '10'"
|
||||
:data="scope.row"
|
||||
:permission="permission"
|
||||
:disabled-edit="canUd(scope.row)"
|
||||
:disabled-dle="canUd(scope.row)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="bill_code" width="130" label="订单编码">
|
||||
<template slot-scope="scope">
|
||||
<el-link type="warning" @click="toView(scope.$index, scope.row)">{{ scope.row.bill_code }}</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip :formatter="stateFormat" prop="bill_status" label="单据状态" />
|
||||
<el-table-column prop="stor_name" label="仓库" />
|
||||
<el-table-column show-overflow-tooltip prop="bill_type" min-width="120" :formatter="bill_typeFormat" label="业务类型" />
|
||||
<el-table-column show-overflow-tooltip min-width="120" prop="biz_date" label="业务日期" />
|
||||
<el-table-column show-overflow-tooltip prop="create_mode" :formatter="create_modeFormat" label="生成方式" />
|
||||
<el-table-column label="明细数" align="center" prop="detail_count" />
|
||||
<el-table-column label="总重量" align="center" prop="total_qty">
|
||||
<template slot-scope="scope">
|
||||
{{ fun(scope.row.total_qty) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column label="制单人" align="center" prop="input_optname" />
|
||||
<el-table-column label="制单时间" align="center" prop="input_time" width="150" />
|
||||
<el-table-column label="修改人" align="center" prop="update_optname" />
|
||||
<el-table-column label="修改时间" align="center" prop="update_time" width="150" />
|
||||
<el-table-column label="分配人" align="center" prop="dis_optname" />
|
||||
<el-table-column label="分配时间" align="center" prop="dis_time" width="150" />
|
||||
<el-table-column label="确认人" align="center" prop="confirm_optname" width="150" />
|
||||
<el-table-column label="确认时间" align="center" prop="confirm_time" width="150" />
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</div>
|
||||
<MaterDialog :dialog-show.sync="materDialog" @setMaterValue="setMaterValue" />
|
||||
<PointDialog :dialog-show.sync="pointDialog" :open-param="pointParam" @tableChanged2="tableChanged2" />
|
||||
<AddDialog @AddChanged="querytable" />
|
||||
<ViewDialog :dialog-show.sync="viewShow" :rowmst="mstrow" @AddChanged="querytable" />
|
||||
<DivDialog :dialog-show.sync="divShow" :open-param="openParam" :bill-type="billType" :buss-config="bussConfig" @AddChanged="querytable" />
|
||||
<TaskDialog :dialog-show.sync="taskShow" :open-param="openParam" :buss-config="bussConfig" @AddChanged="querytable" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudRegionioIn from '@/views/wms/st/inbill/regionioIn'
|
||||
import MaterDialog from '@/views/wms/pub/MaterDialog'
|
||||
import PointDialog from '@/views/wms/pub/PointDialog'
|
||||
import CRUD, { crud, form, header, presenter } from '@crud/crud'
|
||||
import rawAssist from '@/views/wms/st/inbill/rawassist'
|
||||
import crudRawAssist from '@/views/wms/st/inbill/rawassist'
|
||||
import CRUD, { crud, 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 crudPoint from '@/views/wms/sch/point/point'
|
||||
import DateRangePicker from '@/components/DateRangePicker/index'
|
||||
import AddDialog from '@/views/wms/st/inbill/AddDialog'
|
||||
import DivDialog from '@/views/wms/st/inbill/DivDialog'
|
||||
import ViewDialog from '@/views/wms/st/inbill/ViewDialog'
|
||||
import TaskDialog from '@/views/wms/st/inbill/TaskDialog'
|
||||
import { mapGetters } from 'vuex'
|
||||
import crudStorattr from '@/views/wms/basedata/st/stor/storattr'
|
||||
|
||||
const defaultForm = {
|
||||
iostorinv_id: null,
|
||||
bill_code: null,
|
||||
io_type: null,
|
||||
material_id: null,
|
||||
material_name: null,
|
||||
pcsn: null,
|
||||
vehicle_code: null,
|
||||
qty: null,
|
||||
qty_unit_id: null,
|
||||
bill_status: null,
|
||||
start_point_code: null,
|
||||
end_point_code: null,
|
||||
start_point_name: null,
|
||||
end_point_name: null,
|
||||
start_region_id: null,
|
||||
end_region_id: null,
|
||||
cust_id: null,
|
||||
create_mode: null,
|
||||
task_id: null,
|
||||
remark: null,
|
||||
create_id: null,
|
||||
create_name: null,
|
||||
create_time: null,
|
||||
update_optid: null,
|
||||
update_optname: null,
|
||||
update_time: null,
|
||||
confirm_optid: null,
|
||||
confirm_optname: null,
|
||||
confirm_time: null,
|
||||
is_delete: null
|
||||
}
|
||||
export default {
|
||||
name: 'RegionioIn',
|
||||
dicts: ['st_bill_status', 'ST_CREATE_MODE'],
|
||||
components: { pagination, crudOperation, rrOperation, udOperation, MaterDialog, PointDialog },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
name: 'Rawassist',
|
||||
components: { ViewDialog, AddDialog, crudOperation, rrOperation, udOperation, pagination, DateRangePicker, DivDialog, TaskDialog },
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '区域入库',
|
||||
url: 'api/regionioIn',
|
||||
title: '',
|
||||
optShow: { add: true, reset: true },
|
||||
query: { buss_type: '0001' },
|
||||
idField: 'iostorinv_id',
|
||||
sort: 'iostorinv_id,desc',
|
||||
crudMethod: { ...crudRegionioIn },
|
||||
optShow: {
|
||||
add: true,
|
||||
edit: false,
|
||||
del: false,
|
||||
download: false,
|
||||
reset: true
|
||||
}
|
||||
url: '/api/in/rawAssist',
|
||||
crudMethod: { ...rawAssist }
|
||||
})
|
||||
},
|
||||
mixins: [presenter(), header(), crud()],
|
||||
// 数据字典
|
||||
dicts: ['io_bill_status', 'ST_CREATE_MODE'],
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
is_startOrEnd: null,
|
||||
pointParam: null,
|
||||
end_region_param: null,
|
||||
reginoList: [],
|
||||
materDialog: false,
|
||||
pointDialog: false,
|
||||
permission: {},
|
||||
rules: {
|
||||
material_id: [
|
||||
{ required: true, message: '物料不能为空', trigger: 'blur' }
|
||||
],
|
||||
qty: [
|
||||
{ required: true, message: '数量不能为空', trigger: 'blur' }
|
||||
],
|
||||
start_region_id: [
|
||||
{ required: true, message: '起点区域不能为空', trigger: 'blur' }
|
||||
],
|
||||
end_region_id: [
|
||||
{ required: true, message: '终点区域不能为空', trigger: 'blur' }
|
||||
],
|
||||
start_point_code: [
|
||||
{ required: true, message: '起点点位不能为空', trigger: 'blur' }
|
||||
],
|
||||
end_point_code: [
|
||||
{ required: true, message: '终点点位不能为空', trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
height: document.documentElement.clientHeight - 180 + 'px;',
|
||||
permission: {
|
||||
add: ['admin', 'user:add'],
|
||||
edit: ['admin', 'user:edit'],
|
||||
del: ['admin', 'user:del']
|
||||
},
|
||||
audit_flag: true,
|
||||
dis_flag: true,
|
||||
task_flag: true,
|
||||
disShow: false,
|
||||
viewShow: false,
|
||||
mstrow: {},
|
||||
divShow: false,
|
||||
taskShow: false,
|
||||
openParam: [],
|
||||
billType: null,
|
||||
bussConfig: null,
|
||||
currentRow: null,
|
||||
storlist: [],
|
||||
billtypelist: [],
|
||||
createtypelist: [],
|
||||
statuslist: []
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'user'
|
||||
])
|
||||
},
|
||||
mounted: function() {
|
||||
const that = this
|
||||
window.onresize = function temp() {
|
||||
that.height = document.documentElement.clientHeight - 180 + 'px;'
|
||||
}
|
||||
},
|
||||
created() {
|
||||
crudPoint.getRegion().then(res => {
|
||||
this.reginoList = res
|
||||
crudStorattr.getStor({ 'is_materialstore': '1' }).then(res => {
|
||||
this.storlist = res.content
|
||||
})
|
||||
crudRawAssist.getType({ 'io_code': '0001', 'io_flag': '00' }).then(res => {
|
||||
this.billtypelist = res
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
fun(val) {
|
||||
return Number(val).toFixed(3)
|
||||
},
|
||||
getMater() {
|
||||
this.materDialog = true
|
||||
canUd(row) {
|
||||
return row.bill_status !== '10'
|
||||
},
|
||||
setMaterValue(row) {
|
||||
debugger
|
||||
this.form.material_id = row.material_id
|
||||
this.form.material_name = row.material_name
|
||||
},
|
||||
changeStart(val) {
|
||||
this.pointParam = val
|
||||
this.form.start_point_name = null
|
||||
this.form.start_point_code = null
|
||||
},
|
||||
changeEnd(val) {
|
||||
if (this.form.start_point_code === null) {
|
||||
this.form.end_region_id = null
|
||||
this.crud.notify('请先选择起始点位', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return false
|
||||
handleSelectionChange(val, row) {
|
||||
if (val.length > 1) {
|
||||
this.$refs.table.clearSelection()
|
||||
this.$refs.table.toggleRowSelection(val.pop())
|
||||
this.buttonChange(row)
|
||||
} else if (val.length === 1) {
|
||||
this.buttonChange(row)
|
||||
} else {
|
||||
this.pointParam = val
|
||||
this.form.end_point_name = null
|
||||
this.form.end_point_code = null
|
||||
this.handleCurrentChange(null)
|
||||
}
|
||||
},
|
||||
openStartPonit() {
|
||||
if (this.form.start_region_id === null) {
|
||||
return this.crud.notify('请选择起始区域', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
}
|
||||
// 1代表起始点位
|
||||
this.is_startOrEnd = '1'
|
||||
this.pointDialog = true
|
||||
onSelectAll() {
|
||||
this.$refs.table.clearSelection()
|
||||
this.handleCurrentChange(null)
|
||||
},
|
||||
openEndPonit() {
|
||||
if (this.form.end_region_id === null) {
|
||||
return this.crud.notify('请选择终点区域', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
}
|
||||
// 2代表终点点位
|
||||
this.is_startOrEnd = '2'
|
||||
this.pointDialog = true
|
||||
},
|
||||
tableChanged2(row) {
|
||||
if (this.is_startOrEnd === '1') {
|
||||
this.form.start_point_code = row.point_code
|
||||
this.form.start_point_name = row.point_name
|
||||
} else {
|
||||
this.form.end_point_code = row.point_code
|
||||
this.form.end_point_name = row.point_name
|
||||
buttonChange(currentRow) {
|
||||
if (currentRow !== null) {
|
||||
this.currentRow = currentRow
|
||||
if (currentRow.bill_status === '10' || currentRow.bill_status === '20' || currentRow.bill_status === '30' || currentRow.bill_status === '40') {
|
||||
this.dis_flag = false
|
||||
} else {
|
||||
this.dis_flag = true
|
||||
}
|
||||
if (currentRow.bill_status === '30' || currentRow.bill_status === '40') {
|
||||
this.task_flag = false
|
||||
} else {
|
||||
this.task_flag = true
|
||||
}
|
||||
}
|
||||
},
|
||||
createTask() {
|
||||
const _selectData = this.$refs.table.selection
|
||||
if (_selectData[0].bill_status !== '10') {
|
||||
return this.crud.notify('只能对生成状态的单据生成任务', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
handleCurrentChange(currentRow) {
|
||||
if (currentRow === null) {
|
||||
this.dis_flag = true
|
||||
this.task_flag = true
|
||||
this.currentRow = {}
|
||||
}
|
||||
const data = _selectData[0]
|
||||
this.loading = true
|
||||
crudRegionioIn.createTask(data).then(res => {
|
||||
},
|
||||
bill_typeFormat(row, column) {
|
||||
for (const item of this.billtypelist) {
|
||||
if (item.code == row.bill_type) {
|
||||
return item.name
|
||||
}
|
||||
}
|
||||
},
|
||||
toView(index, row) {
|
||||
this.mstrow = row
|
||||
this.viewShow = true
|
||||
},
|
||||
confirm() {
|
||||
if (!this.currentRow) {
|
||||
this.crud.notify('请选择一条单据', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
crudRawAssist.confirm(this.currentRow).then(res => {
|
||||
this.crud.notify('单据确认成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.loading = false
|
||||
}).catch(() => {
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
stateFormat(row, column) {
|
||||
return this.dict.label.io_bill_status[row.bill_status]
|
||||
},
|
||||
create_modeFormat(row, column) {
|
||||
return this.dict.label.ST_CREATE_MODE[row.create_mode]
|
||||
},
|
||||
divOpen() {
|
||||
crudRawAssist.getIODtl({ 'bill_code': this.currentRow.bill_code, 'open_flag': '1' }).then(res => {
|
||||
this.openParam = res
|
||||
this.billType = this.currentRow.bill_type
|
||||
this.divShow = true
|
||||
})
|
||||
},
|
||||
querytable() {
|
||||
this.onSelectAll()
|
||||
this.crud.toQuery()
|
||||
},
|
||||
taskOpen() {
|
||||
crudRawAssist.getIODtl({ 'bill_code': this.currentRow.bill_code, 'open_flag': '2' }).then(res => {
|
||||
this.openParam = res
|
||||
this.taskShow = true
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
::v-deep .el-dialog__body {
|
||||
padding-top: 10px;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user