|
@@ -1,22 +1,16 @@
|
|
<template>
|
|
<template>
|
|
<a-card :bordered="false" v-show="visible" class="card" :title="modalTitle">
|
|
<a-card :bordered="false" v-show="visible" class="card" :title="modalTitle">
|
|
<a-form :form="form">
|
|
<a-form :form="form">
|
|
- <a-form-item v-show="false" >
|
|
|
|
- <a-input v-decorator="['id']" type="hidden"/>
|
|
|
|
- <a-input v-decorator="['storeId']" type="hidden"/>
|
|
|
|
- <a-input v-decorator="['pickId']" type="hidden"/>
|
|
|
|
- <a-input v-decorator="['outFlag']" type="hidden"/>
|
|
|
|
|
|
+ <a-form-item v-show="false">
|
|
|
|
+ <a-input v-decorator="['id']" type="hidden" />
|
|
|
|
+ <a-input v-decorator="['storeId']" type="hidden" />
|
|
|
|
+ <a-input v-decorator="['pickId']" type="hidden" />
|
|
|
|
+ <a-input v-decorator="['outFlag']" type="hidden" />
|
|
</a-form-item>
|
|
</a-form-item>
|
|
<a-row :gutter="24">
|
|
<a-row :gutter="24">
|
|
<a-col :lg="12" :md="24" :sm="24">
|
|
<a-col :lg="12" :md="24" :sm="24">
|
|
- <a-form-item
|
|
|
|
- label="出库单号"
|
|
|
|
- :labelCol="BaseTool.Constant.labelCol"
|
|
|
|
- :wrapperCol="BaseTool.Constant.wrapperCol"
|
|
|
|
- >
|
|
|
|
- <a-input
|
|
|
|
- disabled
|
|
|
|
- v-decorator="['outNo', {rules: [{required: false, message: '出库单号不能为空'}]}]" />
|
|
|
|
|
|
+ <a-form-item label="出库单号" :labelCol="BaseTool.Constant.labelCol" :wrapperCol="BaseTool.Constant.wrapperCol">
|
|
|
|
+ <a-input disabled v-decorator="['outNo', {rules: [{required: false, message: '出库单号不能为空'}]}]" />
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
<!-- <a-col :lg="12" :md="24" :sm="24">
|
|
<!-- <a-col :lg="12" :md="24" :sm="24">
|
|
@@ -52,18 +46,8 @@
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>-->
|
|
</a-col>-->
|
|
<a-col :lg="12" :md="24" :sm="24">
|
|
<a-col :lg="12" :md="24" :sm="24">
|
|
- <a-form-item
|
|
|
|
- label="申请部门"
|
|
|
|
- :labelCol="BaseTool.Constant.labelCol"
|
|
|
|
- :wrapperCol="BaseTool.Constant.wrapperCol"
|
|
|
|
- >
|
|
|
|
- <a-tree-select
|
|
|
|
- style="width: 100%"
|
|
|
|
- :dropdownStyle="{ maxHeight: '400px', overflow: 'auto' }"
|
|
|
|
- :treeData="deptYYMap"
|
|
|
|
- v-decorator="['applyDept', {initValue: '09', rules: [{required: true, message: '申请部门不能为空'}]}]"
|
|
|
|
- placeholder="请选择"
|
|
|
|
- >
|
|
|
|
|
|
+ <a-form-item label="申请部门" :labelCol="BaseTool.Constant.labelCol" :wrapperCol="BaseTool.Constant.wrapperCol">
|
|
|
|
+ <a-tree-select style="width: 100%" :dropdownStyle="{ maxHeight: '400px', overflow: 'auto' }" :treeData="deptYYMap" v-decorator="['applyDept', {initValue: '09', rules: [{required: true, message: '申请部门不能为空'}]}]" placeholder="请选择">
|
|
</a-tree-select>
|
|
</a-tree-select>
|
|
<!-- <a-select @change="typeChange" v-decorator="['applyDept', {initValue: 1, rules: [{required: true, message: '申请部门不能为空'}]}]" placeholder="请选择">
|
|
<!-- <a-select @change="typeChange" v-decorator="['applyDept', {initValue: 1, rules: [{required: true, message: '申请部门不能为空'}]}]" placeholder="请选择">
|
|
<a-select-option
|
|
<a-select-option
|
|
@@ -76,17 +60,9 @@
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :lg="12" :md="24" :sm="24">
|
|
<a-col :lg="12" :md="24" :sm="24">
|
|
- <a-form-item
|
|
|
|
- label="出库类型"
|
|
|
|
- :labelCol="BaseTool.Constant.labelCol"
|
|
|
|
- :wrapperCol="BaseTool.Constant.wrapperCol"
|
|
|
|
- >
|
|
|
|
|
|
+ <a-form-item label="出库类型" :labelCol="BaseTool.Constant.labelCol" :wrapperCol="BaseTool.Constant.wrapperCol">
|
|
<a-select @change="typeChange" v-decorator="['type', {initValue: 1, rules: [{required: true, message: '出库类型不能为空'}]}]" placeholder="请选择">
|
|
<a-select @change="typeChange" v-decorator="['type', {initValue: 1, rules: [{required: true, message: '出库类型不能为空'}]}]" placeholder="请选择">
|
|
- <a-select-option
|
|
|
|
- v-for="(label,value) in typeMap"
|
|
|
|
- :key="value"
|
|
|
|
- :label="label"
|
|
|
|
- :value="parseInt(value)">{{ label }}
|
|
|
|
|
|
+ <a-select-option v-for="(label,value) in typeMap" :key="value" :label="label" :value="parseInt(value)">{{ label }}
|
|
</a-select-option>
|
|
</a-select-option>
|
|
</a-select>
|
|
</a-select>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
@@ -108,29 +84,14 @@
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>-->
|
|
</a-col>-->
|
|
<a-col :lg="12" :md="24" :sm="24">
|
|
<a-col :lg="12" :md="24" :sm="24">
|
|
- <a-form-item
|
|
|
|
- label="领用日期"
|
|
|
|
- :labelCol="BaseTool.Constant.labelCol"
|
|
|
|
- :wrapperCol="BaseTool.Constant.wrapperCol"
|
|
|
|
- >
|
|
|
|
- <a-date-picker
|
|
|
|
- style="width: 100%"
|
|
|
|
- :format="BaseTool.Date.PICKER_NORM_DATE_PATTERN"
|
|
|
|
- v-decorator="['userTime', {rules: [{required: true, message: '操作时间不能为空'}]}]" />
|
|
|
|
|
|
+ <a-form-item label="领用日期" :labelCol="BaseTool.Constant.labelCol" :wrapperCol="BaseTool.Constant.wrapperCol">
|
|
|
|
+ <a-date-picker style="width: 100%" :format="BaseTool.Date.PICKER_NORM_DATE_PATTERN" v-decorator="['userTime', {rules: [{required: true, message: '操作时间不能为空'}]}]" />
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :lg="12" :md="24" :sm="24">
|
|
<a-col :lg="12" :md="24" :sm="24">
|
|
- <a-form-item
|
|
|
|
- label="成本归属"
|
|
|
|
- :labelCol="BaseTool.Constant.labelCol"
|
|
|
|
- :wrapperCol="BaseTool.Constant.wrapperCol"
|
|
|
|
- >
|
|
|
|
|
|
+ <a-form-item label="成本归属" :labelCol="BaseTool.Constant.labelCol" :wrapperCol="BaseTool.Constant.wrapperCol">
|
|
<a-select v-decorator="['feeFrom', {rules: [{required: true, message: '成本归属不能为空'}]}]" placeholder="请选择">
|
|
<a-select v-decorator="['feeFrom', {rules: [{required: true, message: '成本归属不能为空'}]}]" placeholder="请选择">
|
|
- <a-select-option
|
|
|
|
- v-for="(label,value) in feeFromMap"
|
|
|
|
- :key="value"
|
|
|
|
- :label="label"
|
|
|
|
- :value="value">{{ label }}
|
|
|
|
|
|
+ <a-select-option v-for="(label,value) in feeFromMap" :key="value" :label="label" :value="value">{{ label }}
|
|
</a-select-option>
|
|
</a-select-option>
|
|
</a-select>
|
|
</a-select>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
@@ -145,62 +106,28 @@
|
|
<!-- placeholder="请选择"-->
|
|
<!-- placeholder="请选择"-->
|
|
<!-- >-->
|
|
<!-- >-->
|
|
<a-col :lg="12" :md="24" :sm="24">
|
|
<a-col :lg="12" :md="24" :sm="24">
|
|
- <a-form-item
|
|
|
|
- label="厂区"
|
|
|
|
- :labelCol="BaseTool.Constant.labelCol"
|
|
|
|
- :wrapperCol="BaseTool.Constant.wrapperCol"
|
|
|
|
- >
|
|
|
|
|
|
+ <a-form-item label="厂区" :labelCol="BaseTool.Constant.labelCol" :wrapperCol="BaseTool.Constant.wrapperCol">
|
|
<a-select v-model="tokenType" placeholder="请选择" @change="setTree">
|
|
<a-select v-model="tokenType" placeholder="请选择" @change="setTree">
|
|
- <a-select-option
|
|
|
|
- v-for="(label,value) in flagMap"
|
|
|
|
- :key="value"
|
|
|
|
- :label="label"
|
|
|
|
- :value="parseInt(value)">{{ label }}
|
|
|
|
|
|
+ <a-select-option v-for="(label,value) in flagMap" :key="value" :label="label" :value="parseInt(value)">{{ label }}
|
|
</a-select-option>
|
|
</a-select-option>
|
|
</a-select>
|
|
</a-select>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :lg="12" :md="24" :sm="24">
|
|
<a-col :lg="12" :md="24" :sm="24">
|
|
- <a-form-item
|
|
|
|
- label="用途备注"
|
|
|
|
- :labelCol="BaseTool.Constant.labelCol"
|
|
|
|
- :wrapperCol="BaseTool.Constant.wrapperCol"
|
|
|
|
- >
|
|
|
|
- <a-textarea
|
|
|
|
- :rows="4"
|
|
|
|
- v-decorator="['remark', {rules: [{required: false, message: '备注不能为空'}]}]"/>
|
|
|
|
|
|
+ <a-form-item label="用途备注" :labelCol="BaseTool.Constant.labelCol" :wrapperCol="BaseTool.Constant.wrapperCol">
|
|
|
|
+ <a-textarea :rows="4" v-decorator="['remark', {rules: [{required: false, message: '备注不能为空'}]}]" />
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
|
|
|
|
<a-col :lg="12" :md="24" :sm="24">
|
|
<a-col :lg="12" :md="24" :sm="24">
|
|
- <a-form-item
|
|
|
|
- label="项目:"
|
|
|
|
- :labelCol="BaseTool.Constant.labelCol"
|
|
|
|
- :wrapperCol="BaseTool.Constant.wrapperCol"
|
|
|
|
- >
|
|
|
|
- <a-tree-select
|
|
|
|
- style="width: 100%"
|
|
|
|
- :treeData="treeData"
|
|
|
|
- :showSearch="true"
|
|
|
|
- tree-node-filter-prop="title"
|
|
|
|
- :dropdownStyle="{ maxHeight: '400px', overflow: 'auto' }"
|
|
|
|
- v-decorator="['projectId']"
|
|
|
|
- placeholder="请选择"
|
|
|
|
- >
|
|
|
|
|
|
+ <a-form-item label="项目:" :labelCol="BaseTool.Constant.labelCol" :wrapperCol="BaseTool.Constant.wrapperCol">
|
|
|
|
+ <a-tree-select style="width: 100%" :treeData="treeData" :showSearch="true" tree-node-filter-prop="title" :dropdownStyle="{ maxHeight: '400px', overflow: 'auto' }" v-decorator="['projectId']" placeholder="请选择">
|
|
</a-tree-select>
|
|
</a-tree-select>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
|
|
|
- <a-form-item
|
|
|
|
- label="部门"
|
|
|
|
- :labelCol="BaseTool.Constant.labelCol"
|
|
|
|
- :wrapperCol="BaseTool.Constant.wrapperCol"
|
|
|
|
- >
|
|
|
|
|
|
+ <a-form-item label="部门" :labelCol="BaseTool.Constant.labelCol" :wrapperCol="BaseTool.Constant.wrapperCol">
|
|
<a-select v-decorator="['deptId', {rules: [{required: true, message: '部门不能为空'}]}]" placeholder="请选择">
|
|
<a-select v-decorator="['deptId', {rules: [{required: true, message: '部门不能为空'}]}]" placeholder="请选择">
|
|
- <a-select-option
|
|
|
|
- v-for="(label,value) in (tokenType===2?lyDeptMap:sdDeptMap)"
|
|
|
|
- :key="value"
|
|
|
|
- :label="label"
|
|
|
|
- :value="value">{{ label }}
|
|
|
|
|
|
+ <a-select-option v-for="(label,value) in (tokenType===2?lyDeptMap:sdDeptMap)" :key="value" :label="label" :value="value">{{ label }}
|
|
</a-select-option>
|
|
</a-select-option>
|
|
</a-select>
|
|
</a-select>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
@@ -210,21 +137,15 @@
|
|
<title-divider title="备件明细" width="90px"></title-divider>
|
|
<title-divider title="备件明细" width="90px"></title-divider>
|
|
<div class="table-operator" style="margin-bottom: 8px;">
|
|
<div class="table-operator" style="margin-bottom: 8px;">
|
|
<a-button size="small" type="primary" @click="handleSpareStoreSelect">
|
|
<a-button size="small" type="primary" @click="handleSpareStoreSelect">
|
|
- <a-icon type="plus"/>
|
|
|
|
|
|
+ <a-icon type="plus" />
|
|
添加
|
|
添加
|
|
</a-button>
|
|
</a-button>
|
|
<a-button class="margin-left8" size="small" type="danger" @click="handleDel">
|
|
<a-button class="margin-left8" size="small" type="danger" @click="handleDel">
|
|
- <a-icon type="delete"/>
|
|
|
|
|
|
+ <a-icon type="delete" />
|
|
删除
|
|
删除
|
|
</a-button>
|
|
</a-button>
|
|
</div>
|
|
</div>
|
|
- <a-table
|
|
|
|
- bordered
|
|
|
|
- :data-source="data"
|
|
|
|
- :columns="columns"
|
|
|
|
- tableLayout="auto"
|
|
|
|
- rowKey="autoId"
|
|
|
|
- :row-selection="rowSelection">
|
|
|
|
|
|
+ <a-table bordered :data-source="data" :columns="columns" tableLayout="auto" rowKey="autoId" :row-selection="rowSelection">
|
|
<template slot="num" slot-scope="text, record">
|
|
<template slot="num" slot-scope="text, record">
|
|
<div class="editable-cell-input-wrapper">
|
|
<div class="editable-cell-input-wrapper">
|
|
<a-input :value="text" :id="record.autoId + ',num'" @change="$event => onQuantityChange($event, record.autoId, 'num')" />
|
|
<a-input :value="text" :id="record.autoId + ',num'" @change="$event => onQuantityChange($event, record.autoId, 'num')" />
|
|
@@ -248,7 +169,7 @@
|
|
</template>
|
|
</template>
|
|
</span>
|
|
</span>
|
|
</a-table>
|
|
</a-table>
|
|
- <a-row :gutter="48" >
|
|
|
|
|
|
+ <a-row :gutter="48">
|
|
<a-col :md="48" :sm="48">
|
|
<a-col :md="48" :sm="48">
|
|
<span class="table-page-search-submitButtons" style="float: right;margin-top: 10px">
|
|
<span class="table-page-search-submitButtons" style="float: right;margin-top: 10px">
|
|
<a-button :loading="confirmLoading" type="primary" @click="save()">提交</a-button>
|
|
<a-button :loading="confirmLoading" type="primary" @click="save()">提交</a-button>
|
|
@@ -256,13 +177,13 @@
|
|
</span>
|
|
</span>
|
|
</a-col>
|
|
</a-col>
|
|
</a-row>
|
|
</a-row>
|
|
- <spare-pick-form-select-modal ref="sparePickFormSelectModal" @selected="handleSparePickFormSelected"/>
|
|
|
|
- <spare-back-form-select-modal ref="spareBackFormSelectModal" @selected="handleSpareBackFormSelected"/>
|
|
|
|
- <spare-store-select-modal ref="spareStoreSelectModal" @selected="handleSpareStoreSelected"/>
|
|
|
|
- <spare-store-select-modal2 ref="spareStoreSelectModal2" @selected="handleSpareStoreSelected"/>
|
|
|
|
- <detail-base-form ref="detailBaseForm" @selected="handleDetailSelected"/>
|
|
|
|
- <store-select-modal ref="storeSelectModal" @selected="handleStoreSelected"/>
|
|
|
|
- <base-form-for-modify ref="baseFormForModify" @selected="handleBaseFormForModifySelected"/>
|
|
|
|
|
|
+ <spare-pick-form-select-modal ref="sparePickFormSelectModal" @selected="handleSparePickFormSelected" />
|
|
|
|
+ <spare-back-form-select-modal ref="spareBackFormSelectModal" @selected="handleSpareBackFormSelected" />
|
|
|
|
+ <spare-store-select-modal ref="spareStoreSelectModal" @selected="handleSpareStoreSelected" />
|
|
|
|
+ <spare-store-select-modal2 ref="spareStoreSelectModal2" @selected="handleSpareStoreSelected" />
|
|
|
|
+ <detail-base-form ref="detailBaseForm" @selected="handleDetailSelected" />
|
|
|
|
+ <store-select-modal ref="storeSelectModal" @selected="handleStoreSelected" />
|
|
|
|
+ <base-form-for-modify ref="baseFormForModify" @selected="handleBaseFormForModifySelected" />
|
|
</a-card>
|
|
</a-card>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -291,9 +212,9 @@ export default {
|
|
SpareStoreSelectModal,
|
|
SpareStoreSelectModal,
|
|
StoreSelectModal,
|
|
StoreSelectModal,
|
|
SpareStoreSelectModal2,
|
|
SpareStoreSelectModal2,
|
|
- BaseFormForModify
|
|
|
|
|
|
+ BaseFormForModify,
|
|
},
|
|
},
|
|
- data () {
|
|
|
|
|
|
+ data() {
|
|
return {
|
|
return {
|
|
confirmLoading: false,
|
|
confirmLoading: false,
|
|
modalTitle: null,
|
|
modalTitle: null,
|
|
@@ -321,64 +242,64 @@ export default {
|
|
dataIndex: 'index',
|
|
dataIndex: 'index',
|
|
customRender: (text, record, index) => {
|
|
customRender: (text, record, index) => {
|
|
return index + 1
|
|
return index + 1
|
|
- }
|
|
|
|
|
|
+ },
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: '名称',
|
|
title: '名称',
|
|
- dataIndex: 'spareName'
|
|
|
|
|
|
+ dataIndex: 'spareName',
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: '编号',
|
|
title: '编号',
|
|
- dataIndex: 'no'
|
|
|
|
|
|
+ dataIndex: 'no',
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: '规格',
|
|
title: '规格',
|
|
- dataIndex: 'ggxh'
|
|
|
|
|
|
+ dataIndex: 'ggxh',
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: '批次',
|
|
title: '批次',
|
|
- dataIndex: 'cbatch'
|
|
|
|
|
|
+ dataIndex: 'cbatch',
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: '数量',
|
|
title: '数量',
|
|
dataIndex: 'num',
|
|
dataIndex: 'num',
|
|
width: 150,
|
|
width: 150,
|
|
- scopedSlots: { customRender: 'num' }
|
|
|
|
|
|
+ scopedSlots: { customRender: 'num' },
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: '库存',
|
|
title: '库存',
|
|
dataIndex: 'storeNum',
|
|
dataIndex: 'storeNum',
|
|
- width: 150
|
|
|
|
|
|
+ width: 150,
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: '单位',
|
|
title: '单位',
|
|
- dataIndex: 'unit'
|
|
|
|
|
|
+ dataIndex: 'unit',
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: '仓库',
|
|
title: '仓库',
|
|
- dataIndex: 'storeName'
|
|
|
|
|
|
+ dataIndex: 'storeName',
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: '货架号',
|
|
title: '货架号',
|
|
- dataIndex: 'storePosition'
|
|
|
|
|
|
+ dataIndex: 'storePosition',
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: '降本项目',
|
|
title: '降本项目',
|
|
dataIndex: 'cdefine33',
|
|
dataIndex: 'cdefine33',
|
|
- scopedSlots: { customRender: 'cdefine33' }
|
|
|
|
|
|
+ scopedSlots: { customRender: 'cdefine33' },
|
|
},
|
|
},
|
|
- /* {
|
|
|
|
|
|
+ {
|
|
title: '备注',
|
|
title: '备注',
|
|
dataIndex: 'remark',
|
|
dataIndex: 'remark',
|
|
width: 150,
|
|
width: 150,
|
|
- scopedSlots: { customRender: 'remark' }
|
|
|
|
- }, */
|
|
|
|
|
|
+ scopedSlots: { customRender: 'remark' },
|
|
|
|
+ },
|
|
{
|
|
{
|
|
title: '操作',
|
|
title: '操作',
|
|
key: 'action',
|
|
key: 'action',
|
|
align: 'center',
|
|
align: 'center',
|
|
- scopedSlots: { customRender: 'action' }
|
|
|
|
- }
|
|
|
|
|
|
+ scopedSlots: { customRender: 'action' },
|
|
|
|
+ },
|
|
],
|
|
],
|
|
data: [],
|
|
data: [],
|
|
storeTreeDate: [],
|
|
storeTreeDate: [],
|
|
@@ -388,21 +309,20 @@ export default {
|
|
selectedRows: [],
|
|
selectedRows: [],
|
|
options: {
|
|
options: {
|
|
rowSelection: {
|
|
rowSelection: {
|
|
- selectedRowKeys: this.selectedRowKeys
|
|
|
|
- }
|
|
|
|
|
|
+ selectedRowKeys: this.selectedRowKeys,
|
|
|
|
+ },
|
|
},
|
|
},
|
|
rowSelection: {
|
|
rowSelection: {
|
|
onChange: (selectedRowKeys, selectedRows) => {
|
|
onChange: (selectedRowKeys, selectedRows) => {
|
|
this.selectedRowKeys = selectedRowKeys
|
|
this.selectedRowKeys = selectedRowKeys
|
|
this.selectedRows = selectedRows
|
|
this.selectedRows = selectedRows
|
|
- }
|
|
|
|
|
|
+ },
|
|
},
|
|
},
|
|
- type2: 0
|
|
|
|
|
|
+ type2: 0,
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- props: {
|
|
|
|
- },
|
|
|
|
- created () {
|
|
|
|
|
|
+ props: {},
|
|
|
|
+ created() {
|
|
this.setTree()
|
|
this.setTree()
|
|
// 下拉框map
|
|
// 下拉框map
|
|
this.getSbPositions()
|
|
this.getSbPositions()
|
|
@@ -412,7 +332,7 @@ export default {
|
|
this.flagMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.PROJECT_NEW_AND_OLD)
|
|
this.flagMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.PROJECT_NEW_AND_OLD)
|
|
console.log(this.lyDeptMap)
|
|
console.log(this.lyDeptMap)
|
|
console.log(this.sdDeptMap)
|
|
console.log(this.sdDeptMap)
|
|
- this.deptYYMap = this.DictCache.getChildrenList(this.DictCache.TYPE.OUT_STORE_FORM_DEPT_CODE).map(item => {
|
|
|
|
|
|
+ this.deptYYMap = this.DictCache.getChildrenList(this.DictCache.TYPE.OUT_STORE_FORM_DEPT_CODE).map((item) => {
|
|
if (item.code === 'SBB') {
|
|
if (item.code === 'SBB') {
|
|
item.children = this.DictCache.getChildrenList(this.DictCache.TYPE.SBB)
|
|
item.children = this.DictCache.getChildrenList(this.DictCache.TYPE.SBB)
|
|
}
|
|
}
|
|
@@ -423,7 +343,7 @@ export default {
|
|
// this.typeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.OUT_STORE_FORM_TYPE)
|
|
// this.typeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.OUT_STORE_FORM_TYPE)
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- base (record, model, type = 0) {
|
|
|
|
|
|
+ base(record, model, type = 0) {
|
|
this.type2 = type
|
|
this.type2 = type
|
|
this.visible = true
|
|
this.visible = true
|
|
this.model = model
|
|
this.model = model
|
|
@@ -435,61 +355,69 @@ export default {
|
|
}
|
|
}
|
|
const params = { deptId: this.user.companyId }
|
|
const params = { deptId: this.user.companyId }
|
|
params.nature = this.DictCache.VALUE.SYS_DEPT_NATURE.FEN_GONG_SI
|
|
params.nature = this.DictCache.VALUE.SYS_DEPT_NATURE.FEN_GONG_SI
|
|
- queryUsersByParentDeptNatureAll(params).then(res => {
|
|
|
|
|
|
+ queryUsersByParentDeptNatureAll(params).then((res) => {
|
|
this.userList = res.data
|
|
this.userList = res.data
|
|
})
|
|
})
|
|
- fetchStoreTree().then(res => {
|
|
|
|
|
|
+ fetchStoreTree().then((res) => {
|
|
this.storeTreeDate = res.data
|
|
this.storeTreeDate = res.data
|
|
})
|
|
})
|
|
// 如果是空标识添加
|
|
// 如果是空标识添加
|
|
if (this.BaseTool.Object.isBlank(record.id)) {
|
|
if (this.BaseTool.Object.isBlank(record.id)) {
|
|
this.modalTitle = '添加'
|
|
this.modalTitle = '添加'
|
|
this.data = []
|
|
this.data = []
|
|
- const { form: { setFieldsValue } } = this
|
|
|
|
|
|
+ const {
|
|
|
|
+ form: { setFieldsValue },
|
|
|
|
+ } = this
|
|
// 日期处理
|
|
// 日期处理
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
- setFieldsValue(Object.assign(pick(record, [
|
|
|
|
- 'outFlag'
|
|
|
|
- ]), pick(model, [
|
|
|
|
- 'sbCph'
|
|
|
|
- ]), {
|
|
|
|
- 'sbPosition': model.sbPosition.split('->')
|
|
|
|
- }))
|
|
|
|
|
|
+ setFieldsValue(
|
|
|
|
+ Object.assign(pick(record, ['outFlag']), pick(model, ['sbCph']), {
|
|
|
|
+ sbPosition: model.sbPosition.split('->'),
|
|
|
|
+ })
|
|
|
|
+ )
|
|
})
|
|
})
|
|
return
|
|
return
|
|
}
|
|
}
|
|
this.modalTitle = '编辑'
|
|
this.modalTitle = '编辑'
|
|
- const { form: { setFieldsValue } } = this
|
|
|
|
|
|
+ const {
|
|
|
|
+ form: { setFieldsValue },
|
|
|
|
+ } = this
|
|
// 日期处理
|
|
// 日期处理
|
|
this.storeId = record.storeId
|
|
this.storeId = record.storeId
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
- setFieldsValue(Object.assign(pick(record, [
|
|
|
|
- 'id',
|
|
|
|
- 'outNo',
|
|
|
|
- 'userId',
|
|
|
|
- 'applyDept',
|
|
|
|
- 'userTime',
|
|
|
|
- 'storeId',
|
|
|
|
- 'storeName',
|
|
|
|
- 'pickId',
|
|
|
|
- 'feeFrom',
|
|
|
|
- 'pickNo',
|
|
|
|
- 'type',
|
|
|
|
- 'deptId',
|
|
|
|
- 'remark'
|
|
|
|
- ])))
|
|
|
|
|
|
+ setFieldsValue(
|
|
|
|
+ Object.assign(
|
|
|
|
+ pick(record, [
|
|
|
|
+ 'id',
|
|
|
|
+ 'outNo',
|
|
|
|
+ 'userId',
|
|
|
|
+ 'applyDept',
|
|
|
|
+ 'userTime',
|
|
|
|
+ 'storeId',
|
|
|
|
+ 'storeName',
|
|
|
|
+ 'pickId',
|
|
|
|
+ 'feeFrom',
|
|
|
|
+ 'pickNo',
|
|
|
|
+ 'type',
|
|
|
|
+ 'deptId',
|
|
|
|
+ 'remark',
|
|
|
|
+ ])
|
|
|
|
+ )
|
|
|
|
+ )
|
|
})
|
|
})
|
|
this.data = record.detailList
|
|
this.data = record.detailList
|
|
},
|
|
},
|
|
- setTree () {
|
|
|
|
|
|
+ setTree() {
|
|
fetchProjectTree({
|
|
fetchProjectTree({
|
|
- flag: this.tokenType
|
|
|
|
|
|
+ flag: this.tokenType,
|
|
}).then((res) => {
|
|
}).then((res) => {
|
|
this.treeData = res.data
|
|
this.treeData = res.data
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- save () {
|
|
|
|
- const { form: { validateFieldsAndScroll } } = this
|
|
|
|
|
|
+ save() {
|
|
|
|
+ const {
|
|
|
|
+ form: { validateFieldsAndScroll },
|
|
|
|
+ } = this
|
|
this.confirmLoading = true
|
|
this.confirmLoading = true
|
|
validateFieldsAndScroll((errors, values) => {
|
|
validateFieldsAndScroll((errors, values) => {
|
|
if (errors) {
|
|
if (errors) {
|
|
@@ -519,50 +447,52 @@ export default {
|
|
addOutStoreFormYY(values)
|
|
addOutStoreFormYY(values)
|
|
.then(() => {
|
|
.then(() => {
|
|
this.handleCancel(values)
|
|
this.handleCancel(values)
|
|
- }).catch(() => {
|
|
|
|
|
|
+ })
|
|
|
|
+ .catch(() => {
|
|
this.confirmLoading = false
|
|
this.confirmLoading = false
|
|
})
|
|
})
|
|
} else {
|
|
} else {
|
|
updateOutStoreFormYY(values)
|
|
updateOutStoreFormYY(values)
|
|
.then(() => {
|
|
.then(() => {
|
|
this.handleCancel(values)
|
|
this.handleCancel(values)
|
|
- }).catch(() => {
|
|
|
|
|
|
+ })
|
|
|
|
+ .catch(() => {
|
|
this.confirmLoading = false
|
|
this.confirmLoading = false
|
|
})
|
|
})
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- loadData (selectedOptions) {
|
|
|
|
|
|
+ loadData(selectedOptions) {
|
|
console.log(selectedOptions)
|
|
console.log(selectedOptions)
|
|
const targetOption = selectedOptions[selectedOptions.length - 1]
|
|
const targetOption = selectedOptions[selectedOptions.length - 1]
|
|
targetOption.loading = true
|
|
targetOption.loading = true
|
|
- getSbPositions({ parentId: targetOption.id }).then(res => {
|
|
|
|
|
|
+ getSbPositions({ parentId: targetOption.id }).then((res) => {
|
|
targetOption.loading = false
|
|
targetOption.loading = false
|
|
- targetOption.children = res.data.map(item => {
|
|
|
|
|
|
+ targetOption.children = res.data.map((item) => {
|
|
item = {
|
|
item = {
|
|
label: item.name,
|
|
label: item.name,
|
|
- value: item.name
|
|
|
|
|
|
+ value: item.name,
|
|
}
|
|
}
|
|
return item
|
|
return item
|
|
})
|
|
})
|
|
this.sbPositionList = [...this.sbPositionList]
|
|
this.sbPositionList = [...this.sbPositionList]
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- getSbPositions (parentId) {
|
|
|
|
- getSbPositions({ parentId }).then(res => {
|
|
|
|
|
|
+ getSbPositions(parentId) {
|
|
|
|
+ getSbPositions({ parentId }).then((res) => {
|
|
console.log(res)
|
|
console.log(res)
|
|
- this.sbPositionList = res.data.map(item => {
|
|
|
|
|
|
+ this.sbPositionList = res.data.map((item) => {
|
|
item = {
|
|
item = {
|
|
label: item.name,
|
|
label: item.name,
|
|
value: item.name,
|
|
value: item.name,
|
|
id: item.id,
|
|
id: item.id,
|
|
- isLeaf: false
|
|
|
|
|
|
+ isLeaf: false,
|
|
}
|
|
}
|
|
return item
|
|
return item
|
|
})
|
|
})
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- handleCancel (values) {
|
|
|
|
|
|
+ handleCancel(values) {
|
|
this.visible = false
|
|
this.visible = false
|
|
this.confirmLoading = false
|
|
this.confirmLoading = false
|
|
this.form.resetFields()
|
|
this.form.resetFields()
|
|
@@ -572,85 +502,97 @@ export default {
|
|
this.$emit('ok')
|
|
this.$emit('ok')
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- typeChange (values) {
|
|
|
|
|
|
+ typeChange(values) {
|
|
this.type = values
|
|
this.type = values
|
|
},
|
|
},
|
|
- handleStoreSelect () {
|
|
|
|
|
|
+ handleStoreSelect() {
|
|
this.$refs.storeSelectModal.base({}, { filter: -1 })
|
|
this.$refs.storeSelectModal.base({}, { filter: -1 })
|
|
},
|
|
},
|
|
- handleStoreSelected (record, keys, rows) {
|
|
|
|
|
|
+ handleStoreSelected(record, keys, rows) {
|
|
// 重新选择了仓库,则明细需要全部清空
|
|
// 重新选择了仓库,则明细需要全部清空
|
|
this.data = []
|
|
this.data = []
|
|
- const [ key ] = keys
|
|
|
|
- const [ row ] = rows
|
|
|
|
- const { form: { setFieldsValue } } = this
|
|
|
|
|
|
+ const [key] = keys
|
|
|
|
+ const [row] = rows
|
|
|
|
+ const {
|
|
|
|
+ form: { setFieldsValue },
|
|
|
|
+ } = this
|
|
this.storeId = key
|
|
this.storeId = key
|
|
// 日期处理
|
|
// 日期处理
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
- setFieldsValue(Object.assign({
|
|
|
|
- 'storeId': key,
|
|
|
|
- 'storeName': row.name
|
|
|
|
- }))
|
|
|
|
|
|
+ setFieldsValue(
|
|
|
|
+ Object.assign({
|
|
|
|
+ storeId: key,
|
|
|
|
+ storeName: row.name,
|
|
|
|
+ })
|
|
|
|
+ )
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- handleSparePickFormSelect () {
|
|
|
|
|
|
+ handleSparePickFormSelect() {
|
|
if (this.type === 1) {
|
|
if (this.type === 1) {
|
|
this.$refs.sparePickFormSelectModal.base()
|
|
this.$refs.sparePickFormSelectModal.base()
|
|
} else {
|
|
} else {
|
|
this.$refs.spareBackFormSelectModal.base()
|
|
this.$refs.spareBackFormSelectModal.base()
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- handleSparePickFormSelected (record, keys, rows) {
|
|
|
|
- const [ key ] = keys
|
|
|
|
- const [ row ] = rows
|
|
|
|
- const { form: { setFieldsValue } } = this
|
|
|
|
|
|
+ handleSparePickFormSelected(record, keys, rows) {
|
|
|
|
+ const [key] = keys
|
|
|
|
+ const [row] = rows
|
|
|
|
+ const {
|
|
|
|
+ form: { setFieldsValue },
|
|
|
|
+ } = this
|
|
// 日期处理
|
|
// 日期处理
|
|
- setFieldsValue(Object.assign({
|
|
|
|
- 'pickId': key,
|
|
|
|
- 'pickNo': row.pickNo
|
|
|
|
- }))
|
|
|
|
|
|
+ setFieldsValue(
|
|
|
|
+ Object.assign({
|
|
|
|
+ pickId: key,
|
|
|
|
+ pickNo: row.pickNo,
|
|
|
|
+ })
|
|
|
|
+ )
|
|
},
|
|
},
|
|
- handleSpareBackFormSelected (record, keys, rows) {
|
|
|
|
- const [ key ] = keys
|
|
|
|
- const [ row ] = rows
|
|
|
|
- const { form: { setFieldsValue } } = this
|
|
|
|
|
|
+ handleSpareBackFormSelected(record, keys, rows) {
|
|
|
|
+ const [key] = keys
|
|
|
|
+ const [row] = rows
|
|
|
|
+ const {
|
|
|
|
+ form: { setFieldsValue },
|
|
|
|
+ } = this
|
|
// 日期处理
|
|
// 日期处理
|
|
- setFieldsValue(Object.assign({
|
|
|
|
- 'pickId': key,
|
|
|
|
- 'pickNo': row.pickNo
|
|
|
|
- }))
|
|
|
|
|
|
+ setFieldsValue(
|
|
|
|
+ Object.assign({
|
|
|
|
+ pickId: key,
|
|
|
|
+ pickNo: row.pickNo,
|
|
|
|
+ })
|
|
|
|
+ )
|
|
},
|
|
},
|
|
- handleDetailSelect () {
|
|
|
|
|
|
+ handleDetailSelect() {
|
|
if (this.storeId == null) {
|
|
if (this.storeId == null) {
|
|
this.$message.error('请先选择仓库')
|
|
this.$message.error('请先选择仓库')
|
|
return
|
|
return
|
|
}
|
|
}
|
|
this.$refs.detailBaseForm.base({ storeId: this.storeId })
|
|
this.$refs.detailBaseForm.base({ storeId: this.storeId })
|
|
},
|
|
},
|
|
- handleDetailSelected (record) {
|
|
|
|
|
|
+ handleDetailSelected(record) {
|
|
const { data } = this
|
|
const { data } = this
|
|
data.push(record)
|
|
data.push(record)
|
|
},
|
|
},
|
|
- handleDel (id) {
|
|
|
|
|
|
+ handleDel(id) {
|
|
const data = [...this.data]
|
|
const data = [...this.data]
|
|
if (this.selectedRowKeys.length === 0) {
|
|
if (this.selectedRowKeys.length === 0) {
|
|
this.$message.error('请至少选择一条数据')
|
|
this.$message.error('请至少选择一条数据')
|
|
return
|
|
return
|
|
}
|
|
}
|
|
- this.data = data.filter(item => !this.selectedRowKeys.includes(item.id))
|
|
|
|
|
|
+ this.data = data.filter((item) => !this.selectedRowKeys.includes(item.id))
|
|
},
|
|
},
|
|
- handleDelOne (record) {
|
|
|
|
|
|
+ handleDelOne(record) {
|
|
const data = [...this.data]
|
|
const data = [...this.data]
|
|
- this.data = data.filter(item => record.autoId !== item.autoId)
|
|
|
|
|
|
+ this.data = data.filter((item) => record.autoId !== item.autoId)
|
|
},
|
|
},
|
|
- handleSpareStoreSelect () {
|
|
|
|
|
|
+ handleSpareStoreSelect() {
|
|
if (this.type2 === 2) {
|
|
if (this.type2 === 2) {
|
|
this.$refs.spareStoreSelectModal2.base({ tokenType: this.tokenType, pickId: this.model.id })
|
|
this.$refs.spareStoreSelectModal2.base({ tokenType: this.tokenType, pickId: this.model.id })
|
|
} else {
|
|
} else {
|
|
this.$refs.spareStoreSelectModal.base({ tokenType: this.tokenType })
|
|
this.$refs.spareStoreSelectModal.base({ tokenType: this.tokenType })
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- handleSpareStoreSelected (record, keys, rows) {
|
|
|
|
|
|
+ handleSpareStoreSelected(record, keys, rows) {
|
|
console.log(rows)
|
|
console.log(rows)
|
|
const { data } = this
|
|
const { data } = this
|
|
for (let i = 0; i < rows.length; i++) {
|
|
for (let i = 0; i < rows.length; i++) {
|
|
@@ -670,13 +612,13 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- handleStoreChange (value) {
|
|
|
|
|
|
+ handleStoreChange(value) {
|
|
this.storeId = value
|
|
this.storeId = value
|
|
},
|
|
},
|
|
- handleBaseFormForModifySelect (record) {
|
|
|
|
|
|
+ handleBaseFormForModifySelect(record) {
|
|
this.$refs.baseFormForModify.base(record)
|
|
this.$refs.baseFormForModify.base(record)
|
|
},
|
|
},
|
|
- handleBaseFormForModifySelected (values) {
|
|
|
|
|
|
+ handleBaseFormForModifySelected(values) {
|
|
console.log('values' + values.id)
|
|
console.log('values' + values.id)
|
|
const { data } = this
|
|
const { data } = this
|
|
for (let j = 0; j < data.length; j++) {
|
|
for (let j = 0; j < data.length; j++) {
|
|
@@ -687,14 +629,14 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- onQuantityChange (e, autoId, attr) {
|
|
|
|
|
|
+ onQuantityChange(e, autoId, attr) {
|
|
const value = e.target.value
|
|
const value = e.target.value
|
|
console.log(value)
|
|
console.log(value)
|
|
if (value !== 0 && !value) {
|
|
if (value !== 0 && !value) {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
const data = [...this.data]
|
|
const data = [...this.data]
|
|
- const target = data.find(item => item.autoId === autoId)
|
|
|
|
|
|
+ const target = data.find((item) => item.autoId === autoId)
|
|
if (this.outFlag === 1 && value > target.storeNum) {
|
|
if (this.outFlag === 1 && value > target.storeNum) {
|
|
this.$message.error('领用数量不能大于库存数量')
|
|
this.$message.error('领用数量不能大于库存数量')
|
|
target[attr] = 1
|
|
target[attr] = 1
|
|
@@ -706,20 +648,20 @@ export default {
|
|
this.data = data
|
|
this.data = data
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- onTotalPriceChange (e, id, attr) {
|
|
|
|
|
|
+ onTotalPriceChange(e, id, attr) {
|
|
const value = e.target.value
|
|
const value = e.target.value
|
|
console.log(value)
|
|
console.log(value)
|
|
if (value !== 0 && !value) {
|
|
if (value !== 0 && !value) {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
const data = [...this.data]
|
|
const data = [...this.data]
|
|
- const target = data.find(item => item.id === id)
|
|
|
|
|
|
+ const target = data.find((item) => item.id === id)
|
|
console.log('target: ' + target)
|
|
console.log('target: ' + target)
|
|
if (target) {
|
|
if (target) {
|
|
target[attr] = value
|
|
target[attr] = value
|
|
this.data = data
|
|
this.data = data
|
|
}
|
|
}
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ },
|
|
|
|
+ },
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|