Browse Source

修复部分bug

dev-xx
qb 11 months ago
parent
commit
31f9e2fee7
  1. 8
      src/api/distribution/CreateOrder.js
  2. 81
      src/components/edittablehead/index.vue
  3. 2
      src/components/tablecmt/tablecmt.vue
  4. 72
      src/views/basicdata/warehouse/tray/basicdataTrayedt.vue
  5. 11
      src/views/distribution/artery/VehicleStowageDetails.vue
  6. 14
      src/views/distribution/stockup/distributionStockupMarket.vue
  7. 3
      src/views/waybill/ChangeOrder.vue

8
src/api/distribution/CreateOrder.js

@ -147,10 +147,10 @@ export const postFindCategoryInfo = data => {
/**
* 查询物料价格
*/
export const postFindArrPrice = data => {
export const postFindArrPrice = params => {
return request({
url: '/api/logpm-trunkline/openOrder/findArrPrice',
method: 'post',
data,
url: '/api/logpm-basicdata-zqb/basicdataPrice/custom',
method: 'get',
params,
});
};

81
src/components/edittablehead/index.vue

@ -2,17 +2,28 @@
<el-drawer :model-value="drawerShow" @close="close" title="编辑列表" size="40%">
<!-- <el-checkbox label="12" />
<el-checkbox label="2" /> -->
<el-table :data="columnList" style="width: 100%; height: 700px" border ref="tableEl1">
<el-table-column v-for="column in headtop" :key="column.prop" :prop="column.prop" :label="column.label"
:width="column.width" flexible>
<el-table :data="col" style="width: 100%; height: 700px" border ref="tableEl1">
<el-table-column
v-for="column in headtop"
:key="column.label + column.prop"
:prop="column.prop"
:label="column.label"
:width="column.width"
flexible
>
<template #header>
<el-text class="mx-1">{{ column.label }}</el-text>
</template>
<template #default="scope">
<el-text class="mx-1" v-if="column.prop == 'label'">{{ scope.row[column.prop] }}</el-text>
<el-checkbox-group v-else-if="column.label == '隐藏'" v-model="checkList">
<el-checkbox :key="scope.row['label']" :label="scope.row['label']" true-label="" false-label=""
@change="checkboxitem(1)">
<el-checkbox
:key="scope.row['label']"
:label="scope.row['label']"
true-label=""
false-label=""
@change="checkboxitem(1)"
>
<!-- 用于隐藏文字 -->
<template #default="scope">
<!-- {{ scope }} -->
@ -20,8 +31,13 @@
</el-checkbox>
</el-checkbox-group>
<el-checkbox-group v-else-if="column.label == '冻结'" v-model="flexList">
<el-checkbox :key="scope.row['label']" :label="scope.row['label']" true-label="" false-label=""
@change="checkboxitem(2)">
<el-checkbox
:key="scope.row['label']"
:label="scope.row['label']"
true-label=""
false-label=""
@change="checkboxitem(2)"
>
<!-- 用于隐藏文字 -->
<template #default="scope">
<!-- {{ scope }} -->
@ -29,8 +45,13 @@
</el-checkbox>
</el-checkbox-group>
<el-checkbox-group v-else-if="column.label == '排序'" v-model="sortlist">
<el-checkbox :key="scope.row['label']" :label="scope.row['label']" true-label="" false-label=""
@change="checkboxitem(3)">
<el-checkbox
:key="scope.row['label']"
:label="scope.row['label']"
true-label=""
false-label=""
@change="checkboxitem(3)"
>
<!-- 用于隐藏文字 -->
<template #default="scope">
<!-- {{ scope }} -->
@ -49,7 +70,7 @@
import { ref, watchEffect, onMounted, watch, inject, nextTick } from 'vue';
import type { PropType } from 'vue';
const functions = inject('functions') as any;
import Sortable from "sortablejs";
import Sortable from 'sortablejs';
interface TableColumnType {
/** 表格列的key */
prop: string;
@ -104,7 +125,6 @@ const flexList = ref<(string | number)[]>([]);
const sortlist = ref<(string | number)[]>([]);
const tableEl1 = ref(null);
if (functions.getStorage(window.location.pathname + 'checkList')) {
checkList.value = functions.getStorage(window.location.pathname + 'checkList');
console.log(checkList.value);
@ -129,45 +149,51 @@ let props = defineProps({
},
});
const col = ref([...props.columnList]);
onMounted(() => {
for (let index = 0; index < props.columnList.length; index++) {
const item = props.columnList[index];
item.fixed =
item.fixed === true || item.fixed === 'right' || item.fixed === 'left' ? item.fixed : false;
}
nextTick(() => {
console.log('onMounted')
console.log('onMounted');
initSortable();
});
})
});
watch(
() => props.drawerShow,
(val) => {
val => {
if (val)
nextTick(() => {
initSortable();
console.log('watch')
console.log('watch');
});
}
);
const initSortable = () => {
if (tableEl1.value && tableEl1.value.$el) {
const el1 = tableEl1.value.$el.querySelector('.el-table__body tbody')
console.log(el1)
const el1 = tableEl1.value.$el.querySelector('.el-table__body tbody');
console.log(el1);
Sortable.create(el1, {
// handle: '.move-icon',
animation: 150, //
onEnd: ({ newIndex, oldIndex }) => {
console.log(newIndex, oldIndex)
const arr = props.columnList
const currRow = arr.splice(oldIndex, 1)[0]
arr.splice(newIndex, 0, currRow)
console.log(newIndex, oldIndex);
const arr = props.columnList;
const currRow = arr.splice(oldIndex, 1)[0];
arr.splice(newIndex, 0, currRow);
// nextTick(() => {
// emit('setcolum', arr, 4);
// })
}
})
},
});
}
}
};
function close() {
emit('closce', false);
@ -282,7 +308,6 @@ let headtop = ref<headtoptype[]>([
},
]);
setTimeout(() => {
}, 2000);
setTimeout(() => {}, 2000);
</script>
<style lang="scss"></style>

2
src/components/tablecmt/tablecmt.vue

@ -18,7 +18,7 @@
:type="column.type == 0 ? 'selection' : ''"
:min-width="column.width"
v-for="(column, index) in newcolumnList"
:key="column.prop"
:key="column.label + column.prop"
:prop="column.prop"
:label="column.label"
:fixed="column.fixed"

72
src/views/basicdata/warehouse/tray/basicdataTrayedt.vue

@ -9,13 +9,25 @@
<!-- </avue-form>-->
<el-row :gutter="24" class="rows">
<el-col :xl="7" :lg="7" :md="8" :sm="24">
<span>托盘{{ traydata.palletCode }} </span>
<span>托盘名称{{ traydata.palletName }} </span>
</el-col>
<el-col :xl="7" :lg="7" :md="8" :sm="24">
<span> {{ traydata.$type }} </span>
</el-col>
<el-col :xl="7" :lg="7" :md="8" :sm="24">
<span>打托方式{{ traydata.trayType }} </span>
<span>托盘码{{ traydata.palletCode }} </span>
</el-col>
</el-row>
<el-row :gutter="24" class="rows">
<el-col :xl="7" :lg="7" :md="8" :sm="24">
<span>打托方式{{ traydata.trayType || '暂无数据' }} </span>
</el-col>
<el-col :xl="7" :lg="7" :md="8" :sm="24">
<span>窜货条件{{ traydata.filterValue || '暂无数据' }} </span>
</el-col>
<el-col :xl="7" :lg="7" :md="8" :sm="24">
<span>仓库{{ traydata.warehouseName }} </span>
</el-col>
</el-row>
@ -1079,46 +1091,26 @@ export default {
},
watch: {
// eslint-disable-next-line no-unused-vars
$route(to, from) {
// this.isadd =false;
// this.query.masterId = null;
// this.masterId = null;
// if (!!this.$route.query.data) {
// // //
// // // this.isadd =true;
// // this.query.masterId = this.$route.query.data;
// // this.masterId = this.$route.query.data;
// //
// this.onLoad(this.page);
// } else {
// }
$route: {
async handler(to, from) {
console.log('123 :>> ', 123);
this.onLoad();
await this.$nextTick();
this.init;
},
deep: true,
immediate: true,
},
},
mounted() {
this.init();
this.onLoad();
// let arr = [];
// this.option.column.map(item => {
// if (!item.hide) {
// arr.push({
// prop: item.prop,
// label: item.label,
// type: 1,
// values: '',
// width: '150',
// checkarr: [],
// fixed: false,
// sortable: true,
// head: false,
// });
// }
// });
// console.log(JSON.stringify(arr));
// this.init();
// this.onLoad();
},
created() {
// //
// this.queryDictionary();
this.onLoad();
// this.onLoad();
},
computed: {
...mapGetters(['permission']),
@ -1439,11 +1431,13 @@ export default {
const data = decodeURIComponent(this.$route.query.data);
this.traydata = JSON.parse(data);
getDictionaryBiz('pallet_order_type').then(res => {
console.log(res,'打托字典');
console.log(res, '打托字典');
//
if(res.data.code ==200){
if(res.data.data.length){
this.traydata.trayType = res.data.data.find(res=>res.dictKey== this.traydata.trayType).dictValue
if (res.data.code == 200) {
if (res.data.data.length) {
this.traydata.trayType = res.data.data.find(
res => res.dictKey == this.traydata.trayType
).dictValue;
}
}
});

11
src/views/distribution/artery/VehicleStowageDetails.vue

@ -689,10 +689,19 @@ const initOriginWarehouseOrder = async (params = {}) => {
details.planData = [];
data.carsLoadWaybillInfoList.forEach(val => {
const _arr = [];
details.oldData.push(
...val.carsLoadOrderInfoList.map((item, index) => {
item = { ...val, ...item };
const _planArr: any = { ...val, ...item };
delete item.carsLoadOrderInfoList;
delete item.carsLoadOrderInfoListPlan;
delete _planArr.carsLoadOrderInfoList;
delete _planArr.carsLoadOrderInfoListPlan;
_arr.push(_planArr);
if (index === 0) item.mergeColumnIndex = val.carsLoadOrderInfoList.length;
else {
item.mergeColumnIndex = 0;
@ -704,7 +713,7 @@ const initOriginWarehouseOrder = async (params = {}) => {
})
);
details.planData = [...details.planData, ...(val.carsLoadOrderInfoListPlan || [])];
details.planData.push(..._arr);
});
inputsc('', { prop: 'aaa' });

14
src/views/distribution/stockup/distributionStockupMarket.vue

@ -777,7 +777,7 @@ export default {
});
this.forkliftData = fo;
});
await this.getStorageArea();
// await this.getStorageArea();
await this.getTeam();
},
//
@ -840,7 +840,7 @@ export default {
this.num = '3';
this.dialogFormCustomer = true;
this.getFork(); //
this.getTeam(); //
// this.getTeam(); //
} else {
this.$message.warning('已指派,请勿重复指派!!!');
}
@ -956,11 +956,11 @@ export default {
if (row.ids === '') {
this.$message.warning('请选择备货任务!');
return;
}
console.log('row-------->', row);
let data={
stockUpIds:row.ids,
}
console.log('row-------->', row);
let data = {
stockUpIds: row.ids,
};
$_exportStockUpDetail(data).then(res => {
console.log(res.data);
downloadXls(res.data, '备货清单.xlsx');
@ -1022,7 +1022,7 @@ export default {
this.num = '2';
this.formOne.id = row.row.id;
this.getFork();
this.getTeam();
// this.getTeam();
},
handleView(row) {
// this.title = ''

3
src/views/waybill/ChangeOrder.vue

@ -194,12 +194,9 @@ import dayjs from 'dayjs';
import { mapGetters } from 'vuex';
/** 获取字典 */
import { getDictionaryBiz } from '@/api/system/dict';
import { getopenOrderAdvancePageList } from '@/api/waybill/ChangeOrder';
import { showOrderPackgeCode } from '@/api/distribution/distributionStockArticle';
import { downloadXls, setNodeHeight, getHtmls, deepClone } from '@/utils/util';
import { columnList, viewColumnList } from '@/option/waybill/ChangeOrder';
import { useRouter } from 'vue-router';
import print from '@/utils/print';
import { ElMessage } from 'element-plus';
//

Loading…
Cancel
Save