| | |
| | | import useUserInfoStore from "@/stores/userInfo"; |
| | | import {ElMessage} from "element-plus"; |
| | | import { useI18n } from 'vue-i18n' |
| | | import useOrderInfoStore from "@/stores/sd/order/orderInfo"; |
| | | |
| | | //语言获取 |
| | | const { t } = useI18n() |
| | | const orderInfo = useOrderInfoStore() |
| | | const router = useRouter() |
| | | const userStore = useUserInfoStore() |
| | | const username = userStore.user.userName |
| | |
| | | let total = reactive({ |
| | | pageTotal : 0, |
| | | dataTotal : 0, |
| | | pageSize : 10 |
| | | pageSize : 100 |
| | | }) |
| | | |
| | | |
| | | //第一次调用 |
| | | request.post(`/Delivery/getSelectOrderInventory/1/${total.pageSize}/${selectDate.value}`,filterData.value).then((res) => { |
| | | request.post(`/Delivery/getSelectOrderInventory/1/${total.pageSize}/${orderInfo.selectOrderListDate}`,filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | total.dataTotal = res.data.total.total*1 |
| | | total.pageTotal= res.data.total.pageTotal |
| | | selectDate.value = res.data.selectDate |
| | | orderInfo.selectOrderListDate = res.data.selectDate |
| | | pageNum.value=1 |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.loadData(produceList) |
| | |
| | | }else{ |
| | | filterData.value[column.property] = value |
| | | } |
| | | request.post(`/Delivery/getSelectOrderInventory/1/${total.pageSize}/${selectDate.value}`,filterData.value).then((res) => { |
| | | request.post(`/Delivery/getSelectOrderInventory/1/${total.pageSize}/${orderInfo.selectOrderListDate}`,filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | total.dataTotal = res.data.total.total*1 |
| | | total.pageTotal= res.data.total.pageTotal |
| | | selectDate.value = res.data.selectDate |
| | | orderInfo.selectOrderListDate = res.data.selectDate |
| | | pageNum.value=1 |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.loadData(produceList) |
| | |
| | | } |
| | | |
| | | const selectOrderList = ()=>{ |
| | | request.post(`/Delivery/getSelectOrderInventory/${pageNum.value}/${total.pageSize}/${selectDate.value}`,filterData.value).then((res) => { |
| | | request.post(`/Delivery/getSelectOrderInventory/${pageNum.value}/${total.pageSize}/${orderInfo.selectOrderListDate}`,filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | if (res.data.total!=null){ |
| | | total.dataTotal = res.data.total.total*1 |
| | | total.pageTotal= res.data.total.pageTotal |
| | | } |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading=false |
| | |
| | | align: 'center',//文字居中 |
| | | stripe:true,//斑马纹 |
| | | rowConfig: {isCurrent: true, isHover: true,height: 30},//鼠标移动或选择高亮 |
| | | id: 'OrderList', |
| | | id: 'SelectOrderList', |
| | | showFooter: true,//显示脚 |
| | | printConfig: {}, |
| | | importConfig: {}, |
| | |
| | | return |
| | | } |
| | | let order_id="" |
| | | const array=[]; |
| | | const customerIdArray=[]; |
| | | const projectArray=[]; |
| | | for (let i=0;i<selectRecords.length;i++){ |
| | | array.push(selectRecords[i].customerId) |
| | | customerIdArray.push(selectRecords[i].customerId) |
| | | if(selectRecords[i].project.trim().length===0){ |
| | | projectArray.push(selectRecords[i].project.trim()) |
| | | }else{ |
| | | projectArray.push(selectRecords[i].project) |
| | | } |
| | | |
| | | if(i+1===selectRecords.length){ |
| | | order_id+=selectRecords[i].orderId |
| | | }else{ |
| | |
| | | } |
| | | } |
| | | //判断所选客户是否相同 |
| | | if(!isAllEqual(array)){ |
| | | if(!isAllEqual(customerIdArray)){ |
| | | ElMessage.warning(t('delivery.pleaseSelectTheSameCustomerOrder')) |
| | | return |
| | | } |
| | | //判断所选项目是否相同 |
| | | if(!isAllEqual(projectArray)){ |
| | | ElMessage.warning(t('delivery.pleaseSelectTheSameCustomerProject')) |
| | | return |
| | | } |
| | | |
| | |
| | | |
| | | <template> |
| | | <div style="width: 100%;height: 100%"> |
| | | <el-date-picker |
| | | v-model="selectDate" |
| | | type="daterange" |
| | | start-placeholder="开始时间" |
| | | end-placeholder="结束时间" |
| | | format="YYYY-MM-DD" |
| | | value-format="YYYY-MM-DD" |
| | | <div class="head"> |
| | | <el-date-picker |
| | | v-model="orderInfo.selectOrderListDate" |
| | | type="daterange" |
| | | :start-placeholder="$t('basicData.startDate')" |
| | | :end-placeholder="$t('basicData.endDate')" |
| | | format="YYYY-MM-DD" |
| | | value-format="YYYY-MM-DD" |
| | | |
| | | /> |
| | | <el-button @click="changeDate" style="margin-top: -5px" id="searchButton" type="primary" :icon="Search">{{$t('basicData.search')}}</el-button> |
| | | <vxe-grid |
| | | max-height="97%" |
| | | class="mytable-scrollbar" |
| | | @filter-change="filterChanged" |
| | | ref="xGrid" |
| | | v-bind="gridOptions" |
| | | v-on="gridEvents" |
| | | /> |
| | | <el-button @click="changeDate" style="margin-top: -5px" id="searchButton" type="primary" :icon="Search">{{$t('basicData.search')}}</el-button> |
| | | </div> |
| | | <div class="main-table"> |
| | | <vxe-grid |
| | | max-height="100%" |
| | | class="mytable-scrollbar" |
| | | @filter-change="filterChanged" |
| | | ref="xGrid" |
| | | v-bind="gridOptions" |
| | | v-on="gridEvents" |
| | | |
| | | > |
| | | <!-- 下拉显示所有信息插槽--> |
| | | <template #content="{ row }"> |
| | | <ul class="expand-wrapper"> |
| | | <li v-for="(item,index) in gridOptions.columns" v-show="item.field!=undefined "> |
| | | <span style="font-weight: bold">{{item.title+': '}}</span> |
| | | <span>{{ row[item.field] }}</span> |
| | | </li> |
| | | </ul> |
| | | </template> |
| | | > |
| | | <!-- 下拉显示所有信息插槽--> |
| | | <template #content="{ row }"> |
| | | <ul class="expand-wrapper"> |
| | | <li v-for="(item,index) in gridOptions.columns" v-show="item.field!=undefined "> |
| | | <span style="font-weight: bold">{{item.title+': '}}</span> |
| | | <span>{{ row[item.field] }}</span> |
| | | </li> |
| | | </ul> |
| | | </template> |
| | | |
| | | <template #state="{ row,column}"> |
| | | <el-checkbox @click.native.prevent :indeterminate="row[column.field]===1" :checked="row[column.field]===2"/> |
| | | </template> |
| | | <template #state="{ row,column}"> |
| | | <el-checkbox @click.native.prevent :indeterminate="row[column.field]===1" :checked="row[column.field]===2"/> |
| | | </template> |
| | | |
| | | <!--左边固定显示的插槽--> |
| | | <template #button_slot="{ row }"> |
| | | <el-button @click="getTableRow(row,'edit')" link type="primary" size="small">{{$t('basicData.edit')}}</el-button> |
| | | <el-button @click="getTableRow(row,'delete')" link type="primary" size="small">{{$t('basicData.delete')}}</el-button> |
| | | </template> |
| | | <!--左边固定显示的插槽--> |
| | | <template #button_slot="{ row }"> |
| | | <el-button @click="getTableRow(row,'edit')" link type="primary" size="small">{{$t('basicData.edit')}}</el-button> |
| | | <el-button @click="getTableRow(row,'delete')" link type="primary" size="small">{{$t('basicData.delete')}}</el-button> |
| | | </template> |
| | | |
| | | <template #num1_filter="{ column, $panel }"> |
| | | <div> |
| | | <div v-for="(option, index) in column.filters" :key="index"> |
| | | <input type="type" v-model="option.data" @input="changeFilterEvent($event, option, $panel)"/> |
| | | <template #num1_filter="{ column, $panel }"> |
| | | <div> |
| | | <div v-for="(option, index) in column.filters" :key="index"> |
| | | <input type="type" v-model="option.data" @input="changeFilterEvent($event, option, $panel)"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | </template> |
| | | |
| | | <template #pager> |
| | | <!--使用 pager 插槽--> |
| | | <vxe-pager |
| | | @page-change="handlePageChange" |
| | | :layouts="[ 'PrevPage', 'Jump','PageCount', 'NextPage', 'Total']" |
| | | v-model:current-page="pageNum" |
| | | v-model:page-size="total.pageSize" |
| | | v-model:pager-count="total.pageTotal" |
| | | :total="total.dataTotal" |
| | | > |
| | | </vxe-pager> |
| | | </template> |
| | | </vxe-grid> |
| | | <template #pager> |
| | | <!--使用 pager 插槽--> |
| | | <vxe-pager |
| | | @page-change="handlePageChange" |
| | | :layouts="[ 'PrevPage', 'Jump','PageCount', 'NextPage', 'Total']" |
| | | v-model:current-page="pageNum" |
| | | v-model:page-size="total.pageSize" |
| | | v-model:pager-count="total.pageTotal" |
| | | :total="total.dataTotal" |
| | | > |
| | | </vxe-pager> |
| | | </template> |
| | | </vxe-grid> |
| | | </div> |
| | | |
| | | |
| | | |
| | | </div> |
| | | </template> |
| | | |
| | | <style scoped> |
| | | .head{ |
| | | width: 100%; |
| | | height: 35px; |
| | | } |
| | | |
| | | .main-table{ |
| | | width: 100%; |
| | | height: calc(100% - 35px); |
| | | } |
| | | </style> |