From 542dcd62fa061525a00339011ff24246f03b820e Mon Sep 17 00:00:00 2001 From: wjli <591616088@qq.com> Date: 星期二, 09 四月 2024 08:36:49 +0800 Subject: [PATCH] 添加签收查询 --- src/views/your/sign-compar/index.less | 13 ++ src/views/your/order-manage/orderEvaluateManage.vue | 4 src/views/your/sign-compar/index.vue | 332 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/api/open.js | 3 4 files changed, 352 insertions(+), 0 deletions(-) diff --git a/src/api/open.js b/src/api/open.js index 68520b6..eaa6926 100644 --- a/src/api/open.js +++ b/src/api/open.js @@ -293,3 +293,6 @@ export const getNewSignList = (pageNum, pageSize, carName, sendDateStart, sendDateEnd,line,sendDate,userName,batch) => { return getRequest(`/signCount/selectBySignNew?pageSize=${pageSize}&pageNum=${pageNum}&carName=${carName}&sendDateStart=${sendDateStart}&sendDateEnd=${sendDateEnd}&line=${line}&sendDate=${sendDate}&userName=${userName}&batch=${batch}`) } +export const getByPageImgs=(params)=>{ + return getRequest(`/orderTask2/getByPageImgs`, params) +} \ No newline at end of file diff --git a/src/views/your/order-manage/orderEvaluateManage.vue b/src/views/your/order-manage/orderEvaluateManage.vue index e2efe4d..8b79971 100644 --- a/src/views/your/order-manage/orderEvaluateManage.vue +++ b/src/views/your/order-manage/orderEvaluateManage.vue @@ -19,6 +19,7 @@ <Option v-for="item in cityList" :value="item.value" :key="item">{{ item.label }}</Option> </Select> <Button @click="init2" icon="md-search" style="margin-left: 20px">鏌ヨ</Button> + <Button @click="init3" icon="md-search" style="margin-left: 20px">绛炬敹鏌ヨ</Button> </Row> <Table :loading="loading" @@ -237,6 +238,9 @@ init2() { this.getDataList2(); }, + init3() { + this.$router.push('/your/sign-compar/index'); + }, time1(e) { this.searchForm.sendDate = e; this.searchForm2.sendDate = e; diff --git a/src/views/your/sign-compar/index.less b/src/views/your/sign-compar/index.less new file mode 100644 index 0000000..789f8db --- /dev/null +++ b/src/views/your/sign-compar/index.less @@ -0,0 +1,13 @@ +.permModal { + .ivu-modal-body { + max-height: 560px; + overflow: auto; + } +} + +.depModal { + .ivu-modal-body { + max-height: 500px; + overflow: auto; + } +} \ No newline at end of file diff --git a/src/views/your/sign-compar/index.vue b/src/views/your/sign-compar/index.vue new file mode 100644 index 0000000..0718489 --- /dev/null +++ b/src/views/your/sign-compar/index.vue @@ -0,0 +1,332 @@ +<style lang="less"> +@import "@/styles/table-common.less"; +@import "@/styles/drawer-common.less"; +@import "src/views/your/sign-compar/index.less"; +</style> +<template> + <div class="search"> + <Card> + <Row class="operation"> + <Date-picker clearable @on-change="time1" format="yyyy-MM-dd" type="date" placement="bottom-end" + placeholder="璇烽�夋嫨鍙戦�佸紑濮嬫棩鏈�(蹇呴��)" style="width: 240px;margin-left: 20px"> + </Date-picker> + <Date-picker clearable @on-change="time2" format="yyyy-MM-dd" type="date" placement="bottom-end" + placeholder="璇烽�夋嫨鍙戦�佺粨鏉熸棩鏈�(蹇呴��)" style="width: 240px;margin-left: 20px"> + </Date-picker> + <Input v-model="searchForm2.userName" suffix="ios-search" + placeholder="璇疯緭鍏ラ厤閫佸憳鍚嶅瓧" clearable style="width: 250px;margin-left: 20px"/> + <Input v-model="searchForm2.carNo" suffix="ios-search" + placeholder="璇疯緭鍏ヨ溅鐗屽彿" clearable style="width: 250px;margin-left: 20px"/> + <Input v-model="searchForm2.customerName" suffix="ios-search" + placeholder="璇疯緭鍏ュ簵閾哄悕绉�" clearable style="width: 250px;margin-left: 20px"/> + + <Button @click="init2" icon="md-search" style="margin-left: 20px">鏌ヨ</Button> + </Row> + <Modal + :title="modalTitle" + v-model="roleModalVisible" + :mask-closable="false" + draggable + scrollable + :width="1200" + > + <div style="display:flex;justify-content: space-between;"> + <div style="border:1px solid #000;"> + <img :src="firstimg" + alt="鏆傛棤鍥剧墖" + mode="contain" style="width: 400px;"/> + </div> + <div style="border:1px solid #000;"> + <img :src="secondimg" + alt="鏆傛棤鍥剧墖" + mode="contain" style="width: 400px;"/> + </div> + </div> + + <template #footer> + <div></div> + </template> + </Modal> + <Table + :loading="loading" + border + :columns="columns" + :data="data" + ref="table" + > + <template #img="{ row, index }"> + <div v-for="(fit,index) in getImg(row.img)" :key="index"> + <img + :src="fit" + alt="鏆傛棤鍥剧墖" + style="width: 100px;height: 100px" + @click="handleImageClick"/> + </div> + </template> + <template #action="{ row, index }"> + <div > + <Button @click="handleEdit(row, index)">鏌ョ湅</Button> + </div> + </template> + </Table> + <Row type="flex" justify="end" class="page"> + <Page + :current="searchForm2.pageNum" + :total="total" + :page-size="searchForm2.pageSize" + @on-change="changePage" + @on-page-size-change="changePageSize" + :page-size-opts="[10, 20, 50]" + size="small" + show-total + show-elevator + show-sizer + ></Page> + </Row> + </Card> + + <!-- 缂栬緫 --> + </div> +</template> + +<script> +import { + getByPageImgs, +} from "@/api/open"; + + +export default { + name: "car-manage", + data() { + return { + previewModal: false, + maxHeight: 510, + openTip: true, + openLevel: "0", + loading: false, + modalTitle: "", + modalVisible: false, + roleModalVisible:false, + firstimg:"", + secondimg:"", + searchForm2: { + pageNum: 1, // 褰撳墠椤垫暟 + pageSize: 10, // 椤甸潰澶у皬 + customerName: '', + userName:"", + carNo:"鍐�BD27580", + sendDateStart:"", + sendDateEnd:"", + }, + submitLoading: false, + selectList: [], + columns: [ + { + type: "index", + width: 60, + align: "center", + }, + { + title: "鍖哄煙鍚嶇О", + key: "areaName", + width: 100, + }, + { + title: "鍒嗘鍚嶇О", + key: "areaSectionName", + width: 100, + }, + { + title: "杞︾墝鍙�", + key: "carNo", + width: 100, + }, + { + title: "閫佽揣浜�", + key: "userName", + width: 100, + }, + { + title: "瀹㈡埛鍚嶇О", + key: "customerName", + width: 100, + }, + { + title: "鏀惰揣浜哄鍚�", + key: "customerReceiveName", + width: 100, + }, + { + title: "鏀惰揣鏃堕棿", + key: "receiveTime", + render: (h, params) => { + let data=params.row.receiveTime + return h('span', data.substring(0,19)) + } + }, + { + title: '鎺ユ敹浜哄師鍥�', + align: "center", + width: 200, + slot: "img", + render: (h, params) => { + + return h('div', { + attrs: { + style: 'width: 100px;' + } + }, [ + h('img', { + attrs: { + src: params.row.receiveImg || null, + style: 'width: 100px;' + }, + props: { + type: 'primary', + size: 'large' + } + }) + ]) + } + }, + { + title: '璐х墿鍥�,鎺ユ敹浜哄浘', + align: "center", + width: 250, + slot: "img", + render: (h, params) => { + let data=params.row.imgs.split(",") + let datas=[] + for(let i=0;i<data.length;i++){ + datas.push(h('div', { + attrs: { + style: 'float:left' + } + }, [ + h('img', { + attrs: { + src: data[i] || null, + style: 'width: 100px;' + }, + props: { + type: 'primary', + size: 'large' + } + }) + ])) + } + return datas + } + }, + { + title: "鍙戣揣鏃ユ湡", + key: "sendDate", + render: (h, params) => { + let data=params.row.sendDate + return h('span', data.substring(0,10)) + } + }, + { + title: "璁㈠崟鏃ユ湡", + key: "orderDate", + render: (h, params) => { + let data=params.row.orderDate + return h('span', data.substring(0,10)) + } + }, + { + title: '鎿嶄綔', + slot: 'action' + } + ], + data: [], + total: 0, + }; + }, + methods: { + handleImageClick(e) { + console.log(e.target.src); + }, + getImg(html) { + let newHtml = []; + if (html.indexOf('http') === -1) { + if (typeof html == 'string' && html.indexOf(',') !== -1) { + newHtml = html.split(',').slice(0, 2); + return newHtml; + } + newHtml.push(html); + return newHtml; + } else { + if (typeof html == 'string' && html.indexOf(',') !== -1) { + newHtml = html.split(',').slice(0, 2).map(v => '/xboot' + v.split('/xboot')[1]) + return newHtml; + } + let result = '/xboot' + html.split('/xboot')[1] + newHtml.push(result); + return newHtml; + } + }, + + init() { + }, + init2() { + + this.getDataList2(); + }, + time1(e) { + this.searchForm2.sendDateStart = e; + }, + time2(e){ + this.searchForm2.sendDateEnd=e + }, + changePage(v) { + this.searchForm2.pageNum = v; + this.getDataList2(); + this.clearSelectAll(); + }, + changePageSize(v) { + this.searchForm2.pageSize = v; + this.getDataList2(); + }, + getDataList2() { + this.loading = true; + console.log(this.searchForm2); + getByPageImgs(this.searchForm2).then((res) => { + this.loading = false; + console.log(res); + if (res.success) { + this.data = res.result.records; + + this.total = res.result.total; + } + }); + }, + handleEdit(data,index){ + console.log(data,index) + this.modalTitle = "鏌ョ湅鍥剧墖"; + this.roleModalVisible = true; + this.firstimg=data.receiveImg + this.secondimg=data.imgs.split(",")[1] + }, + edit(v) { + this.modalType = 1; + this.modalTitle = "鐢靛瓙绛炬敹鍗�"; + this.$refs.carForm.resetFields(); + // 杞崲null涓�"" + for (let attr in v) { + if (v[attr] == null) { + v[attr] = ""; + } + } + let str = JSON.stringify(v); + let roleInfo = JSON.parse(str); + this.carForm = roleInfo; + this.modalVisible = true; + }, + }, + mounted() { + this.maxHeight = Number(document.documentElement.clientHeight - 121) + "px"; + this.init(); + }, +}; +</script> -- Gitblit v1.9.1