Commit c698185f by 前端

版本功能代码提交

1 parent 7ea4a4f1
...@@ -14,8 +14,8 @@ ...@@ -14,8 +14,8 @@
"dayjs": "^1.10.7", "dayjs": "^1.10.7",
"el-tree-transfer": "^2.2.6", "el-tree-transfer": "^2.2.6",
"element-ui": "^2.4.5", "element-ui": "^2.4.5",
"glsx-common": "^2.0.9", "glsx-common": "^2.10.1",
"glsx-components": "^1.2.5", "glsx-components": "^1.5.4",
"vue": "^2.6.10", "vue": "^2.6.10",
"vue-router": "^3.1.3", "vue-router": "^3.1.3",
"vuex": "^3.1.2" "vuex": "^3.1.2"
......
...@@ -334,4 +334,28 @@ export function exportStatementOfAccount(params) { ...@@ -334,4 +334,28 @@ export function exportStatementOfAccount(params) {
sign: true sign: true
}) })
} }
export default { inventoryWarningList, exportaInventExcel, exportaAllocateExcel, exportCheckExcel, exportReduceExcel, exportMerchantExcel, exportExcel, saveStockAllocate, stockAllocateDetailPage, stockAllocatePage, yqRelatedList, saveStockCheck, stockRemainPage, stockCheckDetailPage, stockCheckPage, getMerchantGoodsStockCount, getMerchantGoodsStockReduceRecord, getReportByGoods, getyqMerchantList, getGoodsWarehousingCount, getGoodsWarehousingList, getMerchantGoodsStockMonthCount, getMerchantGoodsStockMonthReport, merchantShopGoodsStockPage, getServicemerchantrefList, checkShipper, exportStatementOfAccount }
// 技师查询
export function getRoleTechnician(params) {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `dj.api.smartcarlife.roleTechnician.list`
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
// 出库记录关联技师
export function technicianUpdate(params) {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `dj.api.smartcarlife.MerchantGoodsStockReduceRecord.technician.update`
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
export default { inventoryWarningList, exportaInventExcel, exportaAllocateExcel, exportCheckExcel, exportReduceExcel, exportMerchantExcel, exportExcel, saveStockAllocate, stockAllocateDetailPage, stockAllocatePage, yqRelatedList, saveStockCheck, stockRemainPage, stockCheckDetailPage, stockCheckPage, getMerchantGoodsStockCount, getMerchantGoodsStockReduceRecord, getReportByGoods, getyqMerchantList, getGoodsWarehousingCount, getGoodsWarehousingList, getMerchantGoodsStockMonthCount, getMerchantGoodsStockMonthReport, merchantShopGoodsStockPage, getServicemerchantrefList, checkShipper, exportStatementOfAccount, getRoleTechnician, technicianUpdate }
<template>
<div>
<GLDialog bigTitle="关联技师"
:visible.sync="dialogShow"
class="detail-content-warn"
width="700px"
mode="big"
:close-on-click-modal="false"
:before-close="handleClose"
@onOk="handleAddConfirm"
@onCancel="dialogShow = false">
<div v-loading="loading">
<div class="form_div">
<div class="tipsDiv">
<div class="tipsText">
<img src="../images/icon-warning.png"
class="imgCla" />
首次登记出库将标记为出库时间,若产生物料多退少补请更正实际出库数量
</div>
</div>
<el-form label-width="160px"
:model="infoForm"
ref="editRef"
:rules="formRules"
:inline="true">
<el-form-item label="选择领料技师:"
prop="technician">
<el-select v-model="infoForm.technician"
filterable
placeholder="请选择"
class="default-width">
<el-option v-for="(item, key) in baseData.technicianList"
:key="key"
:label="item.staffName"
:value="item.staffPhone"></el-option>
</el-select>
</el-form-item>
<el-form-item label="出库商品:">
{{ paramsObj.upgradeGoodsName }}
</el-form-item>
<el-form-item label="实际出库数量:"
prop="reduceStockNum">
<el-input-number v-model="infoForm.reduceStockNum"
placeholder="输入数值"
:precision="2"
:step="0.01"
:min="0"
:max="999999.99"></el-input-number>
<span class="unit">{{ infoForm.unit }}</span>
</el-form-item>
<el-form-item label="备注:">
<el-input v-model="infoForm.remark"
type="textarea"
maxlength="50"
placeholder="请输入备注"
show-word-limit
:rows="4"
class="default-width" />
</el-form-item>
</el-form>
</div>
</div>
</GLDialog>
</div>
</template>
<script>
import { baseConfig } from '@/main'
export default {
name: 'CorrelationDialog',
components: {},
props: {
visible: {
type: Boolean,
default: false
},
paramsObj: {
type: Object,
default: null
}
},
computed: {
dialogShow: {
get() {
return this.visible
},
set(val) {
this.$emit('dialogClose', { flag: val })
}
}
},
mounted() {
this.getData()
this.getRoleTechnicianList()
},
data() {
return {
sessionInfo: this.$globalState.session,
dialogConfig: {
config: {
title: '关联技师',
width: '600px'
}
},
infoForm: {
technician: '',
reduceStockNum: '',
remark: '',
unit: ''
},
editChildRef: 'editChildRef',
formRules: {
technician: [{ required: true, message: '请选择领料技师', trigger: 'change' }],
reduceStockNum: [{ required: true, message: '请输入0~999999的数字,支持小数2位', trigger: 'change' }]
},
loading: true,
baseData: {
technicianList: []
}
}
},
methods: {
getData() {
this.infoForm.reduceStockNum = this.paramsObj.reduceStockNum
this.infoForm.remark = this.paramsObj.remark
this.infoForm.unit = this.$membraneTypeList.includes(this.paramsObj.goodsType) ? '米' : '件'
},
// 查询领料技师
getRoleTechnicianList() {
const params = {}
params.yqMerchantId = this.sessionInfo.merchantId
this.$apis.stockManage.getRoleTechnician(params).then(res => {
this.baseData.technicianList = res
this.loading = false
if (this.paramsObj.technicianPhone) {
this.infoForm.technician = this.paramsObj.technicianPhone
}
})
},
handleAddConfirm() {
this.$refs.editRef.validate(valid => {
if (valid) {
var params = this.$common.utils.deepClone(this.infoForm)
params.id = this.paramsObj.id
params.technicianPhone = params.technician
params.technicianName = this.baseData.technicianList.find(item => item.staffPhone === params.technician)?.staffName
this.$apis.stockManage.technicianUpdate(params).then(res => {
this.$notify({
type: 'success',
title: '操作成功'
})
this.dialogShow = true
})
}
})
}
}
}
</script>
<style lang="scss" scoped>
.detail-content-warn {
.div-title {
width: 1040px;
height: 30px;
border-bottom: 1px solid #e5e5e5;
font-size: 16px;
font-weight: 600;
color: #333333;
margin: 10px 0 20px 0;
}
.el-icon-circle-close {
color: #ffffff;
}
.form_div {
color: #333333;
.tipsDiv {
display: flex;
justify-content: center; /* 水平居中 */
align-items: center; /* 垂直居中 */
// flex-direction: column;
background: #f47f131a;
height: 28px;
margin-bottom: 25px;
.tipsText {
display: flex;
align-items: center; /* 垂直居中 */
// font-weight: 500;
font-size: 13px;
color: #ff8d1a;
}
.imgCla {
margin-right: 8px;
width: 20px;
height: 20px;
}
}
.el-form-item__content {
display: inline-block;
width: calc(100% - 150px);
line-height: 24px;
}
.el-form-item__label {
padding: 0;
line-height: 24px;
}
.el-form-item {
width: 100%;
margin-bottom: 20px;
}
.edit-sub-block {
// padding: 0 10px;
.detail-txt {
display: inline-block;
width: 200px;
vertical-align: bottom;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
::v-deep .el-form-item__content {
max-width: calc(100% - 110px);
word-break: break-all;
}
.itemDiv {
display: flex;
.halfItem {
width: 33%;
}
}
.onLineItem {
::v-deep .el-form-item__content {
max-width: 80%;
}
}
}
.edit-sub-block-two {
.el-form-item__label {
padding: 0;
}
.el-form-item {
// width: 300px;
margin: 0px;
}
}
.busi-info {
box-sizing: border-box;
width: 890px;
border-radius: 4px;
border: 1px solid #e5e5e5;
padding: 6px 0;
color: #333333;
font-size: 14px;
margin-bottom: 14px;
.info-row {
height: 20px;
line-height: 20px;
margin-bottom: 16px;
}
.info-row:last-child {
margin-bottom: 0;
}
.info-item {
display: inline-block;
width: 50%;
height: 20px;
line-height: 20px;
margin-bottom: 6px;
.item-label {
display: inline-block;
width: 150px;
color: #666666;
text-align: right;
}
}
}
}
.receiptBtn {
margin-left: 20px;
}
.imgCon {
text-align: center;
margin-bottom: 50px;
}
.imgSize {
width: 1040px;
}
.default-width {
width: 350px;
}
.unit {
padding-left: 10px;
}
}
</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" <GLCombiForm ref="showSearch"
@handleRest="handleReset"></GLCombiForm> :rowNumber="1"
:formObj="searchForm"
:formData="showFormData"
@handleOk="handleSearch"
@handleRest="handleReset"></GLCombiForm>
<div class="table-header"> <div class="table-header">
<div> <div>
合计:出库数量 合计:出库数量
...@@ -10,14 +14,32 @@ ...@@ -10,14 +14,32 @@
,出库金额 ,出库金额
<span class="txt-blue">¥{{ totalObj.totalReduceStockMoney || '0' }}</span> <span class="txt-blue">¥{{ totalObj.totalReduceStockMoney || '0' }}</span>
</div> </div>
<el-button size="small" @click="exportExcel">导出</el-button> <el-button size="small"
@click="exportExcel">导出</el-button>
</div> </div>
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<GLTable ref="outboundRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" <GLTable ref="outboundRef"
:tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" :getListApi="getListApi"
@setTableFinishFun="setTableFinishFun"></GLTable> :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="correlationTechnician(scope.scope)">关联技师</el-button>
</div>
</GLTable>
<!-- 表格区域 end --> <!-- 表格区域 end -->
<!-- 关联技师 -->
<correlationDialog :visible.sync="corrVisible"
v-if="corrVisible"
:params-obj="recordInfo"
@dialogClose="closeCorrDialog" />
</div> </div>
</div> </div>
</template> </template>
...@@ -25,12 +47,15 @@ ...@@ -25,12 +47,15 @@
<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 correlationDialog from './components/correlationDialog'
export default { export default {
name: 'warehousing', name: 'warehousing',
components: {
correlationDialog
},
data() { data() {
return { return {
// membraneTypeList: membraneTypeList, sessionInfo: this.$globalState.session,
size: 'small', size: 'small',
totalObj: {}, totalObj: {},
url: url, url: url,
...@@ -44,7 +69,8 @@ export default { ...@@ -44,7 +69,8 @@ export default {
businessCode: '', businessCode: '',
goodsSeries: '', goodsSeries: '',
productCode: '', productCode: '',
upgradeFlag: '' upgradeFlag: '',
technicianPhone: ''
}, },
tableSearchForm: {}, tableSearchForm: {},
paramsObj: {}, paramsObj: {},
...@@ -149,13 +175,22 @@ export default { ...@@ -149,13 +175,22 @@ export default {
type: 'input', type: 'input',
maxlength: '50', maxlength: '50',
isClear: true isClear: true
},
{
label: '领料技师',
name: 'technicianPhone',
type: 'select',
optionList: [],
optionId: 'staffPhone',
optionLabel: 'staffName',
optionsName: 'technicianList'
} }
], ],
// 表格 // 表格
getListApi: this.$apis.stockManage.getMerchantGoodsStockReduceRecord, getListApi: this.$apis.stockManage.getMerchantGoodsStockReduceRecord,
tableParams: { tableParams: {
listName: 'list', listName: 'list',
tableOption: false, tableOption: true,
tableColumns: [ tableColumns: [
{ {
label: '出库时间', label: '出库时间',
...@@ -186,7 +221,11 @@ export default { ...@@ -186,7 +221,11 @@ export default {
prop: 'goodsTypeName', prop: 'goodsTypeName',
minWidth: 120 minWidth: 120
}, },
{
label: '领料技师',
prop: 'technicianName',
width: '100px'
},
{ {
label: '出库数量', label: '出库数量',
prop: 'reduceStockNum', prop: 'reduceStockNum',
...@@ -248,6 +287,19 @@ export default { ...@@ -248,6 +287,19 @@ export default {
formatter: cellValue => { formatter: cellValue => {
return cellValue.storeUsage || '-' return cellValue.storeUsage || '-'
} }
},
{
label: '操作人',
prop: 'updatedBy',
width: '100px'
},
{
label: '最后操作时间',
prop: 'updatedDate',
width: '150px',
formatter: cellValue => {
return dayjs(cellValue.updatedDate).format('YYYY-MM-DD HH:mm:ss')
}
} }
] ]
}, },
...@@ -280,8 +332,10 @@ export default { ...@@ -280,8 +332,10 @@ export default {
], ],
productTypeList: [], productTypeList: [],
yqMerchantList: [], yqMerchantList: [],
merchantIdList: [] merchantIdList: [],
} technicianList: []
},
corrVisible: false
} }
}, },
...@@ -297,6 +351,7 @@ export default { ...@@ -297,6 +351,7 @@ export default {
this.getOptionsList('showFormData') this.getOptionsList('showFormData')
}) })
this.getMerchantGoodsStockCount() this.getMerchantGoodsStockCount()
this.getRoleTechnicianList()
}, },
methods: { methods: {
...@@ -388,7 +443,8 @@ export default { ...@@ -388,7 +443,8 @@ export default {
businessCode: '', businessCode: '',
goodsSeries: '', goodsSeries: '',
productCode: '', productCode: '',
upgradeFlag: '' upgradeFlag: '',
technicianPhone: ''
} }
this.showFormData[this.findFormIdx('merchantId')].optionList = [] this.showFormData[this.findFormIdx('merchantId')].optionList = []
this.handleSearch() this.handleSearch()
...@@ -396,6 +452,30 @@ export default { ...@@ -396,6 +452,30 @@ export default {
findFormIdx(name) { findFormIdx(name) {
return this.showFormData.findIndex(item => item.name === name) return this.showFormData.findIndex(item => item.name === name)
},
// 查询领料技师
getRoleTechnicianList() {
const params = {}
params.yqMerchantId = this.sessionInfo.merchantId
this.$apis.stockManage.getRoleTechnician(params).then(res => {
this.baseData.technicianList = res
this.getOptionsList('showFormData')
})
},
// 关联技师
correlationTechnician(row) {
this.recordInfo = row
this.corrVisible = !this.corrVisible
},
closeCorrDialog(obj) {
console.log('obj', obj)
this.corrVisible = !this.corrVisible
if (obj.flag) {
this.$refs.outboundRef.refreshTable()
}
} }
} }
} }
...@@ -419,4 +499,5 @@ export default { ...@@ -419,4 +499,5 @@ export default {
.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!