qb 1 year ago
parent
commit
170e884c10
  1. 15
      src/components/tablecmt/tablecmt.vue
  2. 40
      src/utils/util.js
  3. 54
      src/views/basicdata/brand/basicZonePriceFrom.vue
  4. 448
      src/views/basicdata/warehouse/warehouse/basicdataWarehouseTemp.vue
  5. 33
      src/views/distribution/reservation/atlas.vue
  6. 14
      src/views/distribution/reservation/reservation.vue
  7. 27
      src/views/distribution/turndelivery/deliveryDiscuss.vue
  8. 49
      src/views/warehouse/warehouseStock/warehouseStock.vue
  9. 1
      vite.config.js

15
src/components/tablecmt/tablecmt.vue

@ -82,6 +82,18 @@
format="YYYY/MM/DD HH:mm:ss"
@change="timechange($event, column)"
/>
<el-date-picker
v-model="column.values"
v-if="column.type == 6"
type="data"
clearable
style="width: auto"
value-format="YYYY-MM-DD"
format="YYYY/MM/DD"
:placeholder="`请选择${column.label}`"
@change="timechange($event, column)"
/>
</template>
<template #default="scope">
@ -491,6 +503,9 @@ function selectchange(value, column: TableColumnType) {
function timechange(value, column: TableColumnType) {
emit('timeCheck', value, column);
}
function timechangeKey(value,column:TableColumnType){
emit('timeCheck', column.values, column);
}
const handleSelectionChange = (param: TableDataType[]) => {
selectarr.value = param;
try {

40
src/utils/util.js

@ -639,3 +639,43 @@ export function debounce(func, delay) {
export const removeZeroWidth = str => {
return str.replace(/[\u200B-\u200D\uFEFF]/g, '');
};
/**判断对象除了指定值为真其余值是否为假**/
// 测试数据
/*let data1 = {
operatorTime: '123123'
};
let targetParam1 = 'operatorTime';
console.log(checkParams(data1, targetParam1)); // 输出 true
let data2 = {
serviceNumber: '',
operatorTime: ''
};
let targetParam2 = 'operatorTime';
console.log(checkParams(data2, targetParam2)); // 输出 false
let data3 = {
serviceNumber: '',
operatorTime: '456456'
};
let targetParam3 = 'operatorTime';
console.log(checkParams(data3, targetParam3)); // 输出 true
*/
/**
*
* @param {Object} data
* @param {String} targetParam
* @returns
*/
export function checkParams(data, targetParam) {
const keys = Object.keys(data);
if (keys.includes(targetParam) && keys.every(key => key === targetParam || data[key] === "")) {
return true; // 指定参数存在且没有其他参数或其他参数值为空时返回 true
} else {
return false; // 其他情况返回 false
}
};

54
src/views/basicdata/brand/basicZonePriceFrom.vue

@ -15,7 +15,7 @@
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="始发仓" prop="goalGranary">
<el-form-item label="始发仓" prop="beginGranary">
<!-- <el-input v-model="form.goalGranary" placeholder="请输入末端仓"/>-->
<el-select style="width: 100%"
v-model="form.beginGranary"
@ -23,7 +23,7 @@
remote
reserve-keyword
placeholder="请输入始发仓"
:remote-method="remoteMethodBin"
:remote-method="FnDeparture"
:loading="loading"
>
<el-option
@ -225,8 +225,11 @@ export default {
{ required: true, message: '请选择时间段费用', trigger: 'blur' }
],
goalGranary: [
{ required: true, message: '请选择末端仓', trigger: 'blur' }
{ required: true, message: '请选择目的仓', trigger: 'blur' }
],
beginGranary:[
{ required: true, message: '请选择始发仓', trigger: 'blur' }
]
},
}
},
@ -259,7 +262,6 @@ export default {
},
mounted () {
this.init();
},
computed: {
...mapGetters(["permission",'tagWel','tagList']),
@ -358,6 +360,7 @@ export default {
},
//
async warehouse(row,num){
console.log(num,'num');
let a ={
province_code : row.length > 0 ? row[0] : null,
city_code : row.length > 1 ? row[1] : null,
@ -366,21 +369,22 @@ export default {
let co =await getListCopy(this.page.currentPage, this.page.pageSize,a );
if(num == 1){
this.optionser = co.data.data.records;
console.log(this.optionser,'始发仓数据')
}else{
this.goalSer = co.data.data.records;
}
},
remoteMethodBin(query){
//
FnDeparture(query){
if (query) {
this.loading = true;
setTimeout(async () => {
this.loading = false;
console.log( "this.form.province",this.form.province);
let list = await getListBinName(this.page.currentPage, this.page.pageSize, { name: query });
console.log(list,'list');
this.optionser = list.data.data.records.filter((item) => {
console.log( "this.optionser",this.optionser);
return item.name.toLowerCase().includes(query.toLowerCase())
})
}, 200)
@ -388,6 +392,23 @@ export default {
this.optionser = [];
}
},
//
remoteMethodBin(query){
if (query) {
this.loading = true;
setTimeout(async () => {
this.loading = false;
let list = await getListBinName(this.page.currentPage, this.page.pageSize, { name: query });
console.log(list,'list');
this.goalSer = list.data.data.records.filter((item) => {
console.log( "this.goalGranary",this.goalSer);
return item.name.toLowerCase().includes(query.toLowerCase())
})
}, 200)
} else {
this.goalSer = [];
}
},
init () {
this.height = this.setPx(document.body.clientHeight - 155);
//
@ -437,6 +458,7 @@ export default {
}
},
handleSubmit (from) {
console.log(this.form,'this.form')
this.$refs[from].validate(async (valid) => {
if (valid) {
@ -445,6 +467,8 @@ export default {
await this.bianLier(this.costListName,this.clientType,this.costList,fei);
this.form.fei = Object.fromEntries(fei);
this.form.freightMark = undefined;
console.log(this.from,'当前表单的值')
if(this.pan){
this.$message.warning("请填写完整已勾选的数据费用");
return
@ -465,9 +489,11 @@ export default {
type: "success",
message: "操作成功!"
});
this.contextmenuFlag = false;
this.$store.commit('DEL_TAG_CURRENT');
this.$router.push(this.tagWel);
this.contextmenuFlag = false;
this.$store.commit('DEL_TAG_CURRENT'); //
this.$router.push('/basicdata/brand/basicZonePrice'); //
// this.$router.push(this.tagWel);
console.log('执行了新增操作');
});
} else {
let fe = new Map();
@ -496,8 +522,12 @@ export default {
message: "操作成功!"
});
this.contextmenuFlag = false;
console.log('执行了编辑操作');
this.$store.commit('DEL_TAG_CURRENT');
this.$router.push(this.tagWel);
this.$router.push('/basicdata/brand/basicZonePrice'); //
// this.$router.push(this.tagWel);
})
}
}

448
src/views/basicdata/warehouse/warehouse/basicdataWarehouseTemp.vue

@ -8,19 +8,18 @@
</el-form>
</el-row>
<!-- 头部右侧按钮模块 -->
<div class="el_top_btn">
<div class="add_form">
<el-button type="primary" @click="newlyadd" icon="el-icon-plus"> </el-button>
<el-button type="primary" icon="el-icon-delete">删除</el-button>
</div>
<div class="avue-crud__right">
<el-button icon="el-icon-refresh" @click="searchChangeS" circle></el-button>
<el-button icon="Operation" @click="showdrawer(true)" circle></el-button>
<el-button icon="Search" @click="searchHide" circle></el-button>
</div>
<div class="el_top_btn">
<div>
<el-button type="primary" @click="newlyadd" icon="el-icon-plus"> </el-button>
<el-button type="primary" icon="el-icon-delete">删除</el-button>
</div>
<div class="avue-crud__right">
<el-button icon="el-icon-refresh" @click="searchChangeS" circle></el-button>
<el-button icon="Operation" @click="showdrawer(true)" circle></el-button>
<el-button icon="Search" @click="searchHide" circle></el-button>
</div>
</div>
<el-row>
<!-- 列表模块 -->
<tablecmt
@ -36,11 +35,10 @@
>
<template #default="slotProps">
<template v-if="slotProps.scope.column.label === '操作'">
<div class="ElBtnClass">
<el-button @click="view(slotProps.scope)">查看</el-button>
<el-button @click="view(slotProps.scope)">编辑</el-button>
<el-button @click="view(slotProps.scope)">删除</el-button>
<div class="ElBtnClass">
<el-button @click="view(slotProps.scope)">查看</el-button>
<el-button @click="view(slotProps.scope)">编辑</el-button>
<el-button @click="view(slotProps.scope)">删除</el-button>
</div>
</template>
</template>
@ -66,125 +64,127 @@
</div>
</el-row>
<!-- 新增弹窗 -->
<el-dialog
v-model="newlyaddload"
title="新增"
width="800"
>
<el-form inline="true" :model="Addform" >
<el-form-item label="仓库名称">
<el-input v-model="Addform.name" placeholder="请输入仓库名称"/>
</el-form-item>
<el-form-item label="仓库编码">
<el-input v-model="Addform.name" placeholder="请输入仓库编码"/>
</el-form-item>
<el-form-item label="仓库简称">
<el-input v-model="Addform.name" placeholder="请输入仓库简称"/>
</el-form-item>
<el-form-item label="联系人">
<el-input v-model="Addform.name" placeholder="请输入联系人"/>
</el-form-item>
<el-form-item label="联系电话">
<el-input v-model="Addform.name" placeholder="请输入联系电话"/>
</el-form-item>
<el-form-item label="管理区域">
<el-input v-model="Addform.name" placeholder="请输入管理区域"/>
</el-form-item>
<el-form-item label="职能类型">
<el-input v-model="Addform.name" placeholder="请选择职能类型"/>
</el-form-item>
<el-form-item label="仓库地区">
<el-cascader v-model="Addform.name" :options="areaoptions" placeholder="省/市/区" />
</el-form-item>
<el-form-item label="仓库地址">
<el-input v-model="Addform.name" placeholder="请输入仓库地址"/>
</el-form-item>
<el-form-item label="所属部门">
<el-input v-model="Addform.name" placeholder="请选择所属部门"/>
</el-form-item>
<el-form-item label="仓库类型">
<el-input v-model="Addform.name" placeholder="请选择仓库类型"/>
</el-form-item>
<el-form-item label="消防等级">
<el-input v-model="Addform.name" placeholder="请选择消防等级"/>
</el-form-item>
<el-form-item label="是否具有消防等级">
<el-input v-model="Addform.name" placeholder="请选择是否具有消防等级"/>
</el-form-item>
<el-form-item label="仓库结构">
<el-input v-model="Addform.name" placeholder="请选择仓库结构"/>
</el-form-item>
<el-form-item label="是否高架">
<el-input v-model="Addform.name" placeholder="请选择是否高架"/>
</el-form-item>
<el-form-item label="仓库层高">
<el-input v-model="Addform.name" placeholder="请输入仓库层高"/>
</el-form-item>
<el-form-item label="电力类型">
<el-input v-model="Addform.name" placeholder="请输入仓库层高"/>
</el-form-item>
<el-form-item label="租金单价">
<el-input v-model="Addform.name" placeholder="请输入租金单价"/>
</el-form-item>
<el-form-item label="面积">
<el-input v-model="Addform.name" placeholder="请输入面积"/>
</el-form-item>
<el-form-item label="租金类型">
<el-input v-model="Addform.name" placeholder="请输入租金类型"/>
</el-form-item>
<el-form-item label="仓库等级">
<el-input v-model="Addform.name" placeholder="请输入仓库等级"/>
</el-form-item>
<el-form-item label="管理费">
<el-input v-model="Addform.name" placeholder="请输入管理费"/>
</el-form-item>
<el-form-item label="库位数">
<el-input v-model="Addform.name" placeholder="请输入库位数"/>
</el-form-item>
<el-form-item label="日期范围">
<el-input v-model="Addform.name" placeholder="请输入日期范围"/>
</el-form-item>
<el-form-item label="备注">
<el-input v-model="Addform.name" placeholder="请输入日期范围"/>
</el-form-item>
<el-form-item label="收款码">
<el-input v-model="Addform.name" placeholder="请输入日期范围"/>
</el-form-item>
</el-form>
<template #footer>
<div class="dialog-footer">
<el-button @click="newlyaddload = false">取消</el-button>
<el-button type="primary" @click="newlyaddSubmit">
确定
</el-button>
</div>
</template>
</el-dialog>
<el-dialog v-model="newlyaddload" title="新增" width="800">
<el-form class="add_form" inline="true" :model="Addform">
<el-form-item label="仓库名称">
<el-input v-model="Addform.name" placeholder="请输入仓库名称" />
</el-form-item>
<el-form-item label="仓库编码">
<el-input v-model="Addform.name" placeholder="请输入仓库编码" />
</el-form-item>
<el-form-item label="仓库简称">
<el-input v-model="Addform.name" placeholder="请输入仓库简称" />
</el-form-item>
<el-form-item label="联系人">
<el-input v-model="Addform.name" placeholder="请输入联系人" />
</el-form-item>
<el-form-item label="联系电话">
<el-input v-model="Addform.name" placeholder="请输入联系电话" />
</el-form-item>
<el-form-item label="管理区域">
<el-cascader v-model="Addform.name" :options="areaoptions" placeholder="省/市/区" />
</el-form-item>
<el-form-item label="职能类型">
<el-select v-model="Addform.name" clearable placeholder="请选择职能类型" >
<el-option
v-for="item in options"
:key="item.dictKey"
:label="item.dictValue"
:value="item.dictKey"
/>
</el-select>
</el-form-item>
<el-form-item label="仓库地区">
<el-cascader v-model="Addform.name" :options="areaoptions" placeholder="省/市/区" />
</el-form-item>
<el-form-item label="仓库地址">
<avue-input-map :params="params" placeholder="请选择地图" v-model="Addform.map" ></avue-input-map>
</el-form-item>
<el-form-item label="所属部门">
<avue-tree :option="AffiliationList"
v-model="Addform.bm">
</avue-tree>
</el-form-item>
<el-form-item label="仓库类型">
<el-input v-model="Addform.name" placeholder="请选择仓库类型" />
</el-form-item>
<el-form-item label="消防等级">
<el-input v-model="Addform.name" placeholder="请选择消防等级" />
</el-form-item>
<el-form-item label="是否具有消防等级">
<el-input v-model="Addform.name" placeholder="请选择是否具有消防等级" />
</el-form-item>
<el-form-item label="仓库结构">
<el-input v-model="Addform.name" placeholder="请选择仓库结构" />
</el-form-item>
<el-form-item label="是否高架">
<el-input v-model="Addform.name" placeholder="请选择是否高架" />
</el-form-item>
<el-form-item label="仓库层高">
<el-input v-model="Addform.name" placeholder="请输入仓库层高" />
</el-form-item>
<el-form-item label="电力类型">
<el-input v-model="Addform.name" placeholder="请输入仓库层高" />
</el-form-item>
<el-form-item label="租金单价">
<el-input v-model="Addform.name" placeholder="请输入租金单价" />
</el-form-item>
<el-form-item label="面积">
<el-input v-model="Addform.name" placeholder="请输入面积" />
</el-form-item>
<el-form-item label="租金类型">
<el-input v-model="Addform.name" placeholder="请输入租金类型" />
</el-form-item>
<el-form-item label="仓库等级">
<el-input v-model="Addform.name" placeholder="请输入仓库等级" />
</el-form-item>
<el-form-item label="管理费">
<el-input v-model="Addform.name" placeholder="请输入管理费" />
</el-form-item>
<el-form-item label="库位数">
<el-input v-model="Addform.name" placeholder="请输入库位数" />
</el-form-item>
<el-form-item label="日期范围">
<el-input v-model="Addform.name" placeholder="请输入日期范围" />
</el-form-item>
<el-form-item label="备注">
<el-input v-model="Addform.name" placeholder="请输入日期范围" />
</el-form-item>
<el-form-item label="收款码">
<el-input v-model="Addform.name" placeholder="请输入日期范围" />
</el-form-item>
</el-form>
<template #footer>
<div class="dialog-footer">
<el-button @click="newlyaddload = false">取消</el-button>
<el-button type="primary" @click="newlyaddSubmit"> 确定 </el-button>
</div>
</template>
</el-dialog>
</basic-container>
<!-- 列表配置显示 -->
<edittablehead
<!-- 列表配置显示 -->
<edittablehead
@setcolum="setnewcolum"
@closce="showdrawer"
:drawerShow="drawerShow"
@ -204,29 +204,38 @@ import {
getCurrentInstance,
} from 'vue';
import { columnList } from '@/option/basicdata/basicdataWarehouseTemp.js';
import { $_getList ,$_ObtainRegion} from '@/api/basicdata/basicdataWarehouse';
import { ElMessage } from 'element-plus'
import { $_getList, $_ObtainRegion } from '@/api/basicdata/basicdataWarehouse';
import { getDictionaryBiz } from '@/api/system/dict'; //
import { ElMessage } from 'element-plus';
const options = ref([{
dictKey:'1',
dictValue:'22'
}]); //
const search = ref(false); //
const query = ref({}); //
const newlyaddload=ref(false);//
const Addform=ref({});//
const newlyaddload = ref(false); //
const Addform = ref({
map:[],
}); //
//
const searchChangeS = () => {
query.value={}
onLoad()
query.value = {};
onLoad();
};
const initialization=()=>{
$_ObtainRegion().then(res=>{
if(res.data.code =200){
areaoptions.value =res.data.data
}
console.log(res,'获取地区');
})
}
initialization()
//
const initialization = () => {
$_ObtainRegion().then(res => {
if ((res.data.code = 200)) {
areaoptions.value = res.data.data;
}
console.log(res, '获取地区');
});
};
initialization();
const searchHide = () => {};
const areaoptions = ref([])
const areaoptions = ref([]);//
const details = reactive({
/** 是否开启搜索 */
@ -293,7 +302,7 @@ const {
* 弹窗的勾选回调用于更改头部数组
* 固定搭配只需要更换 columnList
* */
const setnewcolum = (newarr, headarr, type) => {
const setnewcolum = (newarr, headarr, type) => {
if (type == 1) {
details.columnList = newarr;
functions.setStorage(window.location.pathname + 'checkList', headarr);
@ -305,52 +314,104 @@ const {
functions.setStorage(window.location.pathname + 'sortlist', headarr);
}
};
details.columnList = columnList;//
details.columnList = columnList; //
/** 展开列表控件 */
const showdrawer = _flag => {
details.drawerShow = _flag;
};
//
function updateDictionary(targetArray, dictionaryType) {
getDictionaryBiz(dictionaryType).then(res => {
res.data.data.forEach((item)=>{
console.log(item);
targetArray.push({
dictKey:item.dictKey,
dictValue:item.dictValue,
})
})
});
}
const dictionary = () => {
updateDictionary(options.value, 'warehouse_function_type'); //
};
//
dictionary();
//
const onLoad=(val)=>{
let data={
current: page.currentPage,
size: page.pageSize,
...val
}
details.loadingObj.list=true;//
$_getList(data).then(res=>{
console.log(res);
if(res.data.code ==200){
if(res.data.data.records.length){
details.data = res.data.data.records;//
details.page.total= res.data.data.total;//
}
const onLoad = val => {
let data = {
current: details.page.currentPage,
size: details.page.pageSize,
...val,
};
details.loadingObj.list = true; //
$_getList(data)
.then(res => {
console.log(res);
if (res.data.code == 200) {
if (res.data.data.records.length) {
details.data = res.data.data.records; //
details.page.total = res.data.data.total; //
}
}).catch((res)=>{
ElMessage.error('获取失败联系后端管理员')
}).finally(()=>{
details.loadingObj.list=false;//
}
})
}
onLoad()
.catch(res => {
ElMessage.error('获取失败联系后端管理员');
})
.finally(() => {
details.loadingObj.list = false; //
});
};
onLoad();
//
const sizeChange = val => {
page.pageSize=val
onLoad()
details.page.pageSize = val;
onLoad();
};
/** 页码改变执行的回调 */
const currentChange = val => {
page.currentPage=val
onLoad()
const currentChange = val => {
details.page.currentPage = val;
onLoad();
};
//
const newlyadd=()=>{
newlyaddload.value=true;//
}
const newlyadd = () => {
newlyaddload.value = true; //
};
//
const newlyaddSubmit=()=>{
console.log(Addform.value);
}
const newlyaddSubmit = () => {
console.log(Addform.value);
};
//
const AffiliationList=ref({
formOption: {
labelWidth: 100,
column: [{
label: '自定义项',
prop: 'label'
}],
},
lazy: true,
treeLoad: function (node, resolve) {
if (node.level === 0) {
return resolve([{ is_show: true, label: 'region', value: new Date().getTime() }]);
}
if (node.level > 2) return resolve([]);
setTimeout(() => {
const data = [{
label: 'leaf',
is_show: true,
value: new Date().getTime(),
leaf: true
}, {
is_show: true,
value: new Date().getTime(),
label: 'zone'
}];
resolve(data);
}, 500);
},
}
)
</script>
<style scoped lang="scss">
@ -364,16 +425,17 @@ console.log(Addform.value);
background-color: transparent;
}
}
.el_top_btn{
margin-bottom: 4px;
display: flex;
justify-content: space-between;
align-items: center;
.el_top_btn {
margin-bottom: 4px;
display: flex;
justify-content: space-between;
align-items: center;
}
:deep(.add_form){
display: flex;
.el-form-item{
width: 46%;
}
:deep(.add_form) {
display: flex;
flex-wrap: wrap;
.el-form-item {
width: 46%;
}
}
</style>

33
src/views/distribution/reservation/atlas.vue

@ -122,7 +122,8 @@ function checkgoto() {
});
useStores.commit('DEL_TAG_CURRENT');
}
function init(data) {
async function init(data) {
await details.mapLoc.clearMap();//
// maplabel()
console.log(details.mapLoc);
let geocodess = [];
@ -138,12 +139,13 @@ function init(data) {
anchor: 'bottom-center',
offset: new AMap.Pixel(0, 0),
});
marker.setMap(details.mapLoc);
marker.setLabel({
await marker.setMap(details.mapLoc);
await marker.setLabel({
offset: new AMap.Pixel(0, -5), //
content: `<div class='info'>${item.warehouseName}</div>`, //
direction: 'top', //
});
details.markersarr=[]
details.markersarr.push(marker);
await geocoder.getLocation(item.deliveryAddress, (status, result) => {
if (status === 'complete' && result.info === 'OK') {
@ -166,7 +168,8 @@ function init(data) {
});
}
//
function maker(geocodess) {
function maker (geocodess) {
geocodess.map(item => {
var marker = new AMap.Marker({
map: details.mapLoc,
@ -183,8 +186,11 @@ function maker(geocodess) {
});
details.markersarr.push(marker);
});
}
//
// seenIds
const seenIds = {};
function Driving(geocodess) {
// 线
geocodess.map(item => {
@ -202,7 +208,14 @@ function Driving(geocodess) {
item.distance = result.routes[0].distance / 1000;
item.isck = true;
// item.distance=result.routes[0].distance/1000
details.datalists.push(item);
// push seenIds
if (!seenIds.hasOwnProperty(item.items.id)) {
item.time = formatSeconds(result.routes[0].time);
item.distance = result.routes[0].distance / 1000;
item.isck = true;
details.datalists.push(item);
seenIds[item.items.id] = true; // ID
}
} else {
console.log('获取驾车数据失败:' + result);
}
@ -211,6 +224,7 @@ function Driving(geocodess) {
details.drivingarrs.push(driving);
});
}
//
function formatSeconds(seconds) {
var hours = Math.floor(seconds / 3600);
@ -228,8 +242,13 @@ function back() {
router.back(-1);
}
const { datalists } = toRefs(details);
const ListChange=(val)=>{
console.log(val);
const ListChange= (val)=>{
console.log(details.datalists,'最新的数据');
let data = details.datalists
.filter(item => item.isck === true)
.map(item => item.items);
init(data)
console.log(details.datalists,'数据');
}
</script>

14
src/views/distribution/reservation/reservation.vue

@ -1355,13 +1355,13 @@ export default {
},
});
this.$router.push({
path: '/distribution/reservation/atlas',
query: {
id: ids,
type: '1',
},
});
// this.$router.push({
// path: '/distribution/reservation/atlas',
// query: {
// id: ids,
// type: '1',
// },
// });
// console.log(">>>>>>>>>>",ids);
},
//

27
src/views/distribution/turndelivery/deliveryDiscuss.vue

@ -2570,6 +2570,8 @@ const CLchangeSelect = val => {
//
const merge = (val, kindS) => {
if (kindS == 'WX') {
//
console.log('当前是外协');
@ -2581,6 +2583,31 @@ const merge = (val, kindS) => {
return;
}
if(!DataSubmit.value.tripartite.driverName){
ElMessage({
message: '请选填写司机名称',
type: 'warning',
});
return
}
const phoneRegExp = /^[0-9]{11}$/;
if (!phoneRegExp.test(DataSubmit.value.tripartite.driverPhone)) {
ElMessage({
message: '请输入正确的11位司机电话号码',
type: 'warning',
});
return;
}
if(!DataSubmit.value.tripartite.vehicleNum){
ElMessage({
message: '请选填车辆车牌',
type: 'warning',
});
return
}
if (!DataSubmit.value.taskTime) {
ElMessage({
message: '请填写配送日期',

49
src/views/warehouse/warehouseStock/warehouseStock.vue

@ -75,7 +75,8 @@ import {
} from '@/api/warehouse/warehouseStock';
import option from '@/option/warehouse/warehouseStock';
import { mapGetters } from 'vuex';
import { downloadXls } from '@/utils/util';
import { ElMessage } from 'element-plus'
import { downloadXls,checkParams} from '@/utils/util';
export default {
data() {
return {
@ -285,7 +286,7 @@ export default {
{
prop: 'operatorTime',
label: '操作时间',
type: 4,
type: 6,
values: '',
width: '130',
checkarr: [],
@ -473,15 +474,49 @@ export default {
selectsc(index, row) {
console.log(index, row);
},
checkParams(data, targetParam) {
const keys = Object.keys(data);
if (keys.includes(targetParam) && keys.every(key => key === targetParam || data[key] === "")) {
return true; // true
} else {
return false; // false
}
},
timesc(index, row) {
console.log(index, row);
console.log(index, row);
// index = this.formatDate(index);
this.query[row.prop] = index;
console.log(checkParams(this.query, 'operatorTime'),'232323'); // true
if(checkParams(this.query, 'operatorTime')){
ElMessage({
message: '请携带其他任意参数',
type: 'warning',
})
return
}
this.onLoad(this.page);
},
inputsc(index, row) {
console.log(index, row);
this.query[row.prop] = index;
console.log(this.checkParams(this.query, 'operatorTime'),'22222'); // true
if(this.query.operatorTime){
if(checkParams(this.query, 'operatorTime')){
ElMessage({
message: '请携带其他任意参数',
type: 'warning',
})
return
}
}else{
ElMessage({
message: '请选择日期参数',
type: 'warning',
})
}
this.onLoad(this.page);
},
init() {
@ -604,6 +639,10 @@ export default {
const data = res.data.data;
this.page.total = data.total;
this.data = data.records;
}).catch(()=>{
}).finally(()=>{
this.loading = false;
});
},

1
vite.config.js

@ -32,7 +32,6 @@ export default ({ mode, command }) => {
// target: 'http://192.168.3.5:13000',//?
// target: 'http://h5uapi.huitongys.com',
target: 'http://test.api.huo5you.com',
changeOrigin: true,
rewrite: path => path.replace(/^\/api/, ''),
},

Loading…
Cancel
Save