Commit 67fafa7a by 前端

Merge branch 'develop' into 'master'

Develop

See merge request !12
2 parents 954c0a34 7ea4a4f1
...@@ -11,17 +11,18 @@ let router = null ...@@ -11,17 +11,18 @@ let router = null
let instance = null let instance = null
Vue.use(ElementUI) Vue.use(ElementUI)
Vue.use(GLTable) Vue.use(GLTable)
export async function bootstrap({ history, common, messenger, globalState,routerBase }) { export async function bootstrap({ history, common, messenger, globalState, routerBase }) {
const { response, request, sign, secret, sign_common, request_common, purchaseType} = await fetchConfig(common) const { response, request, sign, secret, sign_common, request_common, membraneTypeList } = await fetchConfig(common)
// console.log(purchaseType, 'purchaseType')
Vue.prototype.$history = history Vue.prototype.$history = history
Vue.prototype.$messenger = messenger Vue.prototype.$messenger = messenger
Vue.prototype.$globalState = globalState Vue.prototype.$globalState = globalState
Vue.prototype.$common = common Vue.prototype.$common = common
Vue.prototype.$message = message Vue.prototype.$message = message
Vue.prototype.$messageBox = messageBox Vue.prototype.$messageBox = messageBox
Vue.prototype.$purchaseType = purchaseType Vue.prototype.$membraneTypeList = membraneTypeList
Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: globalState.session.token } }) Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
Vue.prototype.$http_common = new common.Http({ response, signWay: "md5", request: request_common, sign: sign_common, secret, alert: ElementUI.Message.error, headers: { TGT: globalState.session.token } }) Vue.prototype.$http_common = new common.Http({ response, signWay: 'md5', request: request_common, sign: sign_common, secret, alert: ElementUI.Message.error, headers: { TGT: globalState.session.token } })
// Vue.prototype.$setGlobalState = globalState.actions.setGlobalState // Vue.prototype.$setGlobalState = globalState.actions.setGlobalState
const routesData = common.utils.deepClone(globalState.routers) const routesData = common.utils.deepClone(globalState.routers)
routes = getRoutes(routesData) routes = getRoutes(routesData)
......
...@@ -5,8 +5,7 @@ ...@@ -5,8 +5,7 @@
<div> <div>
<div class="d2-container-content"> <div class="d2-container-content">
<GLTable ref="recordTable" :getListApi="getListApi" :searchForm="searchFormSearch" :tableParams="tableParams" <GLTable ref="recordTable" :getListApi="getListApi" :searchForm="searchFormSearch" :tableParams="tableParams"
:beforeSearchFn="beforeSearchFn"> :beforeSearchFn="beforeSearchFn"></GLTable>
</GLTable>
</div> </div>
</div> </div>
<!-- <span slot="footer" class="dialog-footer"> <!-- <span slot="footer" class="dialog-footer">
...@@ -16,12 +15,12 @@ ...@@ -16,12 +15,12 @@
</template> </template>
<script> <script>
import { membraneTypeList } from '@/utils/constants.js' // import { membraneTypeList } from '@/utils/constants.js'
export default { export default {
name: 'allocationDetailDialog', name: 'allocationDetailDialog',
data() { data() {
return { return {
membraneTypeList: membraneTypeList, // membraneTypeList: membraneTypeList,
searchForm: { searchForm: {
id: '' id: ''
}, },
...@@ -40,7 +39,7 @@ export default { ...@@ -40,7 +39,7 @@ export default {
}, },
{ {
label: '商品编码', label: '商品编码',
prop: 'productCode', prop: 'productCode'
// width: 250 // width: 250
}, },
{ {
...@@ -55,8 +54,12 @@ export default { ...@@ -55,8 +54,12 @@ export default {
label: '调拨数量', label: '调拨数量',
prop: 'allocateNumber', prop: 'allocateNumber',
formatter: cellValue => { formatter: cellValue => {
return cellValue.allocateNumber || cellValue.allocateNumber == 0 ? parseFloat(cellValue.allocateNumber).toFixed(2) + (this.membraneTypeList.includes(cellValue.goodsType) ? '米' : '件') : '-' return cellValue.allocateNumber || cellValue.allocateNumber == 0 ? parseFloat(cellValue.allocateNumber).toFixed(2) + (this.$membraneTypeList.includes(cellValue.goodsType) ? '米' : '件') : '-'
} }
},
{
label: '膜卷号',
prop: 'filmRollNo'
} }
] ]
}, },
......
<template> <template>
<div class="purchase"> <div class="purchase">
<div class="container"> <div class="container">
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="showFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm> <GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="showFormData" @handleOk="handleSearch"
@handleRest="handleReset"></GLCombiForm>
<div class="table-header"> <div class="table-header">
<h2>盘点列表</h2> <h2>盘点列表</h2>
<div> <div>
...@@ -11,7 +12,9 @@ ...@@ -11,7 +12,9 @@
</div> </div>
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<GLTable ref="checkRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun"> <GLTable ref="checkRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm"
:tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn"
@setTableFinishFun="setTableFinishFun">
<div slot="img" slot-scope="scope" v-if="scope.scope.voucherPic"> <div slot="img" slot-scope="scope" v-if="scope.scope.voucherPic">
<img class="img-36" :src="scope.scope.voucherPic" @click="handleEnlargeImg(scope.scope.voucherPic)" /> <img class="img-36" :src="scope.scope.voucherPic" @click="handleEnlargeImg(scope.scope.voucherPic)" />
</div> </div>
...@@ -26,14 +29,15 @@ ...@@ -26,14 +29,15 @@
<img width="100%" :src="previewImgUrl" alt="图片" /> <img width="100%" :src="previewImgUrl" alt="图片" />
</el-dialog> </el-dialog>
<!-- 查看 --> <!-- 查看 -->
<inventory-detail-dialog :inventory-detail-visible="inventoryDetailVisible" :recordInfo="recordInfo" v-if="inventoryDetailVisible" @dialogClose="dialogClose" /> <inventory-detail-dialog :inventory-detail-visible="inventoryDetailVisible" :recordInfo="recordInfo"
v-if="inventoryDetailVisible" @dialogClose="dialogClose" />
</div> </div>
</template> </template>
<script> <script>
import * as dayjs from 'dayjs' import * as dayjs from 'dayjs'
import url from '@/assets/empty.png' import url from '@/assets/empty.png'
import { membraneTypeList } from '@/utils/constants.js' // import { membraneTypeList } from '@/utils/constants.js'
import inventoryDetailDialog from './inventoryDetailDialog' import inventoryDetailDialog from './inventoryDetailDialog'
export default { export default {
name: 'warehousing', name: 'warehousing',
...@@ -42,7 +46,7 @@ export default { ...@@ -42,7 +46,7 @@ export default {
}, },
data() { data() {
return { return {
membraneTypeList: membraneTypeList, // membraneTypeList: membraneTypeList,
size: 'small', size: 'small',
url: url, url: url,
searchForm: { searchForm: {
...@@ -271,15 +275,16 @@ export default { ...@@ -271,15 +275,16 @@ export default {
<style scoped lang="scss"> <style scoped lang="scss">
@import '@/assets/css/mixin.scss'; @import '@/assets/css/mixin.scss';
.purchase { .purchase {
.table-header { .table-header {
@include space-between_center; @include space-between_center;
margin-bottom: 10px; margin-bottom: 10px;
h2 { h2 {
font-weight: 600; font-weight: 600;
font-size: 16px; font-size: 16px;
color: #333; color: #333;
} }
} }
} }</style>
</style>
...@@ -33,12 +33,12 @@ ...@@ -33,12 +33,12 @@
</template> </template>
<script> <script>
import { membraneTypeList } from '@/utils/constants.js' // import { membraneTypeList } from '@/utils/constants.js'
export default { export default {
name: 'InventoryDetailDialog', name: 'InventoryDetailDialog',
data() { data() {
return { return {
membraneTypeList: membraneTypeList, membraneTypeList: this.$membraneTypeList,
countObj: {}, countObj: {},
searchForm: { searchForm: {
id: '' id: ''
...@@ -60,7 +60,7 @@ export default { ...@@ -60,7 +60,7 @@ export default {
}, },
{ {
label: '商品编码', label: '商品编码',
prop: 'productCode', prop: 'productCode'
// width: 250 // width: 250
}, },
{ {
...@@ -75,14 +75,14 @@ export default { ...@@ -75,14 +75,14 @@ export default {
label: '系统库存', label: '系统库存',
prop: 'stock', prop: 'stock',
formatter: cellValue => { formatter: cellValue => {
return cellValue.stock || cellValue.stock == 0 ? parseFloat(cellValue.stock).toFixed(2) + (this.membraneTypeList.includes(cellValue.goodsType) ? '米' : '件') : '-' return cellValue.stock || cellValue.stock == 0 ? parseFloat(cellValue.stock).toFixed(2) + (this.$membraneTypeList.includes(cellValue.goodsType) ? '米' : '件') : '-'
} }
}, },
{ {
label: '盘点库存', label: '盘点库存',
prop: 'checkStock', prop: 'checkStock',
formatter: cellValue => { formatter: cellValue => {
return cellValue.checkStock || cellValue.checkStock == 0 ? parseFloat(cellValue.checkStock).toFixed(2) + (this.membraneTypeList.includes(cellValue.goodsType) ? '米' : '件') : '-' return cellValue.checkStock || cellValue.checkStock == 0 ? parseFloat(cellValue.checkStock).toFixed(2) + (this.$membraneTypeList.includes(cellValue.goodsType) ? '米' : '件') : '-'
} }
}, },
{ {
...@@ -92,6 +92,10 @@ export default { ...@@ -92,6 +92,10 @@ export default {
// formatter: (cellValue) => { // formatter: (cellValue) => {
// return cellValue.checkTime ? Util.dateFormate(cellValue.checkTime, 'YYYY-MM-DD HH:mm:ss') : '' // return cellValue.checkTime ? Util.dateFormate(cellValue.checkTime, 'YYYY-MM-DD HH:mm:ss') : ''
// } // }
},
{
label: '膜卷号',
prop: 'filmRollNo'
} }
] ]
}, },
...@@ -138,5 +142,4 @@ export default { ...@@ -138,5 +142,4 @@ export default {
.inventoryDetailDailog .el-dialog { .inventoryDetailDailog .el-dialog {
margin-top: 20vh !important; margin-top: 20vh !important;
min-width: 700px; min-width: 700px;
} }</style>
</style>
<template> <template>
<div class="purchase"> <div class="purchase">
<div class="container"> <div class="container">
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="showFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm> <GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="showFormData" @handleOk="handleSearch"
@handleRest="handleReset"></GLCombiForm>
<div class="table-header"> <div class="table-header">
<h2>预警列表</h2> <h2>预警列表</h2>
<div> <div>
...@@ -11,7 +12,9 @@ ...@@ -11,7 +12,9 @@
</div> </div>
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<GLTable ref="earlyWarningRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun"></GLTable> <GLTable ref="earlyWarningRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm"
:tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn"
@setTableFinishFun="setTableFinishFun"></GLTable>
<!-- 表格区域 end --> <!-- 表格区域 end -->
</div> </div>
</div> </div>
...@@ -19,12 +22,12 @@ ...@@ -19,12 +22,12 @@
<script> <script>
import url from '@/assets/empty.png' import url from '@/assets/empty.png'
import { membraneTypeList } from '@/utils/constants.js' // import { membraneTypeList } from '@/utils/constants.js'
export default { export default {
name: 'earlyWarning', name: 'earlyWarning',
data() { data() {
return { return {
membraneTypeList: membraneTypeList, // membraneTypeList: membraneTypeList,
size: 'small', size: 'small',
url: url, url: url,
searchForm: { searchForm: {
...@@ -119,21 +122,21 @@ export default { ...@@ -119,21 +122,21 @@ export default {
label: '库存', label: '库存',
prop: 'stock', prop: 'stock',
formatter: cellValue => { formatter: cellValue => {
return cellValue.stock || cellValue.stock == 0 ? parseFloat(cellValue.stock).toFixed(2) + (this.membraneTypeList.includes(cellValue.goodsType) ? '米' : '件') : '-' return cellValue.stock || cellValue.stock == 0 ? parseFloat(cellValue.stock).toFixed(2) + (this.$membraneTypeList.includes(cellValue.goodsType) ? '米' : '件') : '-'
} }
}, },
{ {
label: '最低库存', label: '最低库存',
prop: 'warningValue', prop: 'warningValue',
formatter: cellValue => { formatter: cellValue => {
return cellValue.warningValue || cellValue.warningValue == 0 ? parseFloat(cellValue.warningValue).toFixed(2) + (this.membraneTypeList.includes(cellValue.goodsType) ? '米' : '件') : '-' return cellValue.warningValue || cellValue.warningValue == 0 ? parseFloat(cellValue.warningValue).toFixed(2) + (this.$membraneTypeList.includes(cellValue.goodsType) ? '米' : '件') : '-'
} }
}, },
{ {
label: '最高库存', label: '最高库存',
prop: 'warningValueMax', prop: 'warningValueMax',
formatter: cellValue => { formatter: cellValue => {
return cellValue.warningValueMax || cellValue.warningValueMax == 0 ? parseFloat(cellValue.warningValueMax).toFixed(2) + (this.membraneTypeList.includes(cellValue.goodsType) ? '米' : '件') : '-' return cellValue.warningValueMax || cellValue.warningValueMax == 0 ? parseFloat(cellValue.warningValueMax).toFixed(2) + (this.$membraneTypeList.includes(cellValue.goodsType) ? '米' : '件') : '-'
} }
}, },
{ {
...@@ -288,15 +291,16 @@ export default { ...@@ -288,15 +291,16 @@ export default {
<style scoped lang="scss"> <style scoped lang="scss">
@import '@/assets/css/mixin.scss'; @import '@/assets/css/mixin.scss';
.purchase { .purchase {
.table-header { .table-header {
@include space-between_center; @include space-between_center;
margin-bottom: 10px; margin-bottom: 10px;
h2 { h2 {
font-weight: 600; font-weight: 600;
font-size: 16px; font-size: 16px;
color: #333; color: #333;
} }
} }
} }</style>
</style>
<template> <template>
<div class="purchase"> <div class="purchase">
<div class="container"> <div class="container">
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="showFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm> <GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="showFormData" @handleOk="handleSearch"
@handleRest="handleReset"></GLCombiForm>
<div class="table-header"> <div class="table-header">
<div> <div>
合计:出库数量 合计:出库数量
...@@ -13,7 +14,9 @@ ...@@ -13,7 +14,9 @@
</div> </div>
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<GLTable ref="outboundRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun"></GLTable> <GLTable ref="outboundRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm"
:tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn"
@setTableFinishFun="setTableFinishFun"></GLTable>
<!-- 表格区域 end --> <!-- 表格区域 end -->
</div> </div>
</div> </div>
...@@ -22,12 +25,12 @@ ...@@ -22,12 +25,12 @@
<script> <script>
import * as dayjs from 'dayjs' import * as dayjs from 'dayjs'
import url from '@/assets/empty.png' import url from '@/assets/empty.png'
import { membraneTypeList } from '@/utils/constants.js' // import { membraneTypeList } from '@/utils/constants.js'
export default { export default {
name: 'warehousing', name: 'warehousing',
data() { data() {
return { return {
membraneTypeList: membraneTypeList, // membraneTypeList: membraneTypeList,
size: 'small', size: 'small',
totalObj: {}, totalObj: {},
url: url, url: url,
...@@ -139,6 +142,13 @@ export default { ...@@ -139,6 +142,13 @@ export default {
optionId: 'confId', optionId: 'confId',
optionLabel: 'confLabel', optionLabel: 'confLabel',
optionsName: 'upgradeFlagList' optionsName: 'upgradeFlagList'
},
{
label: '膜卷号',
name: 'filmRollNo',
type: 'input',
maxlength: '50',
isClear: true
} }
], ],
// 表格 // 表格
...@@ -181,7 +191,7 @@ export default { ...@@ -181,7 +191,7 @@ export default {
label: '出库数量', label: '出库数量',
prop: 'reduceStockNum', prop: 'reduceStockNum',
formatter: cellValue => { formatter: cellValue => {
return cellValue.reduceStockNum || cellValue.reduceStockNum == 0 ? parseFloat(cellValue.reduceStockNum).toFixed(2) + (this.membraneTypeList.includes(cellValue.goodsType) ? '米' : '件') : '-' return cellValue.reduceStockNum || cellValue.reduceStockNum == 0 ? parseFloat(cellValue.reduceStockNum).toFixed(2) + (this.$membraneTypeList.includes(cellValue.goodsType) ? '米' : '件') : '-'
}, },
width: 100 width: 100
}, },
...@@ -207,6 +217,11 @@ export default { ...@@ -207,6 +217,11 @@ export default {
width: 200 width: 200
}, },
{ {
label: '膜卷号',
prop: 'filmRollNo',
minWidth: 150
},
{
label: '订单类型', label: '订单类型',
prop: '', prop: '',
formatter: cellValue => { formatter: cellValue => {
...@@ -400,8 +415,8 @@ export default { ...@@ -400,8 +415,8 @@ export default {
color: #333; color: #333;
} }
} }
.txt-blue { .txt-blue {
color: #5850ff; color: #5850ff;
} }
} }</style>
</style>
<template> <template>
<div class="purchase"> <div class="purchase">
<div class="container"> <div class="container">
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="showFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm> <GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="showFormData" @handleOk="handleSearch"
@handleRest="handleReset"></GLCombiForm>
<div class="table-header"> <div class="table-header">
<div> <div>
合计:当前库存 合计:当前库存
...@@ -14,7 +15,9 @@ ...@@ -14,7 +15,9 @@
</div> </div>
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<GLTable ref="stockRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun"> <GLTable ref="stockRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm"
:tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn"
@setTableFinishFun="setTableFinishFun">
<div class="table-btns" slot="auth-button" slot-scope="scope"> <div class="table-btns" slot="auth-button" slot-scope="scope">
<el-button type="text" @click="handleInventoryDetails(scope.scope)">库存明细</el-button> <el-button type="text" @click="handleInventoryDetails(scope.scope)">库存明细</el-button>
<el-button type="text" @click="handleDetail(scope.scope)">统计</el-button> <el-button type="text" @click="handleDetail(scope.scope)">统计</el-button>
...@@ -23,21 +26,20 @@ ...@@ -23,21 +26,20 @@
<!-- 表格区域 end --> <!-- 表格区域 end -->
</div> </div>
<!-- 查看 --> <!-- 查看 -->
<stock-month-dialog :stock-month-visible="stockMonthVisible" :stockInfo="stockInfo" v-if="stockMonthVisible" @dialogClose="dialogClose" /> <stock-month-dialog :stock-month-visible="stockMonthVisible" :stockInfo="stockInfo" v-if="stockMonthVisible"
@dialogClose="dialogClose" />
<stockDetailDialog :visible.sync="stockDetailDialogVisible" :recordInfo="stockInfo" v-if="stockDetailDialogVisible" /> <stockDetailDialog :visible.sync="stockDetailDialogVisible" :recordInfo="stockInfo" v-if="stockDetailDialogVisible" />
<!-- 库存对账单 --> <!-- 库存对账单 -->
<statementOfAccountDialog <statementOfAccountDialog :visible.sync="statementOfAccountDialogVisible" v-if="statementOfAccountDialogVisible"
:visible.sync="statementOfAccountDialogVisible" :yqMerchantList="baseData.yqMerchantList" @handleRelateProConfirm="handleRelateProConfirm">
v-if="statementOfAccountDialogVisible" </statementOfAccountDialog>
:yqMerchantList="baseData.yqMerchantList"
@handleRelateProConfirm="handleRelateProConfirm"></statementOfAccountDialog>
</div> </div>
</template> </template>
<script> <script>
import * as dayjs from 'dayjs' import * as dayjs from 'dayjs'
import url from '@/assets/empty.png' import url from '@/assets/empty.png'
import { membraneTypeList } from '@/utils/constants.js' // import { membraneTypeList } from '@/utils/constants.js'
import stockMonthDialog from './stockMonthDialog' import stockMonthDialog from './stockMonthDialog'
import stockDetailDialog from './stockDetailDialog' import stockDetailDialog from './stockDetailDialog'
import statementOfAccountDialog from './statementOfAccountDialog' import statementOfAccountDialog from './statementOfAccountDialog'
...@@ -50,7 +52,7 @@ export default { ...@@ -50,7 +52,7 @@ export default {
}, },
data() { data() {
return { return {
membraneTypeList: membraneTypeList, // membraneTypeList: membraneTypeList,
size: 'small', size: 'small',
totalInventory: '', totalInventory: '',
url: url, url: url,
...@@ -137,7 +139,7 @@ export default { ...@@ -137,7 +139,7 @@ export default {
label: '上月结存库存', label: '上月结存库存',
prop: 'lastMonthRemainStock', prop: 'lastMonthRemainStock',
formatter: cellValue => { formatter: cellValue => {
return cellValue.lastMonthRemainStock || cellValue.lastMonthRemainStock == 0 ? parseFloat(cellValue.lastMonthRemainStock).toFixed(2) + (this.membraneTypeList.includes(cellValue.goodsType) ? '米' : '件') : '-' return cellValue.lastMonthRemainStock || cellValue.lastMonthRemainStock == 0 ? parseFloat(cellValue.lastMonthRemainStock).toFixed(2) + (this.$membraneTypeList.includes(cellValue.goodsType) ? '米' : '件') : '-'
} }
}, },
{ {
...@@ -151,7 +153,7 @@ export default { ...@@ -151,7 +153,7 @@ export default {
label: '当前库存', label: '当前库存',
prop: 'stock', prop: 'stock',
formatter: cellValue => { formatter: cellValue => {
return cellValue.stock || cellValue.stock == 0 ? parseFloat(cellValue.stock).toFixed(2) + (this.membraneTypeList.includes(cellValue.goodsType) == 1 ? '米' : '件') : '-' return cellValue.stock || cellValue.stock == 0 ? parseFloat(cellValue.stock).toFixed(2) + (this.$membraneTypeList.includes(cellValue.goodsType) == 1 ? '米' : '件') : '-'
} }
}, },
{ {
...@@ -299,8 +301,8 @@ export default { ...@@ -299,8 +301,8 @@ export default {
color: #333; color: #333;
} }
} }
.txt-blue { .txt-blue {
color: #5850ff; color: #5850ff;
} }
} }</style>
</style>
<!-- 库存对账单弹窗 --> <!-- 库存对账单弹窗 -->
<template> <template>
<GLDialog title="库存对账单" :visible.sync="dialogVisible" class="statementOfAccountDialog" :destroy-on-close="true" :close-on-click-modal="false" :before-close="handleClose" @onOk="handleConfirm" @onCancel="handleClose"> <GLDialog title="库存对账单" :visible.sync="dialogVisible" class="statementOfAccountDialog" :destroy-on-close="true"
:close-on-click-modal="false" :before-close="handleClose" @onOk="handleConfirm" @onCancel="handleClose">
<el-form ref="statementOfAccountForm" :model="dataForm" :rules="formRules" label-width="154px" size="small"> <el-form ref="statementOfAccountForm" :model="dataForm" :rules="formRules" label-width="154px" size="small">
<el-form-item label="时间:" prop="dataMonthStr"> <el-form-item label="时间:" prop="dataMonthStr">
<el-date-picker <el-date-picker v-model="dataForm.dataMonthStr" type="month" :clearable="false" value-format="yyyy-MM"
v-model="dataForm.dataMonthStr" :append-to-body="false" format="yyyy-MM" class="form-node" placeholder="选择时间"
type="month" popper-class="statement-of-account-month-picker" :picker-options="beforeRangePickerOptions"></el-date-picker>
:clearable="false"
value-format="yyyy-MM"
:append-to-body="false"
format="yyyy-MM"
class="form-node"
placeholder="选择时间"
popper-class="statement-of-account-month-picker"
:picker-options="beforeRangePickerOptions">
</el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="仓库:" prop="yqMerchantId"> <el-form-item label="仓库:" prop="yqMerchantId">
<el-select v-model="dataForm.yqMerchantId" class="form-node" filterable @change="yqMerchantIdChange" placeholder="请选择仓库"> <el-select v-model="dataForm.yqMerchantId" class="form-node" filterable @change="yqMerchantIdChange"
<el-option v-for="(subItem, subIndex) in stockList" :key="subIndex" :value="subItem.merchantNo" :label="subItem.merchantName"></el-option> placeholder="请选择仓库">
<el-option v-for="(subItem, subIndex) in stockList" :key="subIndex" :value="subItem.merchantNo"
:label="subItem.merchantName"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="门店:" prop="merchantId"> <el-form-item label="门店:" prop="merchantId">
<el-select v-model="dataForm.merchantId" class="form-node" filterable placeholder="请选择门店"> <el-select v-model="dataForm.merchantId" class="form-node" filterable placeholder="请选择门店">
<el-option v-for="(subItem, subIndex) in merchantList" :key="subIndex" :value="subItem.merchantId" :label="subItem.merchantName"></el-option> <el-option v-for="(subItem, subIndex) in merchantList" :key="subIndex" :value="subItem.merchantId"
:label="subItem.merchantName"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -32,7 +27,7 @@ ...@@ -32,7 +27,7 @@
<script> <script>
import { beforeRangePickerOptions } from '@/components/glsx-combi-form/common' import { beforeRangePickerOptions } from '@/components/glsx-combi-form/common'
import { membraneTypeList } from '@/utils/constants.js' // import { membraneTypeList } from '@/utils/constants.js'
export default { export default {
name: 'statementOfAccountDialog', name: 'statementOfAccountDialog',
...@@ -54,7 +49,7 @@ export default { ...@@ -54,7 +49,7 @@ export default {
yqMerchantId: '', yqMerchantId: '',
merchantId: '' merchantId: ''
}, },
membraneTypeList: membraneTypeList, // membraneTypeList: membraneTypeList,
formRules: { formRules: {
dataMonthStr: [{ required: true, message: '请选择时间', trigger: 'change' }], dataMonthStr: [{ required: true, message: '请选择时间', trigger: 'change' }],
yqMerchantId: [{ required: true, message: '请选择仓库', trigger: 'change' }], yqMerchantId: [{ required: true, message: '请选择仓库', trigger: 'change' }],
...@@ -105,12 +100,14 @@ export default { ...@@ -105,12 +100,14 @@ export default {
_headOffice = this.stockList.find(item => item.merchantNo === e) _headOffice = this.stockList.find(item => item.merchantNo === e)
_headOffice.merchantId = _headOffice.merchantNo _headOffice.merchantId = _headOffice.merchantNo
// 获取仓库下的门店列表 // 获取仓库下的门店列表
this.$apis.stockManage.getServicemerchantrefList({ this.$apis.stockManage
yqMerchantId: e .getServicemerchantrefList({
}).then(res => { yqMerchantId: e
this.merchantList = res || [] })
this.merchantList.push(_headOffice) // 园区店可选择自己 .then(res => {
}) this.merchantList = res || []
this.merchantList.push(_headOffice) // 园区店可选择自己
})
}, },
handleClose() { handleClose() {
this.dialogVisible = false this.dialogVisible = false
...@@ -126,9 +123,8 @@ export default { ...@@ -126,9 +123,8 @@ export default {
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.statementOfAccountDialog {
.statementOfAccountDialog{ .form-node {
.form-node{
width: 432px; width: 432px;
} }
} }
...@@ -140,8 +136,8 @@ export default { ...@@ -140,8 +136,8 @@ export default {
background: #5850ff; background: #5850ff;
border-radius: 18px; border-radius: 18px;
} }
.el-month-table td.today .cell{
.el-month-table td.today .cell {
color: #5850ff; color: #5850ff;
} }
}
</style>
\ No newline at end of file \ No newline at end of file
}</style>
<!-- 库存明细弹窗 --> <!-- 库存明细弹窗 -->
<template> <template>
<GLDialog bigTitle="库存明细" :visible.sync="dialogVisible" class="stockMonthDailog" width="50%" mode="big" :destroy-on-close="true" :close-on-click-modal="false" okText="关闭" :before-close="handleClose" :hasFooter="false" @onOk="handleClose" @onCancel="handleClose"> <GLDialog bigTitle="库存明细" :visible.sync="dialogVisible" class="stockMonthDailog" width="700px" mode="big"
:destroy-on-close="true" :close-on-click-modal="false" okText="关闭" :before-close="handleClose" :hasFooter="false"
@onOk="handleClose" @onCancel="handleClose">
<div> <div>
<div class="d2-container-content"> <div class="d2-container-content">
<GLTable ref="recordTable" :get-list-api="getListApi" :search-form="searchForm" :table-params="tableParams" :pageConf="pageConf"></GLTable> <GLTable ref="recordTable" :get-list-api="getListApi" :search-form="searchForm" :table-params="tableParams"
:pageConf="pageConf"></GLTable>
</div> </div>
</div> </div>
<!-- <span slot="footer" <!-- <span slot="footer"
...@@ -18,7 +21,7 @@ ...@@ -18,7 +21,7 @@
<script> <script>
// import { mapActions, mapState } from 'vuex' // import { mapActions, mapState } from 'vuex'
// import { merchantShopGoodsStockPage } from '@api/stockManage' // import { merchantShopGoodsStockPage } from '@api/stockManage'
import { membraneTypeList } from '@/utils/constants.js' // import { membraneTypeList } from '@/utils/constants.js'
export default { export default {
name: 'StockDetailDialog', name: 'StockDetailDialog',
...@@ -29,14 +32,14 @@ export default { ...@@ -29,14 +32,14 @@ export default {
}, },
recordInfo: { recordInfo: {
type: Object, type: Object,
default: () => {} default: () => { }
} }
}, },
data() { data() {
return { return {
pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' }, pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' },
// userInfo: this.$store.state.d2admin.user.info, // userInfo: this.$store.state.d2admin.user.info,
membraneTypeList: membraneTypeList, // membraneTypeList: membraneTypeList,
searchForm: { searchForm: {
upgradeGoodsId: '', upgradeGoodsId: '',
yqMerchantId: '' yqMerchantId: ''
...@@ -56,10 +59,15 @@ export default { ...@@ -56,10 +59,15 @@ export default {
{ {
label: '当前库存', label: '当前库存',
prop: 'stock', prop: 'stock',
// width: '' width: '150px',
formatter: cellValue => { formatter: cellValue => {
return cellValue.stock || cellValue.stock == 0 ? parseFloat(cellValue.stock).toFixed(2) + (this.membraneTypeList.includes(cellValue.goodsType) ? '米' : '件') : '-' return cellValue.stock || cellValue.stock == 0 ? parseFloat(cellValue.stock).toFixed(2) + (this.$membraneTypeList.includes(cellValue.goodsType) ? '米' : '件') : '-'
} }
},
{
label: '膜卷号',
prop: 'filmRollNo'
// width: '200px'
} }
] ]
} }
...@@ -124,5 +132,4 @@ export default { ...@@ -124,5 +132,4 @@ export default {
.show-search { .show-search {
margin-left: -65px; margin-left: -65px;
} }</style>
</style>
<template> <template>
<GLDialog class="stock-dialog" v-if="stockMonthVisible" :destroy-on-close="true" :before-close="handleClose" bigTitle="月度库存结算单" mode="big" okText="关闭" :visible.sync="stockMonthVisible" :close-on-click-modal="false" @onOk="handleClose" @onCancel="handleClose" :hasFooter="false"> <GLDialog class="stock-dialog" v-if="stockMonthVisible" :destroy-on-close="true" :before-close="handleClose"
bigTitle="月度库存结算单" mode="big" okText="关闭" :visible.sync="stockMonthVisible" :close-on-click-modal="false"
@onOk="handleClose" @onCancel="handleClose" :hasFooter="false">
<div class="detail-content" v-if="stockMonthVisible"> <div class="detail-content" v-if="stockMonthVisible">
<el-form :inline="true" :model="searchForm" size="small"> <el-form :inline="true" :model="searchForm" size="small">
<el-form-item label="年度:"> <el-form-item label="年度:">
<el-date-picker v-model="searchForm.year" type="year" placeholder="选择年" value-format="yyyy" format="yyyy" :clearable="false" :picker-options="pickerOption" @change="chooseYear"></el-date-picker> <el-date-picker v-model="searchForm.year" type="year" placeholder="选择年" value-format="yyyy" format="yyyy"
:clearable="false" :picker-options="pickerOption" @change="chooseYear"></el-date-picker>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div class="table-class"> <div class="table-class">
<GLTable ref="purchaseOrderDetailTable" :tableParams="tableParams" :has-num="false" :hasPage="false" :tableData="tableData" :pageConf="pageConf"></GLTable> <GLTable ref="purchaseOrderDetailTable" :tableParams="tableParams" :has-num="false" :hasPage="false"
:tableData="tableData" :pageConf="pageConf"></GLTable>
</div> </div>
<span class="btn-tips"> <span class="btn-tips">
<img src="@/images/icon-warn.png" /> <img src="@/images/icon-warn.png" />
...@@ -21,7 +25,7 @@ ...@@ -21,7 +25,7 @@
</template> </template>
<script> <script>
import { membraneTypeList } from '@/utils/constants.js' // import { membraneTypeList } from '@/utils/constants.js'
export default { export default {
name: 'StockMonthDialog', name: 'StockMonthDialog',
props: { props: {
...@@ -31,13 +35,13 @@ export default { ...@@ -31,13 +35,13 @@ export default {
}, },
stockInfo: { stockInfo: {
type: Object, type: Object,
default: () => {} default: () => { }
} }
}, },
data() { data() {
return { return {
pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' }, pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' },
membraneTypeList: membraneTypeList, // membraneTypeList: membraneTypeList,
tableParams: { tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000), btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list', listName: 'list',
...@@ -61,7 +65,7 @@ export default { ...@@ -61,7 +65,7 @@ export default {
label: '本月采购数量', label: '本月采购数量',
prop: 'purchaseNum', prop: 'purchaseNum',
formatter: cellValue => { formatter: cellValue => {
return cellValue.purchaseNum || cellValue.purchaseNum == 0 ? parseFloat(cellValue.purchaseNum).toFixed(2) + (this.membraneTypeList.includes(cellValue.goodsType) ? '米' : '件') : '-' return cellValue.purchaseNum || cellValue.purchaseNum == 0 ? parseFloat(cellValue.purchaseNum).toFixed(2) + (this.$membraneTypeList.includes(cellValue.goodsType) ? '米' : '件') : '-'
} }
}, },
{ {
...@@ -83,7 +87,7 @@ export default { ...@@ -83,7 +87,7 @@ export default {
label: '出库数量', label: '出库数量',
prop: 'reduceStockNum', prop: 'reduceStockNum',
formatter: cellValue => { formatter: cellValue => {
return cellValue.reduceStockNum || cellValue.reduceStockNum == 0 ? parseFloat(cellValue.reduceStockNum).toFixed(2) + (this.membraneTypeList.includes(cellValue.goodsType) ? '米' : '件') : '-' return cellValue.reduceStockNum || cellValue.reduceStockNum == 0 ? parseFloat(cellValue.reduceStockNum).toFixed(2) + (this.$membraneTypeList.includes(cellValue.goodsType) ? '米' : '件') : '-'
} }
}, },
{ {
...@@ -98,7 +102,7 @@ export default { ...@@ -98,7 +102,7 @@ export default {
label: '结存库存数量', label: '结存库存数量',
prop: 'stock', prop: 'stock',
formatter: cellValue => { formatter: cellValue => {
return cellValue.stock || cellValue.stock == 0 ? parseFloat(cellValue.stock).toFixed(2) + (this.membraneTypeList.includes(cellValue.goodsType) ? '米' : '件') : '-' return cellValue.stock || cellValue.stock == 0 ? parseFloat(cellValue.stock).toFixed(2) + (this.$membraneTypeList.includes(cellValue.goodsType) ? '米' : '件') : '-'
} }
} }
] ]
...@@ -164,6 +168,7 @@ export default { ...@@ -164,6 +168,7 @@ export default {
max-height: 616px; max-height: 616px;
} }
} }
.btn-tips { .btn-tips {
display: inline-block; display: inline-block;
font-size: 12px; font-size: 12px;
...@@ -173,11 +178,11 @@ export default { ...@@ -173,11 +178,11 @@ export default {
color: #999; color: #999;
margin-right: 24px; margin-right: 24px;
padding: 6.5px 10px; padding: 6.5px 10px;
img { img {
width: 18px; width: 18px;
height: 15px; height: 15px;
margin-right: 9px; margin-right: 9px;
vertical-align: bottom; vertical-align: bottom;
} }
} }</style>
</style>
<template> <template>
<div class="purchase"> <div class="purchase">
<div class="container"> <div class="container">
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="showFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm> <GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="showFormData" @handleOk="handleSearch"
@handleRest="handleReset"></GLCombiForm>
<div class="table-header"> <div class="table-header">
<div> <div>
<div> <div>
...@@ -15,7 +16,9 @@ ...@@ -15,7 +16,9 @@
</div> </div>
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<GLTable ref="warehousingRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun"></GLTable> <GLTable ref="warehousingRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm"
:tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn"
@setTableFinishFun="setTableFinishFun"></GLTable>
<!-- 表格区域 end --> <!-- 表格区域 end -->
</div> </div>
</div> </div>
...@@ -24,12 +27,12 @@ ...@@ -24,12 +27,12 @@
<script> <script>
import * as dayjs from 'dayjs' import * as dayjs from 'dayjs'
import url from '@/assets/empty.png' import url from '@/assets/empty.png'
import { membraneTypeList } from '@/utils/constants.js' // import { membraneTypeList } from '@/utils/constants.js'
export default { export default {
name: 'warehousing', name: 'warehousing',
data() { data() {
return { return {
membraneTypeList: membraneTypeList, // membraneTypeList: membraneTypeList,
size: 'small', size: 'small',
totalObj: {}, totalObj: {},
url: url, url: url,
...@@ -109,7 +112,8 @@ export default { ...@@ -109,7 +112,8 @@ export default {
type: 'input', type: 'input',
maxlength: '20', maxlength: '20',
isClear: true isClear: true
}, { },
{
label: '入库仓库', label: '入库仓库',
name: 'yqMerchantId', name: 'yqMerchantId',
type: 'select', type: 'select',
...@@ -118,13 +122,12 @@ export default { ...@@ -118,13 +122,12 @@ export default {
optionLabel: 'merchantName', optionLabel: 'merchantName',
optionsName: 'yqMerchantList', optionsName: 'yqMerchantList',
changeAttr: (value, targetItem) => { changeAttr: (value, targetItem) => {
value value ? this.getServicemerchantrefList(value) : (this.baseData.merchantIdList = [])
? this.getServicemerchantrefList(value)
: (this.baseData.merchantIdList = [])
this.searchForm.merchantId = '' this.searchForm.merchantId = ''
this.getOptionsList('showFormData') this.getOptionsList('showFormData')
} }
}, { },
{
label: '入库门店', label: '入库门店',
name: 'merchantId', name: 'merchantId',
type: 'select', type: 'select',
...@@ -142,6 +145,13 @@ export default { ...@@ -142,6 +145,13 @@ export default {
optionId: 'confId', optionId: 'confId',
optionLabel: 'confLabel', optionLabel: 'confLabel',
optionsName: 'upgradeFlagList' optionsName: 'upgradeFlagList'
},
{
label: '膜卷号',
name: 'filmRollNo',
type: 'input',
maxlength: '50',
isClear: true
} }
], ],
// 表格 // 表格
...@@ -186,7 +196,7 @@ export default { ...@@ -186,7 +196,7 @@ export default {
label: '入库数量', label: '入库数量',
prop: 'increaseStockNum', prop: 'increaseStockNum',
formatter: cellValue => { formatter: cellValue => {
return cellValue.increaseStockNum || cellValue.increaseStockNum == 0 ? parseFloat(cellValue.increaseStockNum).toFixed(2) + (this.membraneTypeList.includes(cellValue.goodsType) && cellValue.goodsType != this.$purchaseType ? '米' : '件') : '-' return cellValue.increaseStockNum || cellValue.increaseStockNum == 0 ? parseFloat(cellValue.increaseStockNum).toFixed(2) + (this.$membraneTypeList.includes(cellValue.goodsType) ? '米' : '件') : '-'
}, },
width: 120 width: 120
}, },
...@@ -218,8 +228,14 @@ export default { ...@@ -218,8 +228,14 @@ export default {
minWidth: 150 minWidth: 150
}, },
{ {
label: '膜卷号',
prop: 'filmRollNo',
minWidth: 150
},
{
label: '订单类型', label: '订单类型',
prop: '', prop: '',
minWidth: 150,
formatter: cellValue => { formatter: cellValue => {
return cellValue.increaseStockType == '4' ? this.baseData.upgradeFlagList.find(item => item.confId === cellValue.upgradeFlag)?.confLabel : '-' return cellValue.increaseStockType == '4' ? this.baseData.upgradeFlagList.find(item => item.confId === cellValue.upgradeFlag)?.confLabel : '-'
} }
...@@ -313,17 +329,19 @@ export default { ...@@ -313,17 +329,19 @@ export default {
// 获取仓库门店 // 获取仓库门店
getServicemerchantrefList(merchantId) { getServicemerchantrefList(merchantId) {
this.$apis.stockManage.getServicemerchantrefList({ this.$apis.stockManage
yqMerchantId: merchantId .getServicemerchantrefList({
}).then(res => { yqMerchantId: merchantId
this.baseData.merchantIdList = res || [] })
//总店 .then(res => {
let _headOffice = this.baseData.yqMerchantList.find(item => item.merchantNo === merchantId) this.baseData.merchantIdList = res || []
_headOffice.merchantId = _headOffice.merchantNo //总店
//门店选项中加入总店 let _headOffice = this.baseData.yqMerchantList.find(item => item.merchantNo === merchantId)
this.baseData.merchantIdList.push(_headOffice) _headOffice.merchantId = _headOffice.merchantNo
this.getOptionsList('showFormData') //门店选项中加入总店
}) this.baseData.merchantIdList.push(_headOffice)
this.getOptionsList('showFormData')
})
}, },
secondConfirm(title, txt, apiModule, apiName, apiParams, fn) { secondConfirm(title, txt, apiModule, apiName, apiParams, fn) {
...@@ -443,8 +461,8 @@ export default { ...@@ -443,8 +461,8 @@ export default {
color: #333; color: #333;
} }
} }
.txt-blue { .txt-blue {
color: #5850ff; color: #5850ff;
} }
} }</style>
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!