马远东 8 months ago
parent
commit
c6262c3b6f
  1. 2
      src/option/distribution/zeroAdditionalRecording.js
  2. 3
      src/router/views/index.js
  3. 84
      src/views/basicdata/vehicle/basicdataVehicle2.vue
  4. 74
      src/views/distribution/artery/addTripartiteTransfer.vue
  5. 7
      src/views/distribution/artery/zeroAdditionalRecording.vue
  6. 17
      src/views/system/pdaversion/pdaversionManage.vue

2
src/option/distribution/zeroAdditionalRecording.js

@ -300,7 +300,7 @@ export const newColumnList = [
{
prop: 'loadingNum',
label: '装车件数',
type: 2,
type: 13,
values: '',
width: '130',
checkarr: [],

3
src/router/views/index.js

@ -218,6 +218,7 @@ export default [
name: '新增中转',
meta: {
i18n: 'data',
keepAlive: true,
},
component: () =>
import(
@ -1347,7 +1348,7 @@ export default [
},
],
},
{
path: '/distribution/checkInventoryTask/createTaskfrom',
component: Layout,

84
src/views/basicdata/vehicle/basicdataVehicle2.vue

@ -28,12 +28,24 @@
<div class="avue-crud__header">
<!-- 头部左侧按钮模块 -->
<div class="avue-crud__left">
<!-- 新增 -->
<el-button type="primary" icon="Plus" @click="handleAdd"> </el-button>
<el-button type="primary" icon="Delete" @click="() => handleDelete(true)"
> </el-button
>
<!-- 删除 -->
<el-button type="primary" icon="Delete" @click="() => handleDelete(true)">
</el-button>
<!-- 导出 -->
<el-button type="primary" icon="Download" @click="handleExport"> </el-button>
<el-button type="primary" icon="Upload" @click="searchChange"> </el-button>
<!-- 导入 -->
<el-button
type="primary"
icon="Upload"
@click="() => (details.popUpShow.UploadPackageDelivery = true)"
>
</el-button>
</div>
<!-- 头部右侧按钮模块 -->
<div class="avue-crud__right">
@ -84,6 +96,23 @@
</div>
</basic-container>
<!-- 上传 -->
<MyUpload
ref="myUpload"
v-model="details.popUpShow.UploadPackageDelivery"
templateSrc=""
uploadAddress="/api/logpm-basicdata/vehicle/import-basicdataVehicle"
isDefined
:success="
() => {
details.popUpShow.UploadPackageDelivery = false;
onLoad();
}
"
>
<!-- <el-button type="danger" icon="Download" @click="handleDownloadTemplate"> 下载模板 </el-button> -->
</MyUpload>
<!-- 列表配置显示 -->
<edittablehead
@closce="showdrawer"
@ -93,7 +122,7 @@
</template>
<script setup lang="ts">
import { ref, reactive, toRefs, computed, onMounted, nextTick } from 'vue';
import { ref, reactive, toRefs, computed, onMounted, nextTick, getCurrentInstance } from 'vue';
import functions from '@/utils/functions.js';
import dayjs from 'dayjs';
import { mapGetters } from 'vuex';
@ -115,6 +144,9 @@ import columnList from '@/option/basicdata/basicdataVehicle2.js';
import { useStore } from 'vuex';
import { useRouter } from 'vue-router';
import { ElMessage, ElMessageBox } from 'element-plus';
import { exportBlob } from '@/api/common';
import { getToken } from '@/utils/auth';
import { dateNow } from '@/utils/date';
import {
getList,
getDetail,
@ -194,6 +226,8 @@ const details = reactive<any>({
popUpShow: {
/** 图片预览 */
abnormalVisited: false,
/** 上传 */
UploadPackageDelivery: false,
},
/** 列表Dom节点 */
listNode: '',
@ -208,6 +242,8 @@ const details = reactive<any>({
const { search, query, shortcuts, stockupDate, data, loadingObj, selectionList, drawerShow, page } =
toRefs(details);
const instance = getCurrentInstance();
/** vuex */
const permission = computed(() => mapGetters(['permission', 'tagWel', 'tagList']));
@ -451,12 +487,40 @@ const handleDelete = (isBatch, row: any = {}) => {
/** 导出 */
const handleExport = () => {
getVehicleExport();
};
console.log('instance :>> ', instance);
if (!details.selectionList.length) {
ElMessage({
message: '请勾选要导出的数据',
type: 'warning',
});
return;
}
/** 导入 */
const handleImport = () => {
importExcel('/basicdata/vehicle/import', details.columnList);
let downloadUrl = `/logpm-basicdata/vehicle/export-basicdataVehicle?Blade-Auth=${getToken()}`;
let submitData = {
ids: '',
};
submitData.ids = details.selectionList.map(item => item.id).join(',');
ElMessageBox.confirm('是否导出数据?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}).then(async () => {
try {
details.loadingObj.pageLoading = true;
const res = await exportBlob(downloadUrl, submitData);
const { status, data } = res;
if (status !== 200) retrun;
downloadXls(res.data, `车辆信息导出${dateNow()}.xlsx`);
} catch (error) {
console.log('error :>> ', error);
} finally {
details.loadingObj.pageLoading = false;
}
});
};
</script>

74
src/views/distribution/artery/addTripartiteTransfer.vue

@ -68,7 +68,7 @@
:teleported="false"
v-model="form.deliveryType"
class="m-2"
placeholder="运费分摊方式"
placeholder="送货方式"
size="default"
@change="
val => {
@ -89,12 +89,12 @@
/>
</el-select>
</el-form-item>
<el-form-item label="付款方式" prop="payMethod">
<el-form-item label="送货方式" prop="payMethod">
<el-select
:teleported="false"
v-model="form.payMethod"
class="m-2"
placeholder="运费分摊方式"
placeholder="送货方式"
size="default"
>
<el-option
@ -163,7 +163,7 @@
</el-select>
</el-form-item>
<el-button type="primary" @click="handleAddCarrier" icon="Plus" />
<el-button type="primary" @click="handleAddVehicle" icon="Plus" />
</div>
<div style="display: flex">
@ -213,7 +213,7 @@
</SelectBox>
</el-form-item>
<el-button type="primary" @click="handleAddCarrier" icon="Plus" />
<el-button type="primary" @click="handleAddCar" icon="Plus" />
</div>
<el-form-item label="客户类型" prop="customerType">
@ -512,6 +512,12 @@
></edittablehead>
</template>
<script lang="ts">
export default {
name: 'addTripartiteTransfer',
};
</script>
<script setup lang="ts">
import { ref, reactive, toRefs, computed, onMounted, nextTick, watch } from 'vue';
import functions from '@/utils/functions';
@ -635,6 +641,30 @@ const details = reactive<any>({
trigger: ['change'],
},
],
/** 付款方式 */
payMethod: [
{
required: true,
message: '请选择付款方式',
trigger: ['change'],
},
],
/** 运费分摊方式 */
chargeType: [
{
required: true,
message: '请选择运费分摊方式',
trigger: ['change'],
},
],
/** 是否结算 */
isSettlement: [
{
required: true,
message: '请选择结算状态',
trigger: ['change'],
},
],
/** 客户类型 */
customerType: [
{
@ -864,13 +894,14 @@ const initDispatchOrder = async () => {
];
};
watch(
$route,
() => {
initPageInfo();
},
{ immediate: true }
);
// watch(
// $route,
// () => {
// initPageInfo();
// },
// { immediate: true }
// );
initPageInfo();
/** 请求运单数据 */
const initOriginWarehouseOrder = debounce(async function (params = {}) {
@ -1122,6 +1153,25 @@ const handleAddCarrier = () => {
$router.push({ path: '/basicdata/carrier/basicdataCarrier' });
};
/** 新增车辆 */
const handleAddCar = () => {
$router.push({ path: '/basicdata/vehicle/basicdataVehicle' });
};
/** 新增司机 */
const handleAddVehicle = () => {
$store.commit('DEL_ONCE_TAG', 'basicdataDriverArteryAdd');
$router.push({
path: '/basicdata/driverArtery/basicdataDriverArteryAdd',
query: {
name: '司机信息新增',
type: 'add',
backPatch: '/basicdata/driverArtery/basicdataDriverArtery',
},
});
};
/** 选择承运商 */
const carrierNameChange = () => {
const findValue = form.value.carrierName;

7
src/views/distribution/artery/zeroAdditionalRecording.vue

@ -190,6 +190,8 @@
:min="0"
:max="slotProps.scope.row.stockNum"
:step="1"
:value-on-clear="0"
:controls="false"
/>
</template>
</template>
@ -212,8 +214,9 @@
icon="el-icon-circle-check"
:loading="details.loadingObj.submitLoading"
@click="handleEditZeroSubmit"
> </el-button
>
</el-button>
<el-dialog
v-model="details.showPopUpObj.editNodeIdDialogVisible"
@ -788,6 +791,8 @@ const handleEditZeroSubmit = async () => {
finalNodeId: iterator.finalNodeId,
};
if (iterator.loadingNum === 0) return ElMessage.warning('存在装车数为0的数据,请移除或编辑');
if ($route.query.type === 'sign') _obj.signOrderId = iterator.signOrderId;
submitData.zeroSuppleList.push(_obj);

17
src/views/system/pdaversion/pdaversionManage.vue

@ -94,7 +94,6 @@
multiple
class="upfilebox"
v-model:file-list="form.filelink"
:before-upload="uploadBefore"
:limit="1"
list-type="text"
drag
@ -437,19 +436,9 @@ export default {
handleClearTableQuery(this.columnList);
this.onLoad(this.page);
},
async uploadBefore(rawFile, done, loading, column) {
if (rawFile.type !== 'image/png' && rawFile.type !== 'image/jpeg') {
ElMessage.error('图片格式只能为 png/jpg!');
return false;
} else if (rawFile.size / 1024 / 1024 > 10) {
ElMessage.error('图片大小不能大于10MB!');
return false;
}
const res = await compressImageBlob(rawFile);
return res;
},
async customUploadRequest({ file }) {
try {
async customUploadRequest({ file }) {
try {
console.log(file, '文件上传');
const responses = await this.$fileslicing(this, file); // ()
console.log(responses, 'responses');

Loading…
Cancel
Save