|
|
@@ -12,159 +12,84 @@
|
|
|
<el-form-item>
|
|
|
<el-button @click="queryData()">查询</el-button>
|
|
|
<el-button v-if="isAuth('order:deliver:add')" type="primary" @click="addHandle()">新增发货单</el-button>
|
|
|
- <el-button v-if="isAuth('order:deliver:noteChangeConfig')" type="primary" @click="setNoticeChangeHandel()">发货通知人设置</el-button>
|
|
|
+ <el-button v-if="isAuth('order:deliver:noteChangeConfig')" type="primary"
|
|
|
+ @click="setNoticeChangeHandel()">发货通知人设置</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
- <el-table
|
|
|
- :data="dataList"
|
|
|
- border
|
|
|
- v-loading="dataListLoading"
|
|
|
- @selection-change="selectionChangeHandle"
|
|
|
+ <el-table :data="dataList" border v-loading="dataListLoading" @selection-change="selectionChangeHandle"
|
|
|
style="width: 100%;">
|
|
|
- <el-table-column
|
|
|
- label="序号"
|
|
|
- type="index"
|
|
|
- width="50"
|
|
|
- align="center">
|
|
|
+ <el-table-column label="序号" type="index" width="50" align="center">
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="projectName"
|
|
|
- header-align="center"
|
|
|
- align="center"
|
|
|
- min-width="140"
|
|
|
- :show-tooltip-when-overflow="true"
|
|
|
- label="项目名称">
|
|
|
+ <el-table-column prop="projectName" header-align="center" align="center" min-width="140"
|
|
|
+ :show-tooltip-when-overflow="true" label="项目名称">
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="customerName"
|
|
|
- header-align="center"
|
|
|
- align="center"
|
|
|
- min-width="140"
|
|
|
- :show-tooltip-when-overflow="true"
|
|
|
- label="客户名称">
|
|
|
+ <el-table-column prop="customerName" header-align="center" align="center" min-width="140"
|
|
|
+ :show-tooltip-when-overflow="true" label="客户名称">
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="productName"
|
|
|
- header-align="center"
|
|
|
- align="center"
|
|
|
- min-width="140"
|
|
|
- :show-tooltip-when-overflow="true"
|
|
|
- label="物料名称">
|
|
|
+ <el-table-column prop="productName" header-align="center" align="center" min-width="140"
|
|
|
+ :show-tooltip-when-overflow="true" label="物料名称">
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="productSpec"
|
|
|
- header-align="center"
|
|
|
- align="center"
|
|
|
- min-width="160"
|
|
|
- :show-tooltip-when-overflow="true"
|
|
|
- label="规格">
|
|
|
+ <el-table-column prop="productSpec" header-align="center" align="center" min-width="160"
|
|
|
+ :show-tooltip-when-overflow="true" label="规格">
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="deliverCnt"
|
|
|
- header-align="center"
|
|
|
- align="center"
|
|
|
- min-width="160"
|
|
|
- :show-tooltip-when-overflow="true"
|
|
|
- label="送货数量">
|
|
|
+ <el-table-column prop="deliverCnt" header-align="center" align="center" min-width="160"
|
|
|
+ :show-tooltip-when-overflow="true" label="送货数量">
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="arriveCnt"
|
|
|
- header-align="center"
|
|
|
- align="center"
|
|
|
- min-width="120"
|
|
|
- :show-overflow-tooltip="true"
|
|
|
- label="送达数量">
|
|
|
+ <el-table-column prop="arriveCnt" header-align="center" align="center" min-width="120"
|
|
|
+ :show-overflow-tooltip="true" label="送达数量">
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="price"
|
|
|
- header-align="center"
|
|
|
- align="center"
|
|
|
- min-width="160"
|
|
|
- :show-tooltip-when-overflow="true"
|
|
|
- label="总价">
|
|
|
+ <el-table-column prop="price" header-align="center" align="center" min-width="160"
|
|
|
+ :show-tooltip-when-overflow="true" label="总价">
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="notes"
|
|
|
- header-align="center"
|
|
|
- align="center"
|
|
|
- min-width="160"
|
|
|
- :show-tooltip-when-overflow="true"
|
|
|
- label="备注">
|
|
|
+ <el-table-column prop="notes" header-align="center" align="center" min-width="160"
|
|
|
+ :show-tooltip-when-overflow="true" label="备注">
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="state"
|
|
|
- header-align="center"
|
|
|
- align="center"
|
|
|
- min-width="160"
|
|
|
- label="状态">
|
|
|
- >
|
|
|
- <template slot-scope="scope">{{stateFormat(scope.row)}}</template>
|
|
|
+ <el-table-column prop="state" header-align="center" align="center" min-width="160" label="状态">
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">{{ stateFormat(scope.row) }}</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="consignmentDate"
|
|
|
- header-align="center"
|
|
|
- align="center"
|
|
|
- min-width="160"
|
|
|
- label="发货时间">
|
|
|
+ <el-table-column prop="consignmentDate" header-align="center" align="center" min-width="160" label="发货时间">
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="arriveDate"
|
|
|
- header-align="center"
|
|
|
- align="center"
|
|
|
- min-width="160"
|
|
|
- label="送达时间">
|
|
|
+ <el-table-column prop="arriveDate" header-align="center" align="center" min-width="160" label="送达时间">
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- header-align="center"
|
|
|
- align="center"
|
|
|
- label="签收附件">
|
|
|
+ <el-table-column header-align="center" align="center" label="签收附件">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-button :disabled="!scope.row.attachList || scope.row.attachList.length === 0" type="text" size="small" @click="attachDetails(scope.row)">查看</el-button>
|
|
|
+ <el-button :disabled="!scope.row.attachList || scope.row.attachList.length === 0" type="text" size="small"
|
|
|
+ @click="attachDetails(scope.row)">查看</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="recordCode"
|
|
|
- header-align="center"
|
|
|
- align="center"
|
|
|
- min-width="160"
|
|
|
- label="出库单编码">
|
|
|
+ <el-table-column prop="recordCode" header-align="center" align="center" min-width="160" label="出库单编码">
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- fixed="right"
|
|
|
- header-align="center"
|
|
|
- align="center"
|
|
|
- width="180"
|
|
|
- label="操作">
|
|
|
+ <el-table-column fixed="right" header-align="center" align="center" width="180" label="操作">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-button v-if="isAuth('order:deliver:info')" type="text" size="small" @click="detailHandle(scope.row)">查看</el-button>
|
|
|
- <el-button v-if="isAuth('order:deliver:send') && Number(scope.row.state) === 1" type="text" size="small" @click="sendHandle(scope.row.deliverId)">导出</el-button>
|
|
|
- <el-button v-if="isAuth('order:deliver:arrive') && Number(scope.row.state) === 1" type="text" size="small" @click="arriveHandle(scope.row.deliverId)">送达</el-button>
|
|
|
- <el-button v-if="isAuth('order:deliver:delete') && Number(scope.row.state) === 1" type="text" size="small" @click="arriveHandle(scope.row.deliverId)">删除</el-button>
|
|
|
+ <el-button v-if="isAuth('order:deliver:info')" type="text" size="small"
|
|
|
+ @click="detailHandle(scope.row)">查看</el-button>
|
|
|
+ <el-button v-if="isAuth('order:deliver:send') && Number(scope.row.state) === 1" type="text" size="small"
|
|
|
+ @click="sendHandle(scope.row.deliverId)">导出</el-button>
|
|
|
+ <el-button v-if="isAuth('order:deliver:arrive') && Number(scope.row.state) === 1" type="text" size="small"
|
|
|
+ @click="arriveHandle(scope.row.deliverId)">送达</el-button>
|
|
|
+ <el-button v-if="isAuth('order:deliver:delete') && Number(scope.row.state) === 1" type="text" size="small"
|
|
|
+ @click="arriveHandle(scope.row.deliverId)">删除</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
- <el-pagination
|
|
|
- @size-change="sizeChangeHandle"
|
|
|
- @current-change="currentChangeHandle"
|
|
|
- :current-page="pageIndex"
|
|
|
- :page-sizes="[10, 20, 50, 100]"
|
|
|
- :page-size="pageSize"
|
|
|
- :total="totalPage"
|
|
|
+ <el-pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle" :current-page="pageIndex"
|
|
|
+ :page-sizes="[10, 20, 50, 100]" :page-size="pageSize" :total="totalPage"
|
|
|
layout="total, sizes, prev, pager, next, jumper">
|
|
|
</el-pagination>
|
|
|
</template>
|
|
|
- <dispatch-add v-if="addVisible" ref="add" @onChose="onChose" @refreshDataList="getDataList"/>
|
|
|
- <dispatch-detail v-if="detailVisible" ref="detail" @onChose="onChose"/>
|
|
|
+ <dispatch-add v-if="addVisible" ref="add" @onChose="onChose" @refreshDataList="getDataList" />
|
|
|
+ <dispatch-detail v-if="detailVisible" ref="detail" @onChose="onChose" />
|
|
|
<!-- 文件预览 -->
|
|
|
- <attach-detail v-if="attachVisible" ref="attachDetail" @onChose="onChose"/>
|
|
|
+ <attach-detail v-if="attachVisible" ref="attachDetail" @onChose="onChose" />
|
|
|
<!-- 发货通知设置弹窗 -->
|
|
|
- <notice-change-setting v-if="noticeChangeVisible" ref="noticeChangeSetting" @onChose="onChose"/>
|
|
|
+ <notice-change-setting v-if="noticeChangeVisible" ref="noticeChangeSetting" @onChose="onChose" />
|
|
|
<!--送达弹窗 -->
|
|
|
- <dispatch-arrived v-if="arrivedVisible" ref="arrivedPage" @onChose="onChose" @refreshDataList="getDataList"/>
|
|
|
+ <dispatch-arrived v-if="arrivedVisible" ref="arrivedPage" @onChose="onChose" @refreshDataList="getDataList" />
|
|
|
<!-- 发货详情 -->
|
|
|
<!-- <prod-management-details v-if="detailVisible" ref="detail" @onChose="onChose"/> -->
|
|
|
<!-- 确定发货 -->
|
|
|
- <dispatching v-if="dispatchVisible" ref="dispatching" @refreshDataList="getDataList"/>
|
|
|
+ <dispatching v-if="dispatchVisible" ref="dispatching" @refreshDataList="getDataList" />
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -179,7 +104,7 @@ import ProdManagementDetails from '@/views/modules/production/prod-management-de
|
|
|
import Dispatching from '@/views/modules/order/dispatching'
|
|
|
import DispatchAdd from './dispatch-add'
|
|
|
export default {
|
|
|
- // 发货管理
|
|
|
+ // 发货管理
|
|
|
name: 'dispatch',
|
|
|
components: {
|
|
|
Dispatching,
|
|
|
@@ -191,11 +116,11 @@ export default {
|
|
|
DispatchDetail,
|
|
|
DispatchAdd
|
|
|
},
|
|
|
- created () {
|
|
|
+ created() {
|
|
|
console.log(11111)
|
|
|
this.queryData()
|
|
|
},
|
|
|
- data () {
|
|
|
+ data() {
|
|
|
return {
|
|
|
dataForm: {},
|
|
|
dataList: [],
|
|
|
@@ -221,7 +146,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- onChose () {
|
|
|
+ onChose() {
|
|
|
this.attachVisible = false
|
|
|
this.noticeChangeVisible = false
|
|
|
this.arrivedVisible = false
|
|
|
@@ -229,13 +154,13 @@ export default {
|
|
|
this.dispatchVisible = false
|
|
|
this.addVisible = false
|
|
|
},
|
|
|
- // 查询
|
|
|
- queryData () {
|
|
|
+ // 查询
|
|
|
+ queryData() {
|
|
|
this.pageIndex = 1
|
|
|
this.getDataList()
|
|
|
},
|
|
|
- // 获取数据列表
|
|
|
- getDataList () {
|
|
|
+ // 获取数据列表
|
|
|
+ getDataList() {
|
|
|
this.dataListLoading = true
|
|
|
let params = {
|
|
|
'current': this.pageIndex,
|
|
|
@@ -243,7 +168,7 @@ export default {
|
|
|
'productName': this.dataForm.productName ? this.dataForm.productName : null,
|
|
|
'customerName': this.dataForm.customerName ? this.dataForm.customerName : null
|
|
|
}
|
|
|
- getDispatchList(params).then(({data}) => {
|
|
|
+ getDispatchList(params).then(({ data }) => {
|
|
|
if (data && data.code === '200') {
|
|
|
this.dataList = data.data.records
|
|
|
this.totalPage = Number(data.data.total)
|
|
|
@@ -254,65 +179,65 @@ export default {
|
|
|
this.dataListLoading = false
|
|
|
})
|
|
|
},
|
|
|
- // 每页数
|
|
|
- sizeChangeHandle (val) {
|
|
|
+ // 每页数
|
|
|
+ sizeChangeHandle(val) {
|
|
|
this.pageSize = val
|
|
|
this.pageIndex = 1
|
|
|
this.getDataList()
|
|
|
},
|
|
|
- // 当前页
|
|
|
- currentChangeHandle (val) {
|
|
|
+ // 当前页
|
|
|
+ currentChangeHandle(val) {
|
|
|
this.pageIndex = val
|
|
|
this.getDataList()
|
|
|
},
|
|
|
// 多选
|
|
|
- selectionChangeHandle (val) {
|
|
|
+ selectionChangeHandle(val) {
|
|
|
this.dataListSelections = val
|
|
|
},
|
|
|
// 详情
|
|
|
- detailHandle (row) {
|
|
|
+ detailHandle(row) {
|
|
|
this.detailVisible = true
|
|
|
this.$nextTick(() => {
|
|
|
this.$refs.detail.init(row.deliverId)
|
|
|
})
|
|
|
},
|
|
|
// 新增发货
|
|
|
- addHandle(){
|
|
|
+ addHandle() {
|
|
|
this.addVisible = true
|
|
|
this.$nextTick(() => {
|
|
|
this.$refs.add.init()
|
|
|
})
|
|
|
},
|
|
|
// 发货通知人设置
|
|
|
- setNoticeChangeHandel () {
|
|
|
+ setNoticeChangeHandel() {
|
|
|
this.noticeChangeVisible = true
|
|
|
this.$nextTick(() => {
|
|
|
this.$refs.noticeChangeSetting.init()
|
|
|
})
|
|
|
},
|
|
|
// 附件
|
|
|
- attachDetails (row) {
|
|
|
+ attachDetails(row) {
|
|
|
this.attachVisible = true
|
|
|
this.$nextTick(() => {
|
|
|
this.$refs.attachDetail.init(row.attachList)
|
|
|
})
|
|
|
},
|
|
|
// 送达
|
|
|
- arriveHandle (deliverId) {
|
|
|
+ arriveHandle(deliverId) {
|
|
|
this.arrivedVisible = true
|
|
|
this.$nextTick(() => {
|
|
|
this.$refs.arrivedPage.init(deliverId)
|
|
|
})
|
|
|
},
|
|
|
// 发货
|
|
|
- sendHandle (deliverId, cnt) {
|
|
|
+ sendHandle(deliverId, cnt) {
|
|
|
this.dispatchVisible = true
|
|
|
this.$nextTick(() => {
|
|
|
this.$refs.dispatching.init(deliverId, cnt)
|
|
|
})
|
|
|
},
|
|
|
// 转换属性“状态”
|
|
|
- stateFormat (row) {
|
|
|
+ stateFormat(row) {
|
|
|
if (this.optionsState) {
|
|
|
for (let i = 0; i < this.optionsState.length; i++) {
|
|
|
if (this.optionsState[i].code === row.state) {
|
|
|
@@ -325,6 +250,4 @@ export default {
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
-<style scoped>
|
|
|
-
|
|
|
-</style>
|
|
|
+<style scoped></style>
|