Browse Source

1

fix_bug_pro20231227
zhangsiyu 2 years ago
parent
commit
a258fe5074
  1. 298
      src/views/basicdata/warehouse/goodsShelf/basicdataGoodsShelfView.vue

298
src/views/basicdata/warehouse/goodsShelf/basicdataGoodsShelfView.vue

@ -33,15 +33,19 @@
<div class="tips">
<div>
总货位:
<span class="def">1682</span>
<span class="def">{{ countnumber.cargoNub }}</span>
</div>
<div>
占用货位:
<span class="red">1480</span>
<span class="red">{{ countnumber.employNub }}</span>
</div>
<div>
未用货位:
<span class="green">202</span>
<span class="green">{{ countnumber.unusedNub }}</span>
</div>
<div>
禁用货位:
<span class="red">{{ countnumber.disableNub }}</span>
</div>
</div>
</div>
@ -125,25 +129,27 @@
<div>
<el-select filterable v-model="checkindex" class="" placeholder="请选择仓库">
<el-option
v-for="item in arrlist"
v-for="(item, index) in arrlist"
:key="item.id"
:label="item.name"
:value="item.name"
:value="index"
/>
</el-select>
<div class="inptx">
<el-input v-model="checkregionselect" placeholder="请输入服务号" />
<div>服务号</div>
<el-input style="flex: 1" v-model="inputtxts" placeholder="请输入服务号" />
</div>
</div>
<div>
<el-button type="primary">搜索</el-button>
<el-button type="primary" @click="searchbuts">搜索</el-button>
<el-button type="primary">重置</el-button>
<el-button type="primary">批量上架</el-button>
</div>
</div>
<div class="tabberbox">
<tablecmt
:columnList="columnList"
:tableData="data"
:tableData="tablistarr"
:loading="loading"
@inputTxt="inputsc"
@timeCheck="timesc"
@ -157,14 +163,29 @@
>
</template>
</tablecmt>
<div class="avue-crud__pagination" style="width: 100%">
<!-- 分页模块 -->
<el-pagination
align="right"
background
@size-change="sizeChange"
@current-change="currentChange"
:current-page="currentPage"
:page-sizes="[10, 20, 30, 40, 50, 100]"
:page-size="pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="total"
>
</el-pagination>
</div>
</div>
</div>
<template #footer>
<!-- <template #footer>
<span class="buts">
<el-button type="primary">取消</el-button>
<el-button type="primary">确认</el-button>
</span>
</template>
</template> -->
</el-dialog>
</template>
<script setup>
@ -172,76 +193,15 @@ import {
getVisualization,
getstoreCargo,
updategood,
geturl,
posturl,
Alloclocationsnub,
} from '@/api/basicdata/basicdataGoodsShelfView';
import { useMessage } from 'element-plus';
import { reactive, toRefs, onMounted } from 'vue';
const message = useMessage();
import { reactive, toRefs, onMounted, getCurrentInstance } from 'vue';
const { proxy } = getCurrentInstance();
let details = reactive({
columnList: [
{
prop: '',
label: '序号',
type: 0,
values: '',
width: 55,
checkarr: [],
fixed: true,
},
{
prop: 'serviceNumber',
label: '服务号',
type: 2,
values: '',
width: '250',
checkarr: [],
fixed: true,
sortable: true,
head: false,
},
{
prop: 'name',
label: '顾客姓名',
type: 2,
values: '',
width: '450',
checkarr: [],
fixed: true,
sortable: true,
head: false,
},
{
prop: 'phone',
label: '顾客电话',
type: 2,
values: '',
width: '260',
checkarr: [],
fixed: true,
sortable: true,
head: false,
},
{
prop: 'createtime',
label: '创建时间',
type: 4,
values: '',
width: '260',
checkarr: [],
fixed: true,
sortable: true,
head: false,
},
{
prop: '',
label: '操作',
type: 6,
values: '',
width: '190',
checkarr: [],
fixed: 'right',
hide: true,
},
],
columnList: [],
tablistarr: [],
arrlist: [],
checkselect: 0,
checksele: 0,
@ -256,6 +216,9 @@ let details = reactive({
isshowupt: false,
checkite: {},
loading: false,
currentPage:1,
pageSize:10,
total:'',
data: [
{
serviceNumber: '104202103180256',
@ -270,11 +233,20 @@ let details = reactive({
createtime: '2021-03-18 11:41:31',
},
],
countnumber: {},
inputtxts: '',
checkselectchangearr:[],
});
onMounted(() => {
details.contenbxsty['--length'] = details.contenarr[0]?.length || 0;
initconfig();
initnumber();
});
async function initnumber() {
let res = await Alloclocationsnub();
console.log(res.data.data);
details.countnumber = res.data.data;
}
async function initconfig() {
let res = await getstoreCargo();
details.arrlist = res.data.data;
@ -290,6 +262,46 @@ async function initconfig() {
function initpage() {
// let warehousearr=
}
function currentChange(currentPage) {
details.currentPage=currentPage
searchbuts()
}
function sizeChange(pageSize) {
details.pageSize=pageSize
searchbuts()
}
async function searchbuts() {
let url = '';
let data = null;
// console.log(details.arrlist[details.checkindex].id);
// return
switch (details.isshowupt) {
case 1:
url = 'servicenub';
data = {
warehouseId: details.arrlist[details.checkindex]?.id || '',
serviceNumber: details.inputtxts,
current:details.currentPage,
size:details.pageSize
};
break;
default:
break;
}
let response = await geturl(url, data);
if (response.data.code == 200) {
console.log(response.data);
details.tablistarr = response.data.data.records;
details.total=response.data.data.total
} else {
proxy.$message({
type: 'error',
message: response.data.msg,
});
}
}
async function upgood() {
let data = {
id: details.checkite.id,
@ -297,13 +309,14 @@ async function upgood() {
};
let res = await updategood(data);
if (res.data.code == 200) {
message({
proxy.$message({
type: 'success',
message: '操作成功!',
});
details.isshowcon = false;
checkshelves();
} else {
message({
proxy.$message({
type: 'error',
message: res.msg,
});
@ -361,9 +374,118 @@ async function checkshelves() {
const showupt = value => {
console.log('112312');
details.isshowupt = value;
switch (details.isshowupt) {
case 1:
details.columnList = [
{
prop: '',
label: '序号',
type: 0,
values: '',
width: 55,
checkarr: [],
fixed: true,
},
{
prop: 'serviceNumber',
label: '服务号',
type: 2,
values: '',
width: '240',
checkarr: [],
fixed: true,
sortable: true,
head: false,
},
{
prop: 'orderCode',
label: '订单自编号',
type: 2,
values: '',
width: '200',
checkarr: [],
fixed: false,
sortable: true,
head: false,
},
{
prop: 'customerName',
label: '顾客名字',
type: 2,
values: '',
width: '200',
checkarr: [],
fixed: false,
sortable: true,
head: false,
},
{
prop: 'customerTelephone',
label: '顾客电话',
type: 2,
values: '',
width: '260',
checkarr: [],
fixed: false,
sortable: true,
head: false,
},
{
prop: 'customerAddress',
label: '顾客电话',
type: 2,
values: '',
width: '260',
checkarr: [],
fixed: false,
sortable: true,
head: false,
},
{
prop: '',
label: '操作',
type: 6,
values: '',
width: '190',
checkarr: [],
fixed: 'right',
hide: true,
},
];
break;
default:
break;
}
searchbuts();
};
const addhuoj = scope => {
console.log(scope);
const addhuoj = async scope => {
console.log(scope.row);
let data={
allocationId:details.checkite.id
}
let url=''
switch (details.isshowupt) {
case 1:
url='upService'
data.upShelfOrderList=[scope.row]
break;
default:
break;
}
let response = await posturl(url, data);
if (response.data.code == 200) {
console.log(response.data);
details.tablistarr = response.data.data.records;
details.total=response.data.data.total
} else {
proxy.$message({
type: 'error',
message: response.data.msg,
});
}
};
const btnsc = scope => {
console.log(scope);
@ -379,6 +501,7 @@ const selectsc = scope => {
};
const selectionChange = scope => {
console.log(scope);
details.checkselectchangearr=scope
};
const checkitem = ite => {
switch (Number(ite.allocationStatus)) {
@ -395,6 +518,11 @@ const checkitem = ite => {
}
};
const {
total,
pageSize,
currentPage,
tablistarr,
inputtxts,
index,
checkindex,
data,
@ -409,6 +537,7 @@ const {
checkregionselect,
contenbxsty,
contenarr,
countnumber,
} = toRefs(details);
</script>
<style lang="scss">
@ -430,6 +559,11 @@ const {
.inptx {
width: 260px;
margin-left: 20px;
display: flex;
align-items: center;
> div {
width: 60px;
}
}
}
> div:nth-of-type(2) {

Loading…
Cancel
Save