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 ...@@ -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)
......
<template> <template>
<div class="addWrap"> <div class="addWrap">
<div class="d2-container-content gl-form-min" <div class="d2-container-content gl-form-min" style="padding: 10px 20px">
style="padding: 10px 20px"> <el-form :inline="true" size="small" :model="editAllocationForm" ref="editAllocationFormRef" :rules="formRules"
<el-form :inline="true"
size="small"
:model="editAllocationForm"
ref="editAllocationFormRef"
:rules="formRules"
class="demo-form-inline"> class="demo-form-inline">
<el-form-item>调出方</el-form-item> <el-form-item>调出方</el-form-item>
<el-form-item label="调出仓库:" <el-form-item label="调出仓库:" prop="callOutYqMerchantId">
prop="callOutYqMerchantId"> <el-select v-model="editAllocationForm.callOutYqMerchantId" style="width: 300px">
<el-select v-model="editAllocationForm.callOutYqMerchantId" <el-option v-for="item in callOutYqMerchantList" :key="item.merchantNo" :label="item.merchantName"
style="width: 300px">
<el-option v-for="item in callOutYqMerchantList"
:key="item.merchantNo"
:label="item.merchantName"
:value="item.merchantNo" /> :value="item.merchantNo" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="调出门店:" <el-form-item label="调出门店:" prop="callOutMerchantId">
prop="callOutMerchantId"> <el-select v-model="editAllocationForm.callOutMerchantId" style="width: 300px">
<el-select v-model="editAllocationForm.callOutMerchantId" <el-option v-for="item in callOutMerchantList" :key="item.merchantId" :label="item.merchantName"
style="width: 300px">
<el-option v-for="item in callOutMerchantList"
:key="item.merchantId"
:label="item.merchantName"
:value="item.merchantId" /> :value="item.merchantId" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<br /> <br />
<el-form-item>调入方</el-form-item> <el-form-item>调入方</el-form-item>
<el-form-item label="调入仓库:" <el-form-item label="调入仓库:" prop="callInYqMerchantId">
prop="callInYqMerchantId">
<el-select v-model="editAllocationForm.callInYqMerchantId" <el-select v-model="editAllocationForm.callInYqMerchantId"
@change="changeCallInYqMerchant(editAllocationForm.callInYqMerchantId)" @change="changeCallInYqMerchant(editAllocationForm.callInYqMerchantId)" style="width: 300px">
style="width: 300px"> <el-option v-for="item in callInYqMerchantList" :key="item.merchantNo" :label="item.merchantName"
<el-option v-for="item in callInYqMerchantList"
:key="item.merchantNo"
:label="item.merchantName"
:value="item.merchantNo" /> :value="item.merchantNo" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="调入门店:" <el-form-item label="调入门店:" prop="callInMerchantId">
prop="callInMerchantId"> <el-select v-model="editAllocationForm.callInMerchantId" style="width: 300px">
<el-select v-model="editAllocationForm.callInMerchantId" <el-option v-for="item in callInMerchantList" :key="item.merchantId" :label="item.merchantName"
style="width: 300px">
<el-option v-for="item in callInMerchantList"
:key="item.merchantId"
:label="item.merchantName"
:value="item.merchantId" /> :value="item.merchantId" />
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -58,68 +36,41 @@ ...@@ -58,68 +36,41 @@
<div class="d2-container-content"> <div class="d2-container-content">
<div style="padding: 15px 0"> <div style="padding: 15px 0">
<div class="gl-form-min"> <div class="gl-form-min">
<el-form :inline="true" <el-form :inline="true" size="small" :model="editAllocationForm">
size="small"
:model="editAllocationForm">
<el-form-item label=""> <el-form-item label="">
<el-input v-model="searchForm.upgradeGoodsNameOrSeries" <el-input v-model="searchForm.upgradeGoodsNameOrSeries" style="width: 200px" placeholder="请输入商品名称/系列"
style="width: 200px" maxlength="20" clearable />
placeholder="请输入商品名称/系列"
maxlength="20"
clearable />
</el-form-item> </el-form-item>
<el-button @click="handleSearch" <el-button @click="handleSearch" size="small" type="primary" style="marginleft: 15px">查询</el-button>
size="small"
type="primary"
style="marginleft: 15px">查询</el-button>
</el-form> </el-form>
</div> </div>
</div> </div>
<GLTable ref="allocationTable" <GLTable ref="allocationTable" :getListApi="getListApi" :pageConf="pageConf" :searchForm="searchFormSearch"
:getListApi="getListApi" :tableParams="tableParams" :beforeSearchFn="beforeSearchFn">
:pageConf="pageConf" <div slot="auth-button" slot-scope="scope">
:searchForm="searchFormSearch" <el-button type="text" @click="allocation(scope.scope)" :disabled="setDisabled(scope.scope)">选择</el-button>
:tableParams="tableParams"
:beforeSearchFn="beforeSearchFn">
<div slot="auth-button"
slot-scope="scope">
<el-button type="text"
@click="allocation(scope.scope)"
:disabled="setDisabled(scope.scope)">选择</el-button>
</div> </div>
</GLTable> </GLTable>
</div> </div>
<div class="d2-container-content"> <div class="d2-container-content">
<p class="title">调拨确认单</p> <p class="title">调拨确认单</p>
<GLTable ref="allocationTable2" <GLTable ref="allocationTable2" :tableData="chooseDataList" :tableParams="tableParams2" :hasPage="false">
:tableData="chooseDataList" <div slot="auth-button" slot-scope="scope">
:tableParams="tableParams2" <el-button type="text" @click="cancelAllocation(scope.row, scope.$index)">取消</el-button>
:hasPage="false">
<div slot="auth-button"
slot-scope="scope">
<el-button type="text"
@click="cancelAllocation(scope.row, scope.$index)">取消</el-button>
</div> </div>
</GLTable> </GLTable>
</div> </div>
<glsx-form ref="allocationForm" <glsx-form ref="allocationForm" :rules="allocationFormRules" :origin-data="editData" :form-list="editForm"
:rules="allocationFormRules" form-ref="inveFormRef" @handleAddConfirm="handleAddConfirm" @handleClose="handleAddClose"></glsx-form>
:origin-data="editData"
:form-list="editForm"
form-ref="inveFormRef"
@handleAddConfirm="handleAddConfirm"
@handleClose="handleAddClose"></glsx-form>
<!-- 盘点 --> <!-- 盘点 -->
<allocation-num-dialog :allocation-num-visible="allocationNumVisible" <allocation-num-dialog :allocation-num-visible="allocationNumVisible" :allocation-info="allocationInfo"
:allocation-info="allocationInfo" v-if="allocationNumVisible" @dialogClose="dialogClose" />
v-if="allocationNumVisible"
@dialogClose="dialogClose" />
</div> </div>
</template> </template>
<script> <script>
import allocationNumDialog from './allocationNumDialog' import allocationNumDialog from './allocationNumDialog'
import { membraneTypeList } from '@/utils/constants.js' // import { membraneTypeList } from '@/utils/constants.js'
export default { export default {
name: 'allocationList', name: 'allocationList',
components: { components: {
...@@ -131,7 +82,7 @@ export default { ...@@ -131,7 +82,7 @@ export default {
callInYqMerchantList: [], callInYqMerchantList: [],
callOutMerchantList: [], callOutMerchantList: [],
callInMerchantList: [], callInMerchantList: [],
membraneTypeList: membraneTypeList, // membraneTypeList: membraneTypeList,
searchForm: { searchForm: {
upgradeGoodsNameOrSeries: '', upgradeGoodsNameOrSeries: '',
stockFlag: true stockFlag: true
...@@ -177,7 +128,7 @@ export default { ...@@ -177,7 +128,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) ? '米' : '件') : '-'
} }
}, },
{ {
...@@ -187,6 +138,10 @@ export default { ...@@ -187,6 +138,10 @@ export default {
{ {
label: '所属门店', label: '所属门店',
prop: 'merchantName' prop: 'merchantName'
},
{
label: '膜卷号',
prop: 'filmRollNo'
} }
] ]
}, },
...@@ -216,15 +171,19 @@ export default { ...@@ -216,15 +171,19 @@ 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: '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'
} }
] ]
}, },
...@@ -254,16 +213,16 @@ export default { ...@@ -254,16 +213,16 @@ export default {
label: '备注说明', label: '备注说明',
type: 'textarea', type: 'textarea',
maxlength: 100 maxlength: 100
}, }
] ]
} }
], ],
editAllocationForm: { editAllocationForm: {
callOutYqMerchantId: '',//调出仓库 callOutYqMerchantId: '', //调出仓库
callOutMerchantId: '',//调出门店 callOutMerchantId: '', //调出门店
callInYqMerchantId: '',//调入仓库 callInYqMerchantId: '', //调入仓库
callInMerchantId: '',//调入门店 callInMerchantId: '' //调入门店
}, },
allocationNumVisible: false, allocationNumVisible: false,
...@@ -315,8 +274,8 @@ export default { ...@@ -315,8 +274,8 @@ export default {
} }
] ]
}, },
oldyqMerchantId: '',//之前选择的调出仓库 oldyqMerchantId: '', //之前选择的调出仓库
oldMerchantId: '',//之前选择的调出门店 oldMerchantId: '' //之前选择的调出门店
} }
}, },
created() { created() {
...@@ -326,12 +285,14 @@ export default { ...@@ -326,12 +285,14 @@ export default {
}, },
watch: { watch: {
'editAllocationForm.callOutYqMerchantId'(val, oldval) { 'editAllocationForm.callOutYqMerchantId'(val, oldval) {
console.log(val, oldval, "监听callOutYqMerchantId"); console.log(val, oldval, '监听callOutYqMerchantId')
// this.getListApi = this.$apis.stockManage.stockRemainPage // this.getListApi = this.$apis.stockManage.stockRemainPage
if (this.callOutYqMerchantList.length == 1) {//当只有一个选项时不弹提示框 if (this.callOutYqMerchantList.length == 1) {
//当只有一个选项时不弹提示框
// this.$refs.allocationTable.refreshTable() // this.$refs.allocationTable.refreshTable()
} else { } else {
if (val != this.oldyqMerchantId) {//与之前的选项不一样 if (val != this.oldyqMerchantId) {
//与之前的选项不一样
this.editAllocationForm.callOutMerchantId = '' this.editAllocationForm.callOutMerchantId = ''
this.switchData(val, oldval, 'yqMerchant') this.switchData(val, oldval, 'yqMerchant')
} }
...@@ -339,12 +300,14 @@ export default { ...@@ -339,12 +300,14 @@ export default {
}, },
'editAllocationForm.callOutMerchantId'(val, oldval) { 'editAllocationForm.callOutMerchantId'(val, oldval) {
console.log(val, oldval, "监听callOutMerchantId"); console.log(val, oldval, '监听callOutMerchantId')
this.getListApi = this.$apis.stockManage.stockRemainPage this.getListApi = this.$apis.stockManage.stockRemainPage
if (this.callOutMerchantList.length == 1) {//当只有一个选项时不弹提示框 if (this.callOutMerchantList.length == 1) {
//当只有一个选项时不弹提示框
this.$refs.allocationTable.refreshTable() this.$refs.allocationTable.refreshTable()
} else { } else {
if (val != this.oldMerchantId) {//与之前的选项不一样 if (val != this.oldMerchantId) {
//与之前的选项不一样
this.switchData(val, oldval, 'merchant') this.switchData(val, oldval, 'merchant')
} }
} }
...@@ -394,9 +357,11 @@ export default { ...@@ -394,9 +357,11 @@ export default {
}, },
// 获取仓库门店 // 获取仓库门店
getServicemerchantrefList(merchantId, type) { getServicemerchantrefList(merchantId, type) {
this.$apis.stockManage.getServicemerchantrefList({ this.$apis.stockManage
.getServicemerchantrefList({
yqMerchantId: merchantId yqMerchantId: merchantId
}).then(res => { })
.then(res => {
if (type == 'out') { if (type == 'out') {
this.callOutMerchantList = res || [] this.callOutMerchantList = res || []
//总店 //总店
...@@ -417,13 +382,13 @@ export default { ...@@ -417,13 +382,13 @@ export default {
if (this.callInMerchantList && this.callInMerchantList.length == 1) { if (this.callInMerchantList && this.callInMerchantList.length == 1) {
this.editAllocationForm.callInMerchantId = this.callInMerchantList[0].merchantId this.editAllocationForm.callInMerchantId = this.callInMerchantList[0].merchantId
} }
} }
}) })
}, },
switchData(val, oldval, type) { switchData(val, oldval, type) {
if (this.chooseDataList && this.chooseDataList.length > 0) {//当盘存确认单有数据时提示 if (this.chooseDataList && this.chooseDataList.length > 0) {
//当盘存确认单有数据时提示
this.$confirm('切换调出仓库和调出门店,自动重置已调拨内容;是否确定切换?', '提示', { this.$confirm('切换调出仓库和调出门店,自动重置已调拨内容;是否确定切换?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
...@@ -432,7 +397,8 @@ export default { ...@@ -432,7 +397,8 @@ export default {
.then(() => { .then(() => {
if (type == 'yqMerchant') { if (type == 'yqMerchant') {
this.getServicemerchantrefList(val, 'out') this.getServicemerchantrefList(val, 'out')
} else {//选择门店以后才更新盘存数据 } else {
//选择门店以后才更新盘存数据
this.$refs.allocationTable.refreshTable() this.$refs.allocationTable.refreshTable()
} }
//清空调拨确认单数据 //清空调拨确认单数据
...@@ -440,10 +406,12 @@ export default { ...@@ -440,10 +406,12 @@ export default {
}) })
.catch(err => { .catch(err => {
console.log(err) console.log(err)
if (type == 'yqMerchant') {//调出仓库 if (type == 'yqMerchant') {
//调出仓库
this.editAllocationForm.callOutYqMerchantId = oldval this.editAllocationForm.callOutYqMerchantId = oldval
this.oldyqMerchantId = oldval this.oldyqMerchantId = oldval
} else if (type == 'merchant') {//调出门店 } else if (type == 'merchant') {
//调出门店
this.editAllocationForm.callOutMerchantId = oldval this.editAllocationForm.callOutMerchantId = oldval
this.oldMerchantId = oldval this.oldMerchantId = oldval
} }
...@@ -451,7 +419,8 @@ export default { ...@@ -451,7 +419,8 @@ export default {
} else { } else {
if (type == 'yqMerchant') { if (type == 'yqMerchant') {
this.getServicemerchantrefList(val, 'out') this.getServicemerchantrefList(val, 'out')
} else {//选择门店以后才更新盘存数据 } else {
//选择门店以后才更新盘存数据
this.$refs.allocationTable.refreshTable() this.$refs.allocationTable.refreshTable()
} }
} }
...@@ -572,5 +541,4 @@ export default { ...@@ -572,5 +541,4 @@ export default {
display: inline-block; display: inline-block;
box-sizing: border-box; box-sizing: border-box;
margin-right: 10px; margin-right: 10px;
} }</style>
</style>
...@@ -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="addWrap"> <div class="addWrap">
<div class="d2-container-content gl-form-min" <div class="d2-container-content gl-form-min" style="padding: 10px 20px">
style="padding: 10px 20px"> <el-form :inline="true" size="small" :model="editCheckForm" ref="editCheckFormRef" :rules="formRules"
<el-form :inline="true"
size="small"
:model="editCheckForm"
ref="editCheckFormRef"
:rules="formRules"
class="demo-form-inline"> class="demo-form-inline">
<el-form-item label="盘点仓库:" <el-form-item label="盘点仓库:" prop="yqMerchantId">
prop="yqMerchantId"> <el-select v-model="editCheckForm.yqMerchantId" @change="changeYqMerchant(editCheckForm.yqMerchantId)"
<el-select v-model="editCheckForm.yqMerchantId"
@change="changeYqMerchant(editCheckForm.yqMerchantId)"
style="width: 300px"> style="width: 300px">
<el-option v-for="item in yqMerchantIdList" <el-option v-for="item in yqMerchantIdList" :key="item.merchantNo" :label="item.merchantName"
:key="item.merchantNo"
:label="item.merchantName"
:value="item.merchantNo" /> :value="item.merchantNo" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="盘点门店:" <el-form-item label="盘点门店:" prop="merchantId">
prop="merchantId"> <el-select v-model="editCheckForm.merchantId" @change="changeMerchant(editCheckForm.merchantId)"
<el-select v-model="editCheckForm.merchantId"
@change="changeMerchant(editCheckForm.merchantId)"
style="width: 300px"> style="width: 300px">
<el-option v-for="item in merchantList" <el-option v-for="item in merchantList" :key="item.merchantId" :label="item.merchantName"
:key="item.merchantId"
:label="item.merchantName"
:value="item.merchantId" /> :value="item.merchantId" />
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -37,54 +24,33 @@ ...@@ -37,54 +24,33 @@
<p class="title">盘存</p> <p class="title">盘存</p>
<div style="padding: 15px 0"> <div style="padding: 15px 0">
<div class="gl-form-min"> <div class="gl-form-min">
<el-form ref="ruleForm" <el-form ref="ruleForm" :model="searchForm" size="small" inline="true">
:model="searchForm"
size="small"
inline="true">
<el-form-item label=""> <el-form-item label="">
<el-input v-model="searchForm.upgradeGoodsNameOrSeries" <el-input v-model="searchForm.upgradeGoodsNameOrSeries" style="width: 200px" placeholder="请输入商品名称/系列"
style="width: 200px" maxlength="20" clearable />
placeholder="请输入商品名称/系列"
maxlength="20"
clearable />
</el-form-item> </el-form-item>
<el-button @click="handleSearch" <el-button @click="handleSearch" size="small" type="primary">查询</el-button>
size="small"
type="primary">查询</el-button>
</el-form> </el-form>
</div> </div>
</div> </div>
<p class="title">盘存</p> <p class="title">盘存</p>
<GLTable ref="recordTable" <GLTable ref="recordTable" :getListApi="getListApi" :searchForm="searchFormSearch" :tableParams="tableParams"
:getListApi="getListApi" :beforeSearchFn="beforeSearchFn" :pageConf="pageConf">
:searchForm="searchFormSearch" <div slot="auth-button" slot-scope="scope">
:tableParams="tableParams" <el-button type="text" @click="inventory(scope.scope)" :disabled="setDisabled(scope.scope)">盘点</el-button>
:beforeSearchFn="beforeSearchFn"
:pageConf="pageConf">
<div slot="auth-button"
slot-scope="scope">
<el-button type="text"
@click="inventory(scope.scope)"
:disabled="setDisabled(scope.scope)">盘点</el-button>
</div> </div>
</GLTable> </GLTable>
</div> </div>
<div class="d2-container-content"> <div class="d2-container-content">
<p class="title">盘存确认单</p> <p class="title">盘存确认单</p>
<GLTable ref="recordTable2" <GLTable ref="recordTable2" :tableData="chooseDataList" :tableParams="tableParams2" :hasPage="false">
:tableData="chooseDataList" <template slot="profitAndLoss" slot-scope="scope">
:tableParams="tableParams2"
:hasPage="false">
<template slot="profitAndLoss"
slot-scope="scope">
<span v-if="scope.scope.profitAndLoss || scope.scope.profitAndLoss == 0"> <span v-if="scope.scope.profitAndLoss || scope.scope.profitAndLoss == 0">
<span v-if="parseFloat(scope.scope.profitAndLoss) > 0" <span v-if="parseFloat(scope.scope.profitAndLoss) > 0" style="color: blue">{{ '+' +
style="color: blue">{{ '+' +
parseFloat(scope.scope.profitAndLoss).toFixed(2) + (membraneTypeList.includes(scope.scope.goodsType) ? '米' : parseFloat(scope.scope.profitAndLoss).toFixed(2) + (membraneTypeList.includes(scope.scope.goodsType) ? '米' :
'件') }}</span> '件') }}</span>
<span v-else-if="parseFloat(scope.scope.profitAndLoss) < 0" <span v-else-if="parseFloat(scope.scope.profitAndLoss) < 0" style="color: red">{{
style="color: red">{{
parseFloat(scope.scope.profitAndLoss).toFixed(2) + (membraneTypeList.includes(scope.scope.goodsType) ? '米' : parseFloat(scope.scope.profitAndLoss).toFixed(2) + (membraneTypeList.includes(scope.scope.goodsType) ? '米' :
'件') }}</span> '件') }}</span>
<span v-else>{{ parseFloat(scope.scope.profitAndLoss).toFixed(2) + <span v-else>{{ parseFloat(scope.scope.profitAndLoss).toFixed(2) +
...@@ -92,30 +58,22 @@ ...@@ -92,30 +58,22 @@
</span> </span>
<span v-else>-</span> <span v-else>-</span>
</template> </template>
<div slot="auth-button" <div slot="auth-button" slot-scope="scope">
slot-scope="scope"> <el-button type="text" @click="cancelInventory(scope.row, scope.$index)">取消</el-button>
<el-button type="text"
@click="cancelInventory(scope.row, scope.$index)">取消</el-button>
</div> </div>
</GLTable> </GLTable>
</div> </div>
<glsx-form ref="addInventoryForm" <glsx-form ref="addInventoryForm" :origin-data="editData" :form-list="editForm" form-ref="inveFormRef"
:origin-data="editData" @handleAddConfirm="handleAddConfirm" @handleClose="handleAddClose"></glsx-form>
:form-list="editForm"
form-ref="inveFormRef"
@handleAddConfirm="handleAddConfirm"
@handleClose="handleAddClose"></glsx-form>
<!-- 盘点 --> <!-- 盘点 -->
<inventory-num-dialog :inventory-num-visible="inventoryNumVisible" <inventory-num-dialog :inventory-num-visible="inventoryNumVisible" :record-info="recordInfo"
:record-info="recordInfo" v-if="inventoryNumVisible" @dialogClose="dialogClose" />
v-if="inventoryNumVisible"
@dialogClose="dialogClose" />
</div> </div>
</template> </template>
<script> <script>
import inventoryNumDialog from './inventoryNumDialog' import inventoryNumDialog from './inventoryNumDialog'
import { membraneTypeList } from '@/utils/constants.js' // import { membraneTypeList } from '@/utils/constants.js'
export default { export default {
name: 'InventoryList', name: 'InventoryList',
components: { components: {
...@@ -123,7 +81,7 @@ export default { ...@@ -123,7 +81,7 @@ export default {
}, },
data() { data() {
return { return {
membraneTypeList: membraneTypeList, membraneTypeList: this.$membraneTypeList,
searchForm: { searchForm: {
upgradeGoodsNameOrSeries: '' upgradeGoodsNameOrSeries: ''
}, },
...@@ -159,7 +117,7 @@ export default { ...@@ -159,7 +117,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) ? '米' : '件') : '-'
} }
}, },
{ {
...@@ -169,6 +127,10 @@ export default { ...@@ -169,6 +127,10 @@ export default {
{ {
label: '所属门店', label: '所属门店',
prop: 'merchantName' prop: 'merchantName'
},
{
label: '膜卷号',
prop: 'filmRollNo'
} }
] ]
}, },
...@@ -198,14 +160,14 @@ export default { ...@@ -198,14 +160,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) ? '米' : '件') : '-'
} }
}, },
{ {
...@@ -220,6 +182,10 @@ export default { ...@@ -220,6 +182,10 @@ export default {
{ {
label: '所属门店', label: '所属门店',
prop: 'merchantName' prop: 'merchantName'
},
{
label: '膜卷号',
prop: 'filmRollNo'
} }
] ]
}, },
...@@ -274,21 +240,23 @@ export default { ...@@ -274,21 +240,23 @@ export default {
} }
] ]
}, },
yqMerchantIdList: [],//盘点仓库 yqMerchantIdList: [], //盘点仓库
merchantList: [],//盘点门店 merchantList: [], //盘点门店
oldyqMerchantId: '',//之前选择的仓库 oldyqMerchantId: '', //之前选择的仓库
oldMerchantId: '',//之前选择的门店 oldMerchantId: '' //之前选择的门店
} }
}, },
watch: { watch: {
'editCheckForm.yqMerchantId'(val, oldval) { 'editCheckForm.yqMerchantId'(val, oldval) {
console.log(val, oldval, "监听yqMerchantId"); console.log(val, oldval, '监听yqMerchantId')
// this.getListApi = this.$apis.stockManage.stockRemainPage // this.getListApi = this.$apis.stockManage.stockRemainPage
if (this.yqMerchantIdList.length == 1) {//当只有一个选项时不弹提示框 if (this.yqMerchantIdList.length == 1) {
//当只有一个选项时不弹提示框
// this.$refs.recordTable.refreshTable() // this.$refs.recordTable.refreshTable()
} else { } else {
if (val != this.oldyqMerchantId) {//与之前的选项不一样 if (val != this.oldyqMerchantId) {
//与之前的选项不一样
this.editCheckForm.merchantId = '' this.editCheckForm.merchantId = ''
this.switchData(val, oldval, 'yqMerchant') this.switchData(val, oldval, 'yqMerchant')
} }
...@@ -296,12 +264,13 @@ export default { ...@@ -296,12 +264,13 @@ export default {
}, },
'editCheckForm.merchantId'(val, oldval2) { 'editCheckForm.merchantId'(val, oldval2) {
console.log(val, oldval2, "监听merchantId"); console.log(val, oldval2, '监听merchantId')
this.getListApi = this.$apis.stockManage.stockRemainPage this.getListApi = this.$apis.stockManage.stockRemainPage
if (this.merchantList.length == 1) { if (this.merchantList.length == 1) {
this.$refs.recordTable.refreshTable() this.$refs.recordTable.refreshTable()
} else { } else {
if (val != this.oldMerchantId) {//与之前的选项不一样 if (val != this.oldMerchantId) {
//与之前的选项不一样
this.switchData(val, oldval2, 'merchant') this.switchData(val, oldval2, 'merchant')
} }
} }
...@@ -320,7 +289,6 @@ export default { ...@@ -320,7 +289,6 @@ export default {
}, },
methods: { methods: {
changeYqMerchant(merchantId) { changeYqMerchant(merchantId) {
// this.switchData(merchantId, 'yqMerchant') // this.switchData(merchantId, 'yqMerchant')
}, },
...@@ -331,9 +299,11 @@ export default { ...@@ -331,9 +299,11 @@ export default {
// 获取仓库门店 // 获取仓库门店
getServicemerchantrefList(merchantId) { getServicemerchantrefList(merchantId) {
this.$apis.stockManage.getServicemerchantrefList({ this.$apis.stockManage
.getServicemerchantrefList({
yqMerchantId: merchantId yqMerchantId: merchantId
}).then(res => { })
.then(res => {
this.merchantList = res || [] this.merchantList = res || []
//总店 //总店
let _headOffice = this.yqMerchantIdList.find(item => item.merchantNo === merchantId) let _headOffice = this.yqMerchantIdList.find(item => item.merchantNo === merchantId)
...@@ -347,7 +317,8 @@ export default { ...@@ -347,7 +317,8 @@ export default {
}, },
switchData(val, oldval, type) { switchData(val, oldval, type) {
if (this.chooseDataList && this.chooseDataList.length > 0) {//当盘存确认单有数据时提示 if (this.chooseDataList && this.chooseDataList.length > 0) {
//当盘存确认单有数据时提示
this.$confirm('切换盘点仓库和盘点门店,自动重置已盘点内容;是否确定切换?', '提示', { this.$confirm('切换盘点仓库和盘点门店,自动重置已盘点内容;是否确定切换?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
...@@ -356,7 +327,8 @@ export default { ...@@ -356,7 +327,8 @@ export default {
.then(() => { .then(() => {
if (type == 'yqMerchant') { if (type == 'yqMerchant') {
this.getServicemerchantrefList(val) this.getServicemerchantrefList(val)
} else {//选择门店以后才更新盘存数据 } else {
//选择门店以后才更新盘存数据
this.$refs.recordTable.refreshTable() this.$refs.recordTable.refreshTable()
} }
//清空盘存确认单数据 //清空盘存确认单数据
...@@ -375,7 +347,8 @@ export default { ...@@ -375,7 +347,8 @@ export default {
} else { } else {
if (type == 'yqMerchant') { if (type == 'yqMerchant') {
this.getServicemerchantrefList(val) this.getServicemerchantrefList(val)
} else {//选择门店以后才更新盘存数据 } else {
//选择门店以后才更新盘存数据
this.$refs.recordTable.refreshTable() this.$refs.recordTable.refreshTable()
} }
} }
...@@ -407,7 +380,7 @@ export default { ...@@ -407,7 +380,7 @@ export default {
}, },
handleSearch() { handleSearch() {
console.log(this.searchFormSearch); console.log(this.searchFormSearch)
if (this.searchFormSearch.yqMerchantId && this.searchFormSearch.merchantId) { if (this.searchFormSearch.yqMerchantId && this.searchFormSearch.merchantId) {
this.getListApi = this.$apis.stockManage.stockRemainPage this.getListApi = this.$apis.stockManage.stockRemainPage
...@@ -415,7 +388,7 @@ export default { ...@@ -415,7 +388,7 @@ export default {
} else { } else {
this.$message({ this.$message({
type: 'error', type: 'error',
message: "请选择仓库和门店再查询数据" message: '请选择仓库和门店再查询数据'
}) })
} }
}, },
...@@ -438,7 +411,7 @@ export default { ...@@ -438,7 +411,7 @@ export default {
dialogClose(chooseData) { dialogClose(chooseData) {
this.inventoryNumVisible = !this.inventoryNumVisible this.inventoryNumVisible = !this.inventoryNumVisible
console.log('chooseData', chooseData); console.log('chooseData', chooseData)
if (chooseData) { if (chooseData) {
chooseData = this.fieldConvert(chooseData) chooseData = this.fieldConvert(chooseData)
this.chooseDataList.push(chooseData) this.chooseDataList.push(chooseData)
...@@ -531,5 +504,4 @@ export default { ...@@ -531,5 +504,4 @@ export default {
display: inline-block; display: inline-block;
box-sizing: border-box; box-sizing: border-box;
margin-right: 10px; margin-right: 10px;
} }</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="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,9 +100,11 @@ export default { ...@@ -105,9 +100,11 @@ 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
.getServicemerchantrefList({
yqMerchantId: e yqMerchantId: e
}).then(res => { })
.then(res => {
this.merchantList = res || [] this.merchantList = res || []
this.merchantList.push(_headOffice) // 园区店可选择自己 this.merchantList.push(_headOffice) // 园区店可选择自己
}) })
...@@ -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,9 +329,11 @@ export default { ...@@ -313,9 +329,11 @@ export default {
// 获取仓库门店 // 获取仓库门店
getServicemerchantrefList(merchantId) { getServicemerchantrefList(merchantId) {
this.$apis.stockManage.getServicemerchantrefList({ this.$apis.stockManage
.getServicemerchantrefList({
yqMerchantId: merchantId yqMerchantId: merchantId
}).then(res => { })
.then(res => {
this.baseData.merchantIdList = res || [] this.baseData.merchantIdList = res || []
//总店 //总店
let _headOffice = this.baseData.yqMerchantList.find(item => item.merchantNo === merchantId) let _headOffice = this.baseData.yqMerchantList.find(item => item.merchantNo === merchantId)
...@@ -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!