|
@@ -105,6 +105,15 @@
|
|
<i class="el-icon-document"></i>签收抵达</el-button
|
|
<i class="el-icon-document"></i>签收抵达</el-button
|
|
>
|
|
>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
+ <el-form-item v-if="isShowOperate">
|
|
|
|
+ <el-button
|
|
|
|
+ type="primary"
|
|
|
|
+ @click="batchCarrier()"
|
|
|
|
+ v-if="!notRoutList.includes('batchCarrier')"
|
|
|
|
+ >
|
|
|
|
+ <i class="el-icon-share"></i>批量授权</el-button
|
|
|
|
+ >
|
|
|
|
+ </el-form-item>
|
|
<el-form-item>
|
|
<el-form-item>
|
|
<label
|
|
<label
|
|
class="el-form-item__label"
|
|
class="el-form-item__label"
|
|
@@ -134,7 +143,14 @@
|
|
id="salesLogisticsStat_saleSteelReports_table"
|
|
id="salesLogisticsStat_saleSteelReports_table"
|
|
individual-panel
|
|
individual-panel
|
|
@resetTable="reset"
|
|
@resetTable="reset"
|
|
|
|
+ @selection-change="handleSelectionChange()"
|
|
>
|
|
>
|
|
|
|
+ <el-table-column
|
|
|
|
+ type="selection"
|
|
|
|
+ width="30"
|
|
|
|
+ label="选择"
|
|
|
|
+ v-if="!notRoutList.includes('select')"
|
|
|
|
+ ></el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
width="50"
|
|
width="50"
|
|
label="序号"
|
|
label="序号"
|
|
@@ -169,7 +185,6 @@
|
|
column-key="consigneeName"
|
|
column-key="consigneeName"
|
|
:filters="filterConsigneeList"
|
|
:filters="filterConsigneeList"
|
|
sortable
|
|
sortable
|
|
- show-overflow-tooltip
|
|
|
|
>
|
|
>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
@@ -1097,6 +1112,23 @@
|
|
<el-dialog :visible.sync="dialogVisible" width="80%">
|
|
<el-dialog :visible.sync="dialogVisible" width="80%">
|
|
<img width="100%" :src="dialogImageUrl" alt="" />
|
|
<img width="100%" :src="dialogImageUrl" alt="" />
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
+ <el-dialog :visible.sync="batchCarrierVisible" width="30%" center>
|
|
|
|
+ <div>批量授权承运商</div>
|
|
|
|
+ <el-form>
|
|
|
|
+ <el-form-item>
|
|
|
|
+ <el-autocomplete
|
|
|
|
+ style="width:250px"
|
|
|
|
+ v-model="batchCarrierName"
|
|
|
|
+ :fetch-suggestions="querySearchCarrier"
|
|
|
|
+ placeholder="请输入承运商"
|
|
|
|
+ @select="handleSelectCarrier"
|
|
|
|
+ >
|
|
|
|
+ </el-autocomplete>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-form>
|
|
|
|
+ <el-button @click="batchCarrierVisible = false">取 消</el-button>
|
|
|
|
+ <el-button type="primary" @click="batchCarrierMakeSure">确 定</el-button>
|
|
|
|
+ </el-dialog>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -1113,6 +1145,8 @@ export default {
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ batchCarrierName: null,
|
|
|
|
+ batchCarrierVisible: false,
|
|
batchAddressProvince: '',
|
|
batchAddressProvince: '',
|
|
batchAddressDistrict: '',
|
|
batchAddressDistrict: '',
|
|
batchAddressTown: '',
|
|
batchAddressTown: '',
|
|
@@ -1321,6 +1355,7 @@ export default {
|
|
originalAddress: null,
|
|
originalAddress: null,
|
|
aaadrawer: false,
|
|
aaadrawer: false,
|
|
downloadCapacityNo: null,
|
|
downloadCapacityNo: null,
|
|
|
|
+ batchCarrierList: [],
|
|
ops: {
|
|
ops: {
|
|
vuescroll: {},
|
|
vuescroll: {},
|
|
scrollPanel: {},
|
|
scrollPanel: {},
|
|
@@ -1355,7 +1390,9 @@ export default {
|
|
'closeOrder',
|
|
'closeOrder',
|
|
'materialNum',
|
|
'materialNum',
|
|
'closeEntry',
|
|
'closeEntry',
|
|
- 'capacityNo'
|
|
|
|
|
|
+ 'capacityNo',
|
|
|
|
+ 'batchCarrier',
|
|
|
|
+ 'select'
|
|
]
|
|
]
|
|
}
|
|
}
|
|
//只要涉及提交即必须设计防抖,在初始化时绑定防抖函数
|
|
//只要涉及提交即必须设计防抖,在初始化时绑定防抖函数
|
|
@@ -1437,6 +1474,70 @@ export default {
|
|
},
|
|
},
|
|
computed: {},
|
|
computed: {},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ batchCarrierMakeSure() {
|
|
|
|
+ console.log(this.batchCarrierName)
|
|
|
|
+ let batchCarrierId = null
|
|
|
|
+ this.carrierList.forEach(item => {
|
|
|
|
+ if (item.carrierName == this.batchCarrierName) {
|
|
|
|
+ batchCarrierId = item.carrierId
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ this.batchCarrierList.forEach(e => {
|
|
|
|
+ e.carrierId = batchCarrierId
|
|
|
|
+ })
|
|
|
|
+ const loading = this.$loading({
|
|
|
|
+ lock: true,
|
|
|
|
+ text: '正在批量授权承运商',
|
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
|
+ background: 'rgba(0, 0, 0, 0.7)'
|
|
|
|
+ })
|
|
|
|
+ this.axios
|
|
|
|
+ .post('/api/v1/ams/dispatchToCarrier', this.batchCarrierList)
|
|
|
|
+ .then(res => {
|
|
|
|
+ if (res.data.code == '0') {
|
|
|
|
+ this.$message.success('授权承运商成功')
|
|
|
|
+ this.batchCarrierList = []
|
|
|
|
+ this.batchCarrierVisible = false
|
|
|
|
+ this.getSteelReport()
|
|
|
|
+ loading.close()
|
|
|
|
+ } else {
|
|
|
|
+ this.$message.error('授权失败,请联系管理员')
|
|
|
|
+ this.batchCarrierList = []
|
|
|
|
+ this.batchCarrierVisible = false
|
|
|
|
+ this.getSteelReport()
|
|
|
|
+ loading.close()
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ .catch(() => {
|
|
|
|
+ this.$message.error('授权失败,请联系管理员')
|
|
|
|
+ this.batchCarrierList = []
|
|
|
|
+ this.batchCarrierVisible = false
|
|
|
|
+ this.getSteelReport()
|
|
|
|
+ loading.close()
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ batchCarrier() {
|
|
|
|
+ if (this.batchCarrierList.length > 0) {
|
|
|
|
+ this.batchCarrierVisible = true
|
|
|
|
+ } else {
|
|
|
|
+ this.$message({
|
|
|
|
+ type: 'warning',
|
|
|
|
+ message: '请选择要批量授权的订单',
|
|
|
|
+ offset: '250',
|
|
|
|
+ duration: '2500'
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ handleSelectionChange() {
|
|
|
|
+ console.log(this.$refs.tableRef.selection, 'selection')
|
|
|
|
+ this.batchCarrierList = []
|
|
|
|
+ this.batchCarrierList = this.$refs.tableRef.selection.map(e => {
|
|
|
|
+ let map = {}
|
|
|
|
+ map.saleOrderMaterialId = e.saleOrderMaterialId
|
|
|
|
+ return map
|
|
|
|
+ })
|
|
|
|
+ console.log(this.batchCarrierList)
|
|
|
|
+ },
|
|
receiveClick(src, title) {
|
|
receiveClick(src, title) {
|
|
// this.dialogImageUrl = src
|
|
// this.dialogImageUrl = src
|
|
downloadFile(src, `${this.downloadCapacityNo}${title}照片`, '.jpg')
|
|
downloadFile(src, `${this.downloadCapacityNo}${title}照片`, '.jpg')
|