|
@@ -154,6 +154,16 @@
|
|
操作日志
|
|
操作日志
|
|
</el-button>
|
|
</el-button>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
+ <el-form-item v-if="isShowOperate">
|
|
|
|
+ <el-button
|
|
|
|
+ type="primary"
|
|
|
|
+ @click="showBatchCapacity()"
|
|
|
|
+ v-if="!notRoutList.includes('batchCapacity')"
|
|
|
|
+ >
|
|
|
|
+ <i class="el-icon-edit"></i>
|
|
|
|
+ 批量改车
|
|
|
|
+ </el-button>
|
|
|
|
+ </el-form-item>
|
|
<el-form-item>
|
|
<el-form-item>
|
|
<label
|
|
<label
|
|
class="el-form-item__label"
|
|
class="el-form-item__label"
|
|
@@ -1377,6 +1387,23 @@
|
|
<dil-table v-bind.sync="optionSaleLog"></dil-table>
|
|
<dil-table v-bind.sync="optionSaleLog"></dil-table>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
</div>
|
|
</div>
|
|
|
|
+ <el-dialog :visible.sync="batchCapacityVisible" width="30%" center>
|
|
|
|
+ <div>批量修改车牌号</div>
|
|
|
|
+ <el-form>
|
|
|
|
+ <el-form-item>
|
|
|
|
+ <el-autocomplete
|
|
|
|
+ style="width:250px"
|
|
|
|
+ v-model="capacityNo"
|
|
|
|
+ :fetch-suggestions="querySearch"
|
|
|
|
+ placeholder="请输入车牌号"
|
|
|
|
+ @select="batchCapacitySelect"
|
|
|
|
+ >
|
|
|
|
+ </el-autocomplete>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-form>
|
|
|
|
+ <el-button @click="batchCapacityVisible = false">取 消</el-button>
|
|
|
|
+ <el-button type="primary" @click="batchEditCapacity">确 定</el-button>
|
|
|
|
+ </el-dialog>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -1393,6 +1420,10 @@ export default {
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ capacityNo:null,
|
|
|
|
+ capacityId:null,
|
|
|
|
+ batchCapacityList:[],
|
|
|
|
+ batchCapacityVisible:false,
|
|
isShowSaleLog: false,
|
|
isShowSaleLog: false,
|
|
optionSaleLog: {
|
|
optionSaleLog: {
|
|
maxHeight: 400,
|
|
maxHeight: 400,
|
|
@@ -1736,7 +1767,8 @@ export default {
|
|
'select',
|
|
'select',
|
|
'exceptionHandle',
|
|
'exceptionHandle',
|
|
'mergeSplit',
|
|
'mergeSplit',
|
|
- 'saleLog'
|
|
|
|
|
|
+ 'saleLog',
|
|
|
|
+ 'batchCapacity'
|
|
]
|
|
]
|
|
this.noticeInterval = setInterval(() => {
|
|
this.noticeInterval = setInterval(() => {
|
|
this.getinformation()
|
|
this.getinformation()
|
|
@@ -1853,6 +1885,86 @@ export default {
|
|
},
|
|
},
|
|
computed: {},
|
|
computed: {},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ showBatchCapacity(){
|
|
|
|
+ this.capacityNo=null;
|
|
|
|
+ this.capacityId=null;
|
|
|
|
+ this.batchCapacityList=[];
|
|
|
|
+ console.log(this.$refs.tableRef.selection);
|
|
|
|
+ //按照saleOrderMaterialId查询物资数量
|
|
|
|
+ this.$refs.tableRef.selection.forEach(item1=>{
|
|
|
|
+ item1.size=this.visibleList.filter(item2=>{
|
|
|
|
+ return item1.saleOrderMaterialId==item2.saleOrderMaterialId
|
|
|
|
+ }).length;
|
|
|
|
+ });
|
|
|
|
+ this.batchCapacityList = this.$refs.tableRef.selection;
|
|
|
|
+ console.log(this.batchCapacityList);
|
|
|
|
+ if (this.batchCapacityList.length > 0) {
|
|
|
|
+ this.batchCapacityVisible = true
|
|
|
|
+ } else {
|
|
|
|
+ this.$message({
|
|
|
|
+ type: 'warning',
|
|
|
|
+ message: '请选择要批量更改车牌号的订单',
|
|
|
|
+ offset: '250',
|
|
|
|
+ duration: '2500'
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ batchCapacitySelect(selection){
|
|
|
|
+ console.log(selection);
|
|
|
|
+ this.capacityNo=selection.capacityNumber;
|
|
|
|
+ this.capacityId=selection.capacityId;
|
|
|
|
+ },
|
|
|
|
+ batchEditCapacity(){
|
|
|
|
+ if(this.capacityId && this.capacityNo){
|
|
|
|
+ if(!(
|
|
|
|
+ isVehicleNumber(this.capacityNo) ||this.capacityNo == '取消' ||
|
|
|
|
+ this.capacityNo == '待定' || this.capacityNo == '空白'
|
|
|
|
+ )
|
|
|
|
+ ){
|
|
|
|
+ this.$message.error('请输入正确格式的车牌号!')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ this.batchCapacityList.forEach(row=>{
|
|
|
|
+ row.capacityId = this.capacityId;
|
|
|
|
+ row.capacityNumber = this.capacityNo;
|
|
|
|
+ //是否校验GPS
|
|
|
|
+ row.isCheckGPS = this.isCheckGPS;
|
|
|
|
+ row.userId = getCookie('userId')
|
|
|
|
+ if (row.capacityIds != 0) {
|
|
|
|
+ this.axios
|
|
|
|
+ .post('/api/v1/ams/updateCapacityNumberInFactory', row)
|
|
|
|
+ .then(res => {
|
|
|
|
+ if (res.data.code == 200) {
|
|
|
|
+ console.log(res.data)
|
|
|
|
+ } else {
|
|
|
|
+ this.$message.error(res.data.data)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ if (row.carrierIds == 0) {
|
|
|
|
+ this.$message.error('请先授权承运商!')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ row.lineId = this.lineSpelling[row.size]
|
|
|
|
+ let arr = []
|
|
|
|
+ arr.push(row)
|
|
|
|
+ this.axios
|
|
|
|
+ .post('/api/v1/ams/dispatchSteelOrder', arr)
|
|
|
|
+ .then(res => {
|
|
|
|
+ if (res.data.code == '200') {
|
|
|
|
+ this.$message.success('派车成功!')
|
|
|
|
+ }else{
|
|
|
|
+ this.$message.error(res.data.data)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ this.batchCapacityVisible=false;
|
|
|
|
+ this.getSteelReport()
|
|
|
|
+ }else{
|
|
|
|
+ this.$message.warning('请先注册车牌号或者选中弹出后再提交!')
|
|
|
|
+ }
|
|
|
|
+ },
|
|
showSaleLog() {
|
|
showSaleLog() {
|
|
this.isShowSaleLog = true
|
|
this.isShowSaleLog = true
|
|
if (this.steelMap) {
|
|
if (this.steelMap) {
|