Commit 7ea4a4f1 by 张立顺

Merge branch 'dev_v4.32.0_1130' into 'develop'

Dev v4.32.0 1130

See merge request !11
2 parents e83bb7d7 4651f7eb
......@@ -11,17 +11,18 @@ let router = null
let instance = null
Vue.use(ElementUI)
Vue.use(GLTable)
export async function bootstrap({ history, common, messenger, globalState,routerBase }) {
const { response, request, sign, secret, sign_common, request_common, purchaseType} = await fetchConfig(common)
export async function bootstrap({ history, common, messenger, globalState, routerBase }) {
const { response, request, sign, secret, sign_common, request_common, membraneTypeList } = await fetchConfig(common)
// console.log(purchaseType, 'purchaseType')
Vue.prototype.$history = history
Vue.prototype.$messenger = messenger
Vue.prototype.$globalState = globalState
Vue.prototype.$common = common
Vue.prototype.$message = message
Vue.prototype.$messageBox = messageBox
Vue.prototype.$purchaseType = purchaseType
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.$membraneTypeList = membraneTypeList
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.$setGlobalState = globalState.actions.setGlobalState
const routesData = common.utils.deepClone(globalState.routers)
routes = getRoutes(routesData)
......
......@@ -5,8 +5,7 @@
<div>
<div class="d2-container-content">
<GLTable ref="recordTable" :getListApi="getListApi" :searchForm="searchFormSearch" :tableParams="tableParams"
:beforeSearchFn="beforeSearchFn">
</GLTable>
:beforeSearchFn="beforeSearchFn"></GLTable>
</div>
</div>
<!-- <span slot="footer" class="dialog-footer">
......@@ -16,12 +15,12 @@
</template>
<script>
import { membraneTypeList } from '@/utils/constants.js'
// import { membraneTypeList } from '@/utils/constants.js'
export default {
name: 'allocationDetailDialog',
data() {
return {
membraneTypeList: membraneTypeList,
// membraneTypeList: membraneTypeList,
searchForm: {
id: ''
},
......@@ -40,7 +39,7 @@ export default {
},
{
label: '商品编码',
prop: 'productCode',
prop: 'productCode'
// width: 250
},
{
......@@ -55,8 +54,12 @@ export default {
label: '调拨数量',
prop: 'allocateNumber',
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>
<div class="purchase">
<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">
<h2>盘点列表</h2>
<div>
......@@ -11,7 +12,9 @@
</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">
<img class="img-36" :src="scope.scope.voucherPic" @click="handleEnlargeImg(scope.scope.voucherPic)" />
</div>
......@@ -26,14 +29,15 @@
<img width="100%" :src="previewImgUrl" alt="图片" />
</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>
</template>
<script>
import * as dayjs from 'dayjs'
import url from '@/assets/empty.png'
import { membraneTypeList } from '@/utils/constants.js'
// import { membraneTypeList } from '@/utils/constants.js'
import inventoryDetailDialog from './inventoryDetailDialog'
export default {
name: 'warehousing',
......@@ -42,7 +46,7 @@ export default {
},
data() {
return {
membraneTypeList: membraneTypeList,
// membraneTypeList: membraneTypeList,
size: 'small',
url: url,
searchForm: {
......@@ -271,15 +275,16 @@ export default {
<style scoped lang="scss">
@import '@/assets/css/mixin.scss';
.purchase {
.table-header {
@include space-between_center;
margin-bottom: 10px;
h2 {
font-weight: 600;
font-size: 16px;
color: #333;
}
}
}
</style>
}</style>
......@@ -33,12 +33,12 @@
</template>
<script>
import { membraneTypeList } from '@/utils/constants.js'
// import { membraneTypeList } from '@/utils/constants.js'
export default {
name: 'InventoryDetailDialog',
data() {
return {
membraneTypeList: membraneTypeList,
membraneTypeList: this.$membraneTypeList,
countObj: {},
searchForm: {
id: ''
......@@ -60,7 +60,7 @@ export default {
},
{
label: '商品编码',
prop: 'productCode',
prop: 'productCode'
// width: 250
},
{
......@@ -75,14 +75,14 @@ export default {
label: '系统库存',
prop: 'stock',
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: 'checkStock',
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 {
// formatter: (cellValue) => {
// return cellValue.checkTime ? Util.dateFormate(cellValue.checkTime, 'YYYY-MM-DD HH:mm:ss') : ''
// }
},
{
label: '膜卷号',
prop: 'filmRollNo'
}
]
},
......@@ -138,5 +142,4 @@ export default {
.inventoryDetailDailog .el-dialog {
margin-top: 20vh !important;
min-width: 700px;
}
</style>
}</style>
<template>
<div class="purchase">
<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">
<h2>预警列表</h2>
<div>
......@@ -11,7 +12,9 @@
</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 -->
</div>
</div>
......@@ -19,12 +22,12 @@
<script>
import url from '@/assets/empty.png'
import { membraneTypeList } from '@/utils/constants.js'
// import { membraneTypeList } from '@/utils/constants.js'
export default {
name: 'earlyWarning',
data() {
return {
membraneTypeList: membraneTypeList,
// membraneTypeList: membraneTypeList,
size: 'small',
url: url,
searchForm: {
......@@ -119,21 +122,21 @@ export default {
label: '库存',
prop: 'stock',
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: 'warningValue',
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: '最高库存',
prop: 'warningValueMax',
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 {
<style scoped lang="scss">
@import '@/assets/css/mixin.scss';
.purchase {
.table-header {
@include space-between_center;
margin-bottom: 10px;
h2 {
font-weight: 600;
font-size: 16px;
color: #333;
}
}
}
</style>
}</style>
<template>
<div class="purchase">
<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>
合计:出库数量
......@@ -13,7 +14,9 @@
</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 -->
</div>
</div>
......@@ -22,12 +25,12 @@
<script>
import * as dayjs from 'dayjs'
import url from '@/assets/empty.png'
import { membraneTypeList } from '@/utils/constants.js'
// import { membraneTypeList } from '@/utils/constants.js'
export default {
name: 'warehousing',
data() {
return {
membraneTypeList: membraneTypeList,
// membraneTypeList: membraneTypeList,
size: 'small',
totalObj: {},
url: url,
......@@ -139,6 +142,13 @@ export default {
optionId: 'confId',
optionLabel: 'confLabel',
optionsName: 'upgradeFlagList'
},
{
label: '膜卷号',
name: 'filmRollNo',
type: 'input',
maxlength: '50',
isClear: true
}
],
// 表格
......@@ -181,7 +191,7 @@ export default {
label: '出库数量',
prop: 'reduceStockNum',
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
},
......@@ -207,6 +217,11 @@ export default {
width: 200
},
{
label: '膜卷号',
prop: 'filmRollNo',
minWidth: 150
},
{
label: '订单类型',
prop: '',
formatter: cellValue => {
......@@ -400,8 +415,8 @@ export default {
color: #333;
}
}
.txt-blue {
color: #5850ff;
}
}
</style>
}</style>
<template>
<div class="purchase">
<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>
合计:当前库存
......@@ -14,7 +15,9 @@
</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">
<el-button type="text" @click="handleInventoryDetails(scope.scope)">库存明细</el-button>
<el-button type="text" @click="handleDetail(scope.scope)">统计</el-button>
......@@ -23,21 +26,20 @@
<!-- 表格区域 end -->
</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" />
<!-- 库存对账单 -->
<statementOfAccountDialog
:visible.sync="statementOfAccountDialogVisible"
v-if="statementOfAccountDialogVisible"
:yqMerchantList="baseData.yqMerchantList"
@handleRelateProConfirm="handleRelateProConfirm"></statementOfAccountDialog>
<statementOfAccountDialog :visible.sync="statementOfAccountDialogVisible" v-if="statementOfAccountDialogVisible"
:yqMerchantList="baseData.yqMerchantList" @handleRelateProConfirm="handleRelateProConfirm">
</statementOfAccountDialog>
</div>
</template>
<script>
import * as dayjs from 'dayjs'
import url from '@/assets/empty.png'
import { membraneTypeList } from '@/utils/constants.js'
// import { membraneTypeList } from '@/utils/constants.js'
import stockMonthDialog from './stockMonthDialog'
import stockDetailDialog from './stockDetailDialog'
import statementOfAccountDialog from './statementOfAccountDialog'
......@@ -50,7 +52,7 @@ export default {
},
data() {
return {
membraneTypeList: membraneTypeList,
// membraneTypeList: membraneTypeList,
size: 'small',
totalInventory: '',
url: url,
......@@ -137,7 +139,7 @@ export default {
label: '上月结存库存',
prop: 'lastMonthRemainStock',
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 {
label: '当前库存',
prop: 'stock',
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 {
color: #333;
}
}
.txt-blue {
color: #5850ff;
}
}
</style>
}</style>
<!-- 库存对账单弹窗 -->
<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-item label="时间:" prop="dataMonthStr">
<el-date-picker
v-model="dataForm.dataMonthStr"
type="month"
: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-date-picker v-model="dataForm.dataMonthStr" type="month" :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 label="仓库:" prop="yqMerchantId">
<el-select v-model="dataForm.yqMerchantId" class="form-node" filterable @change="yqMerchantIdChange" placeholder="请选择仓库">
<el-option v-for="(subItem, subIndex) in stockList" :key="subIndex" :value="subItem.merchantNo" :label="subItem.merchantName"></el-option>
<el-select v-model="dataForm.yqMerchantId" class="form-node" filterable @change="yqMerchantIdChange"
placeholder="请选择仓库">
<el-option v-for="(subItem, subIndex) in stockList" :key="subIndex" :value="subItem.merchantNo"
:label="subItem.merchantName"></el-option>
</el-select>
</el-form-item>
<el-form-item label="门店:" prop="merchantId">
<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-form-item>
</el-form>
......@@ -32,7 +27,7 @@
<script>
import { beforeRangePickerOptions } from '@/components/glsx-combi-form/common'
import { membraneTypeList } from '@/utils/constants.js'
// import { membraneTypeList } from '@/utils/constants.js'
export default {
name: 'statementOfAccountDialog',
......@@ -54,7 +49,7 @@ export default {
yqMerchantId: '',
merchantId: ''
},
membraneTypeList: membraneTypeList,
// membraneTypeList: membraneTypeList,
formRules: {
dataMonthStr: [{ required: true, message: '请选择时间', trigger: 'change' }],
yqMerchantId: [{ required: true, message: '请选择仓库', trigger: 'change' }],
......@@ -105,12 +100,14 @@ export default {
_headOffice = this.stockList.find(item => item.merchantNo === e)
_headOffice.merchantId = _headOffice.merchantNo
// 获取仓库下的门店列表
this.$apis.stockManage.getServicemerchantrefList({
yqMerchantId: e
}).then(res => {
this.merchantList = res || []
this.merchantList.push(_headOffice) // 园区店可选择自己
})
this.$apis.stockManage
.getServicemerchantrefList({
yqMerchantId: e
})
.then(res => {
this.merchantList = res || []
this.merchantList.push(_headOffice) // 园区店可选择自己
})
},
handleClose() {
this.dialogVisible = false
......@@ -126,9 +123,8 @@ export default {
}
</script>
<style scoped lang="scss">
.statementOfAccountDialog{
.form-node{
.statementOfAccountDialog {
.form-node {
width: 432px;
}
}
......@@ -140,8 +136,8 @@ export default {
background: #5850ff;
border-radius: 18px;
}
.el-month-table td.today .cell{
.el-month-table td.today .cell {
color: #5850ff;
}
}
</style>
\ No newline at end of file
}</style>
<!-- 库存明细弹窗 -->
<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 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>
<!-- <span slot="footer"
......@@ -18,7 +21,7 @@
<script>
// import { mapActions, mapState } from 'vuex'
// import { merchantShopGoodsStockPage } from '@api/stockManage'
import { membraneTypeList } from '@/utils/constants.js'
// import { membraneTypeList } from '@/utils/constants.js'
export default {
name: 'StockDetailDialog',
......@@ -29,14 +32,14 @@ export default {
},
recordInfo: {
type: Object,
default: () => {}
default: () => { }
}
},
data() {
return {
pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' },
// userInfo: this.$store.state.d2admin.user.info,
membraneTypeList: membraneTypeList,
// membraneTypeList: membraneTypeList,
searchForm: {
upgradeGoodsId: '',
yqMerchantId: ''
......@@ -56,10 +59,15 @@ export default {
{
label: '当前库存',
prop: 'stock',
// width: ''
width: '150px',
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 {
.show-search {
margin-left: -65px;
}
</style>
}</style>
<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">
<el-form :inline="true" :model="searchForm" size="small">
<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>
<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>
<span class="btn-tips">
<img src="@/images/icon-warn.png" />
......@@ -21,7 +25,7 @@
</template>
<script>
import { membraneTypeList } from '@/utils/constants.js'
// import { membraneTypeList } from '@/utils/constants.js'
export default {
name: 'StockMonthDialog',
props: {
......@@ -31,13 +35,13 @@ export default {
},
stockInfo: {
type: Object,
default: () => {}
default: () => { }
}
},
data() {
return {
pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' },
membraneTypeList: membraneTypeList,
// membraneTypeList: membraneTypeList,
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list',
......@@ -61,7 +65,7 @@ export default {
label: '本月采购数量',
prop: 'purchaseNum',
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 {
label: '出库数量',
prop: 'reduceStockNum',
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 {
label: '结存库存数量',
prop: 'stock',
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 {
max-height: 616px;
}
}
.btn-tips {
display: inline-block;
font-size: 12px;
......@@ -173,11 +178,11 @@ export default {
color: #999;
margin-right: 24px;
padding: 6.5px 10px;
img {
width: 18px;
height: 15px;
margin-right: 9px;
vertical-align: bottom;
}
}
</style>
}</style>
<template>
<div class="purchase">
<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>
<div>
......@@ -15,7 +16,9 @@
</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 -->
</div>
</div>
......@@ -24,12 +27,12 @@
<script>
import * as dayjs from 'dayjs'
import url from '@/assets/empty.png'
import { membraneTypeList } from '@/utils/constants.js'
// import { membraneTypeList } from '@/utils/constants.js'
export default {
name: 'warehousing',
data() {
return {
membraneTypeList: membraneTypeList,
// membraneTypeList: membraneTypeList,
size: 'small',
totalObj: {},
url: url,
......@@ -109,7 +112,8 @@ export default {
type: 'input',
maxlength: '20',
isClear: true
}, {
},
{
label: '入库仓库',
name: 'yqMerchantId',
type: 'select',
......@@ -118,13 +122,12 @@ export default {
optionLabel: 'merchantName',
optionsName: 'yqMerchantList',
changeAttr: (value, targetItem) => {
value
? this.getServicemerchantrefList(value)
: (this.baseData.merchantIdList = [])
value ? this.getServicemerchantrefList(value) : (this.baseData.merchantIdList = [])
this.searchForm.merchantId = ''
this.getOptionsList('showFormData')
}
}, {
},
{
label: '入库门店',
name: 'merchantId',
type: 'select',
......@@ -142,6 +145,13 @@ export default {
optionId: 'confId',
optionLabel: 'confLabel',
optionsName: 'upgradeFlagList'
},
{
label: '膜卷号',
name: 'filmRollNo',
type: 'input',
maxlength: '50',
isClear: true
}
],
// 表格
......@@ -186,7 +196,7 @@ export default {
label: '入库数量',
prop: 'increaseStockNum',
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
},
......@@ -218,8 +228,14 @@ export default {
minWidth: 150
},
{
label: '膜卷号',
prop: 'filmRollNo',
minWidth: 150
},
{
label: '订单类型',
prop: '',
minWidth: 150,
formatter: cellValue => {
return cellValue.increaseStockType == '4' ? this.baseData.upgradeFlagList.find(item => item.confId === cellValue.upgradeFlag)?.confLabel : '-'
}
......@@ -313,17 +329,19 @@ export default {
// 获取仓库门店
getServicemerchantrefList(merchantId) {
this.$apis.stockManage.getServicemerchantrefList({
yqMerchantId: merchantId
}).then(res => {
this.baseData.merchantIdList = res || []
//总店
let _headOffice = this.baseData.yqMerchantList.find(item => item.merchantNo === merchantId)
_headOffice.merchantId = _headOffice.merchantNo
//门店选项中加入总店
this.baseData.merchantIdList.push(_headOffice)
this.getOptionsList('showFormData')
})
this.$apis.stockManage
.getServicemerchantrefList({
yqMerchantId: merchantId
})
.then(res => {
this.baseData.merchantIdList = res || []
//总店
let _headOffice = this.baseData.yqMerchantList.find(item => item.merchantNo === merchantId)
_headOffice.merchantId = _headOffice.merchantNo
//门店选项中加入总店
this.baseData.merchantIdList.push(_headOffice)
this.getOptionsList('showFormData')
})
},
secondConfirm(title, txt, apiModule, apiName, apiParams, fn) {
......@@ -443,8 +461,8 @@ export default {
color: #333;
}
}
.txt-blue {
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!