|
@@ -8,7 +8,9 @@
|
|
clearable
|
|
clearable
|
|
></el-input>
|
|
></el-input>
|
|
<el-button type="primary" @click="onclick">查询</el-button>
|
|
<el-button type="primary" @click="onclick">查询</el-button>
|
|
- <el-button type="primary" @click="back">返回</el-button>
|
|
|
|
|
|
+ <el-button type="primary" @click="back" icon="el-icon-d-arrow-left"
|
|
|
|
+ >返回</el-button
|
|
|
|
+ >
|
|
</div>
|
|
</div>
|
|
<!-- //物资模态框多选 -->
|
|
<!-- //物资模态框多选 -->
|
|
<div class="edrwer">
|
|
<div class="edrwer">
|
|
@@ -66,6 +68,62 @@
|
|
</div>
|
|
</div>
|
|
</el-drawer>
|
|
</el-drawer>
|
|
</div>
|
|
</div>
|
|
|
|
+ <!-- //物资模态框单选 -->
|
|
|
|
+ <div class="edrwer">
|
|
|
|
+ <!-- 物资选择模态框 -->
|
|
|
|
+ <el-drawer
|
|
|
|
+ title="选择物资信息"
|
|
|
|
+ :visible.sync="currentTable"
|
|
|
|
+ direction="rtl"
|
|
|
|
+ size="90%"
|
|
|
|
+ :show-close="true"
|
|
|
|
+ >
|
|
|
|
+ <el-form :inline="true" style="margin-top: 0.5rem;">
|
|
|
|
+ <el-form-item>
|
|
|
|
+ <label class="el-form-item__label" style="width: auto;"
|
|
|
|
+ >物资名称/型号</label
|
|
|
|
+ >
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item>
|
|
|
|
+ <el-input
|
|
|
|
+ placeholder="请输入物资名称或型号"
|
|
|
|
+ v-model="materialNameText"
|
|
|
|
+ clearable
|
|
|
|
+ ></el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item>
|
|
|
|
+ <label class="el-form-item__label" style="width: auto;">规格</label>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item>
|
|
|
|
+ <el-input
|
|
|
|
+ placeholder="请输入内容"
|
|
|
|
+ v-model="materialSpecificationText"
|
|
|
|
+ clearable
|
|
|
|
+ ><template slot="prepend">Φ</template></el-input
|
|
|
|
+ >
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-button
|
|
|
|
+ type="primary"
|
|
|
|
+ class="btn"
|
|
|
|
+ @click="onclick1"
|
|
|
|
+ style="margin-left: 4px;"
|
|
|
|
+ ><i class="el-icon-search"></i>查询</el-button
|
|
|
|
+ >
|
|
|
|
+ <el-button type="primary" @click="makeSureChange"
|
|
|
|
+ ><i class="el-icon-check"></i>确定</el-button
|
|
|
|
+ >
|
|
|
|
+ </el-form>
|
|
|
|
+ <div class="tablecls">
|
|
|
|
+ <!-- 查询所有的物资 -->
|
|
|
|
+ <dilTable
|
|
|
|
+ v-bind.sync="option1"
|
|
|
|
+ @radio-change="currentRadioChange"
|
|
|
|
+ @rowDbClick="rowDbClick1"
|
|
|
|
+ >
|
|
|
|
+ </dilTable>
|
|
|
|
+ </div>
|
|
|
|
+ </el-drawer>
|
|
|
|
+ </div>
|
|
<div class="table">
|
|
<div class="table">
|
|
<el-table
|
|
<el-table
|
|
:data="tableData"
|
|
:data="tableData"
|
|
@@ -113,7 +171,8 @@
|
|
<el-dialog
|
|
<el-dialog
|
|
:title="title"
|
|
:title="title"
|
|
:visible.sync="dialogTableVisible"
|
|
:visible.sync="dialogTableVisible"
|
|
- style="width:100%"
|
|
|
|
|
|
+ :center="true"
|
|
|
|
+ width="1100px"
|
|
>
|
|
>
|
|
<div class="errorMaterial">
|
|
<div class="errorMaterial">
|
|
<el-button @click="openDrawer" type="primary">新增拼数</el-button>
|
|
<el-button @click="openDrawer" type="primary">新增拼数</el-button>
|
|
@@ -131,6 +190,7 @@
|
|
:key="i"
|
|
:key="i"
|
|
:prop="item.prop"
|
|
:prop="item.prop"
|
|
:label="item.label"
|
|
:label="item.label"
|
|
|
|
+ :width="item.width"
|
|
align="center"
|
|
align="center"
|
|
show-overflow-tooltip
|
|
show-overflow-tooltip
|
|
>
|
|
>
|
|
@@ -145,6 +205,11 @@
|
|
disabled
|
|
disabled
|
|
>
|
|
>
|
|
</el-input>
|
|
</el-input>
|
|
|
|
+ <el-button
|
|
|
|
+ type="primary"
|
|
|
|
+ @click="changeMaterial(scope.$index)"
|
|
|
|
+ >更改</el-button
|
|
|
|
+ >
|
|
</template>
|
|
</template>
|
|
<!-- 物资件数 -->
|
|
<!-- 物资件数 -->
|
|
<template v-if="item.prop == 'orderPlanWeight'">
|
|
<template v-if="item.prop == 'orderPlanWeight'">
|
|
@@ -157,6 +222,7 @@
|
|
<!-- 米数 -->
|
|
<!-- 米数 -->
|
|
<template v-if="item.prop == 'meterNumber'">
|
|
<template v-if="item.prop == 'meterNumber'">
|
|
<el-input
|
|
<el-input
|
|
|
|
+ v-if="scope.row.haveMeter == 1"
|
|
:disabled="scope.row.isDisable == 1"
|
|
:disabled="scope.row.isDisable == 1"
|
|
class="textinput111"
|
|
class="textinput111"
|
|
v-model.number="scope.row.meterNumber"
|
|
v-model.number="scope.row.meterNumber"
|
|
@@ -210,12 +276,92 @@
|
|
</div>
|
|
</div>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
</div>
|
|
</div>
|
|
|
|
+ <div class="addressDialog">
|
|
|
|
+ <!-- 收货地址弹出框 -->
|
|
|
|
+ <el-dialog title="收货地址" :visible.sync="addressDialog" width="90%">
|
|
|
|
+ <div class="addressItem">
|
|
|
|
+ <el-form :inline="true">
|
|
|
|
+ <el-form-item>
|
|
|
|
+ <label class="el-form-item__label" style="width: auto;">省</label>
|
|
|
|
+ <el-select
|
|
|
|
+ v-model="province"
|
|
|
|
+ filterable
|
|
|
|
+ placeholder="请选择"
|
|
|
|
+ @change="onchangeProvince"
|
|
|
|
+ >
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="item in provinceList"
|
|
|
|
+ :key="item.id"
|
|
|
|
+ :label="item.addressProvince"
|
|
|
|
+ :value="item.id"
|
|
|
|
+ ></el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item>
|
|
|
|
+ <label class="el-form-item__label" style="width: auto;">市</label>
|
|
|
|
+ <el-select
|
|
|
|
+ v-model="city"
|
|
|
|
+ filterable
|
|
|
|
+ placeholder="请选择"
|
|
|
|
+ @change="onchangeCity"
|
|
|
|
+ >
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="item in cityList"
|
|
|
|
+ :key="item.id"
|
|
|
|
+ :label="item.addressDistrict"
|
|
|
|
+ :value="item.id"
|
|
|
|
+ ></el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item>
|
|
|
|
+ <label class="el-form-item__label" style="width: auto;"
|
|
|
|
+ >县(区)</label
|
|
|
|
+ >
|
|
|
|
+ <el-select
|
|
|
|
+ v-model="county"
|
|
|
|
+ filterable
|
|
|
|
+ placeholder="请选择"
|
|
|
|
+ @change="onchangeCounty"
|
|
|
|
+ >
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="item in countyList"
|
|
|
|
+ :key="item.id"
|
|
|
|
+ :label="item.addressTown"
|
|
|
|
+ :value="item.id"
|
|
|
|
+ ></el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item>
|
|
|
|
+ <label class="el-form-item__label" style="width: auto;"
|
|
|
|
+ >具体收货地址</label
|
|
|
|
+ >
|
|
|
|
+ <el-autocomplete
|
|
|
|
+ class="inline-input"
|
|
|
|
+ v-model="place"
|
|
|
|
+ :fetch-suggestions="querySearch1"
|
|
|
|
+ placeholder="请输入具体收货地址"
|
|
|
|
+ :trigger-on-focus="false"
|
|
|
|
+ @select="handleSelect1"
|
|
|
|
+ >
|
|
|
|
+ </el-autocomplete>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-form>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <div slot="footer" class="button-box">
|
|
|
|
+ <el-button @click="addressDialog = false">取 消</el-button>
|
|
|
|
+ <el-button type="primary" @click="addAddressClick">确定</el-button>
|
|
|
|
+ </div>
|
|
|
|
+ </el-dialog>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
<script>
|
|
<script>
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ addressDialog: false,
|
|
|
|
+ currentTable: false,
|
|
title: "",
|
|
title: "",
|
|
capacityNumber: null,
|
|
capacityNumber: null,
|
|
//是否磅重销售
|
|
//是否磅重销售
|
|
@@ -244,10 +390,17 @@ export default {
|
|
//物资表格多选
|
|
//物资表格多选
|
|
option: {
|
|
option: {
|
|
// 表格请求数据的地址
|
|
// 表格请求数据的地址
|
|
- requestUrl: "/api/v1/uc/getSteelMaterial?apiId=244",
|
|
|
|
|
|
+ requestUrl: "",
|
|
// 控制显示多选列
|
|
// 控制显示多选列
|
|
selectionType: "select"
|
|
selectionType: "select"
|
|
},
|
|
},
|
|
|
|
+ //物资表格单选
|
|
|
|
+ option1: {
|
|
|
|
+ // 表格请求数据的地址
|
|
|
|
+ requestUrl: "",
|
|
|
|
+ // 控制显示单选列
|
|
|
|
+ selectionType: "radio"
|
|
|
|
+ },
|
|
materialSpecificationText: null,
|
|
materialSpecificationText: null,
|
|
materialNameText: null,
|
|
materialNameText: null,
|
|
spanArr: [],
|
|
spanArr: [],
|
|
@@ -255,47 +408,374 @@ export default {
|
|
{
|
|
{
|
|
prop: "capacityNumber",
|
|
prop: "capacityNumber",
|
|
label: "车牌号",
|
|
label: "车牌号",
|
|
- width: "80"
|
|
|
|
|
|
+ width: "100px"
|
|
},
|
|
},
|
|
{
|
|
{
|
|
prop: "materialName",
|
|
prop: "materialName",
|
|
label: "物资名称",
|
|
label: "物资名称",
|
|
- width: "90",
|
|
|
|
|
|
+ width: "400px",
|
|
slot: true
|
|
slot: true
|
|
},
|
|
},
|
|
{
|
|
{
|
|
prop: "meterNumber",
|
|
prop: "meterNumber",
|
|
label: "米数",
|
|
label: "米数",
|
|
- width: "60",
|
|
|
|
|
|
+ width: "100px",
|
|
slot: true
|
|
slot: true
|
|
},
|
|
},
|
|
{
|
|
{
|
|
prop: "Specification",
|
|
prop: "Specification",
|
|
label: "规格型号",
|
|
label: "规格型号",
|
|
- width: "140"
|
|
|
|
|
|
+ width: "140px"
|
|
},
|
|
},
|
|
{
|
|
{
|
|
prop: "orderPlanWeight",
|
|
prop: "orderPlanWeight",
|
|
label: "件数",
|
|
label: "件数",
|
|
- width: "60",
|
|
|
|
|
|
+ width: "100px",
|
|
slot: true
|
|
slot: true
|
|
},
|
|
},
|
|
{
|
|
{
|
|
prop: "isPound",
|
|
prop: "isPound",
|
|
label: "是否磅重销售",
|
|
label: "是否磅重销售",
|
|
- width: "80",
|
|
|
|
|
|
+ width: "100px",
|
|
slot: true
|
|
slot: true
|
|
}
|
|
}
|
|
],
|
|
],
|
|
- orderId: null
|
|
|
|
|
|
+ orderId: null,
|
|
|
|
+ selectedMaterialCode: null,
|
|
|
|
+ selectedMaterialModel: null,
|
|
|
|
+ selectedMaterialSpecification: null,
|
|
|
|
+ selectedMaterialName: null,
|
|
|
|
+ selectedMaterialId: null,
|
|
|
|
+ //所有省
|
|
|
|
+ provinceList: [],
|
|
|
|
+ //选中的省
|
|
|
|
+ province: "",
|
|
|
|
+ //所有市
|
|
|
|
+ cityList: [],
|
|
|
|
+ //选中的市
|
|
|
|
+ city: "",
|
|
|
|
+ //所有的县(区)
|
|
|
|
+ countyList: [],
|
|
|
|
+ //选中的县
|
|
|
|
+ county: "",
|
|
|
|
+ //判断是内层还是外层点击的收货地址浏览
|
|
|
|
+ inOrOut: 0,
|
|
|
|
+ //地址输入框的值
|
|
|
|
+ addresText: "",
|
|
|
|
+ //已选中省市县
|
|
|
|
+ address: null,
|
|
|
|
+ //具体地址
|
|
|
|
+ place: null,
|
|
|
|
+ //暂存具体地址
|
|
|
|
+ place1: null,
|
|
|
|
+ //省市县Id
|
|
|
|
+ addressId: null,
|
|
|
|
+ orderSaleMap: {},
|
|
|
|
+ isNewCar: null
|
|
};
|
|
};
|
|
},
|
|
},
|
|
|
|
+ watch: {
|
|
|
|
+ dialogTableVisible() {
|
|
|
|
+ this.getOrderList();
|
|
|
|
+ }
|
|
|
|
+ },
|
|
mounted() {
|
|
mounted() {
|
|
this.getOrderList();
|
|
this.getOrderList();
|
|
|
|
+ this.getAllProvince();
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- updateAddress(scope) {},
|
|
|
|
|
|
+ updateAddress(scope) {
|
|
|
|
+ this.capacityNumber = scope.row.capacityNumber;
|
|
|
|
+ this.orderSaleMap = scope.row;
|
|
|
|
+ console.log(this.orderSaleMap);
|
|
|
|
+ let title = `请选择对-${scope.row.capacityNumber}-进行的操作?`;
|
|
|
|
+ let confirmText = `删除-${scope.row.capacityNumber}-金蝶分录`;
|
|
|
|
+ let cancelText = `不删除-${scope.row.capacityNumber}-金蝶分录`;
|
|
|
|
+ this.$confirm(title, "提示", {
|
|
|
|
+ confirmButtonText: confirmText,
|
|
|
|
+ cancelButtonText: cancelText,
|
|
|
|
+ distinguishCancelAndClose: true,
|
|
|
|
+ center: true,
|
|
|
|
+ type: "info"
|
|
|
|
+ })
|
|
|
|
+ .then(() => {
|
|
|
|
+ this.deleteEasEntryId(scope.row);
|
|
|
|
+ })
|
|
|
|
+ .catch(action => {
|
|
|
|
+ console.log(action);
|
|
|
|
+ if (action === "cancel") {
|
|
|
|
+ this.noDeleteEasEntryId();
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ //删除金蝶分录
|
|
|
|
+ deleteEasEntryId(row) {
|
|
|
|
+ let title = `确定删除-${this.capacityNumber}-金蝶分录?`;
|
|
|
|
+ this.$confirm(title, {
|
|
|
|
+ confirmButtonText: "是",
|
|
|
|
+ cancelButtonText: "否",
|
|
|
|
+ center: true,
|
|
|
|
+ type: "warning"
|
|
|
|
+ })
|
|
|
|
+ .then(() => {
|
|
|
|
+ let map = row;
|
|
|
|
+ map.isCloseEas = Number(0);
|
|
|
|
+ map.saleOrderId = this.$route.params.saleOrderId;
|
|
|
|
+ this.axios.post("/api/v1/ams/updateCarAddress", map).then(res => {
|
|
|
|
+ if (res.data.code == "200") {
|
|
|
|
+ this.$message.success("删除成功");
|
|
|
|
+ } else {
|
|
|
|
+ this.$message.error("删除失败");
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ })
|
|
|
|
+ .catch(() => {
|
|
|
|
+ this.$message.info("取消删除");
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ //不删除金蝶分录,继续选择
|
|
|
|
+ noDeleteEasEntryId() {
|
|
|
|
+ let title = `请选择对-${this.capacityNumber}-进行的操作?`;
|
|
|
|
+ let confirmText = `仅更换-${this.capacityNumber}-的收货地址`;
|
|
|
|
+ this.$confirm(title, {
|
|
|
|
+ confirmButtonText: confirmText,
|
|
|
|
+ cancelButtonText: "更换地址且换车",
|
|
|
|
+ center: true,
|
|
|
|
+ distinguishCancelAndClose: true,
|
|
|
|
+ type: "info"
|
|
|
|
+ })
|
|
|
|
+ .then(() => {
|
|
|
|
+ this.onlyUpdateAddress();
|
|
|
|
+ })
|
|
|
|
+ .catch(action => {
|
|
|
|
+ if (action === "cancel") {
|
|
|
|
+ this.updateAddressAndCar();
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ onlyUpdateAddress() {
|
|
|
|
+ let title = `仅更换-${this.capacityNumber}-的收货地址吗`;
|
|
|
|
+ this.$confirm(title, {
|
|
|
|
+ confirmButtonText: "是",
|
|
|
|
+ cancelButtonText: "否",
|
|
|
|
+ center: true,
|
|
|
|
+ type: "warning"
|
|
|
|
+ }).then(() => {
|
|
|
|
+ this.addressDialog = true;
|
|
|
|
+ this.isNewCar = 1;
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ //收货地址弹出层
|
|
|
|
+ handleSelect1(item) {
|
|
|
|
+ console.log("获取所有下拉值!");
|
|
|
|
+ },
|
|
|
|
+ //以下是收货地址边输边查搜索
|
|
|
|
+ querySearch1(queryString, cb) {
|
|
|
|
+ this.axios
|
|
|
|
+ .post(
|
|
|
|
+ "/api/v1/ams/getRealAddressByLike?addressId=" +
|
|
|
|
+ this.addressId +
|
|
|
|
+ "&index=" +
|
|
|
|
+ queryString
|
|
|
|
+ )
|
|
|
|
+ .then(res => {
|
|
|
|
+ if (res.data.code == "200") {
|
|
|
|
+ var restaurants = res.data.data;
|
|
|
|
+ var results = queryString
|
|
|
|
+ ? restaurants.filter(this.createFilter1(queryString))
|
|
|
|
+ : restaurants;
|
|
|
|
+ // 调用 callback 返回建议列表的数据
|
|
|
|
+ cb(results);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ createFilter1(queryString) {
|
|
|
|
+ return restaurants => {
|
|
|
|
+ return (
|
|
|
|
+ restaurants.value.toLowerCase().indexOf(queryString.toLowerCase()) >
|
|
|
|
+ -1
|
|
|
|
+ );
|
|
|
|
+ };
|
|
|
|
+ },
|
|
|
|
+ //以上是收货地址边输边查搜索
|
|
|
|
+ //监听收货地址模态框点击事件
|
|
|
|
+ currentRadioChange1(radioList) {
|
|
|
|
+ this.addressId = radioList.addressId;
|
|
|
|
+ this.address = radioList.address;
|
|
|
|
+ },
|
|
|
|
+ //确定收货地址事件
|
|
|
|
+ addAddressClick() {
|
|
|
|
+ let map = this.orderSaleMap;
|
|
|
|
+ map.isCloseEas = Number(1);
|
|
|
|
+ map.isNewCar = Number(this.isNewCar);
|
|
|
|
+ map.saleOrderId = this.$route.params.saleOrderId;
|
|
|
|
+ map.place = this.place;
|
|
|
|
+ map.shipperAddressId = this.addressId;
|
|
|
|
+ this.axios.post("/api/v1/ams/updateCarAddress", map).then(res => {
|
|
|
|
+ if (res.data.code == "200") {
|
|
|
|
+ this.$message.success("修改成功");
|
|
|
|
+ this.getOrderList();
|
|
|
|
+ } else {
|
|
|
|
+ this.$message.error("修改失败");
|
|
|
|
+ this.getOrderList();
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ this.addressDialog = false;
|
|
|
|
+ //初始化
|
|
|
|
+ this.addressId = null;
|
|
|
|
+ this.province = null;
|
|
|
|
+ this.cityList = [];
|
|
|
|
+ this.city = null;
|
|
|
|
+ this.countyList = [];
|
|
|
|
+ this.county = null;
|
|
|
|
+ //暂存具体地址
|
|
|
|
+ this.place1 = this.place;
|
|
|
|
+ this.place = null;
|
|
|
|
+ this.addresText = null;
|
|
|
|
+ },
|
|
|
|
+ updateAddressAndCar() {
|
|
|
|
+ this.$confirm("确定修改收货地址且换车?将会解除授权!", {
|
|
|
|
+ confirmButtonText: "确定",
|
|
|
|
+ cancelButtonText: "取消",
|
|
|
|
+ center: true,
|
|
|
|
+ type: "warning"
|
|
|
|
+ })
|
|
|
|
+ .then(() => {
|
|
|
|
+ this.addressDialog = true;
|
|
|
|
+ this.isNewCar = 0;
|
|
|
|
+ })
|
|
|
|
+ .catch(() => {
|
|
|
|
+ this.$message.info("取消");
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ //获取所有省数据
|
|
|
|
+ getAllProvince() {
|
|
|
|
+ this.axios.post("/api/v1/uc/getAllProvince").then(res => {
|
|
|
|
+ this.provinceList = res.data.data;
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ //省改变
|
|
|
|
+ onchangeProvince() {
|
|
|
|
+ this.axios
|
|
|
|
+ .post(
|
|
|
|
+ "/api/v1/uc/getDistrictByProvince?addressProvince=" + this.province
|
|
|
|
+ )
|
|
|
|
+ .then(res => {
|
|
|
|
+ this.cityList = res.data.data;
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ //市改变
|
|
|
|
+ onchangeCity() {
|
|
|
|
+ this.axios
|
|
|
|
+ .post("/api/v1/uc/getTownByDistrict?addressDistrict=" + this.city)
|
|
|
|
+ .then(res => {
|
|
|
|
+ this.countyList = res.data.data;
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ //县(区)改变
|
|
|
|
+ onchangeCounty() {
|
|
|
|
+ let mapValue = {
|
|
|
|
+ addressProvince: this.province,
|
|
|
|
+ addressDistrict: this.city,
|
|
|
|
+ addressTown: this.county
|
|
|
|
+ };
|
|
|
|
+ this.axios.post("/api/v1/uc/getPlaceByAllAddress", mapValue).then(res => {
|
|
|
|
+ this.addressId = res.data.data[0].addressId;
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ rowDbClick1(row) {
|
|
|
|
+ this.selectedMaterialId = row.materialId;
|
|
|
|
+ this.selectedMaterialName = row.materialName;
|
|
|
|
+ this.selectedMaterialSpecification = row.materialSpecification;
|
|
|
|
+ this.selectedMaterialModel = row.materialModel;
|
|
|
|
+ this.selectedMaterialCode = row.materialCode;
|
|
|
|
+ this.makeSureChange();
|
|
|
|
+ },
|
|
|
|
+ //更改行物资
|
|
|
|
+ changeMaterial(index) {
|
|
|
|
+ this.option1.requestUrl =
|
|
|
|
+ "/api/v1/uc/getSteelMaterial?apiId=244&i=" + new Date();
|
|
|
|
+ this.currentTable = true;
|
|
|
|
+ this.materialNameText = null;
|
|
|
|
+ this.materialSpecificationText = null;
|
|
|
|
+ this.isOpenDrawer = 1;
|
|
|
|
+ this.indexChangeMaterial = index;
|
|
|
|
+ },
|
|
|
|
+ //单选一行物资
|
|
|
|
+ currentRadioChange(row) {
|
|
|
|
+ this.selectedMaterialId = row.materialId;
|
|
|
|
+ this.selectedMaterialName = row.materialName;
|
|
|
|
+ this.selectedMaterialSpecification = row.materialSpecification;
|
|
|
|
+ this.selectedMaterialModel = row.materialModel;
|
|
|
|
+ this.selectedMaterialCode = row.materialCode;
|
|
|
|
+ },
|
|
|
|
+ //确认物资修改
|
|
|
|
+ makeSureChange() {
|
|
|
|
+ if (!this.selectedMaterialId) {
|
|
|
|
+ this.$message.warning("请先选择一个物资!");
|
|
|
|
+ } else {
|
|
|
|
+ if (!this.selectedMaterialSpecification) {
|
|
|
|
+ this.selectedMaterialSpecification = "";
|
|
|
|
+ }
|
|
|
|
+ if (!this.selectedMaterialModel) {
|
|
|
|
+ this.selectedMaterialModel = "";
|
|
|
|
+ }
|
|
|
|
+ //记录是理重还是磅重
|
|
|
|
+ var getisPound = 1;
|
|
|
|
+ //判断物资是否为盘螺或非定尺
|
|
|
|
+ if (
|
|
|
|
+ this.selectedMaterialName.includes("盘螺") ||
|
|
|
|
+ this.selectedMaterialName.includes("乱尺") ||
|
|
|
|
+ this.selectedMaterialName.includes("盘元") ||
|
|
|
|
+ this.selectedMaterialName.includes("盘圆")
|
|
|
|
+ ) {
|
|
|
|
+ getisPound = 0;
|
|
|
|
+ } else {
|
|
|
|
+ getisPound = 1;
|
|
|
|
+ }
|
|
|
|
+ this.materialList[
|
|
|
|
+ this.indexChangeMaterial
|
|
|
|
+ ].materialId = this.selectedMaterialId;
|
|
|
|
+ this.materialList[
|
|
|
|
+ this.indexChangeMaterial
|
|
|
|
+ ].materialName = this.selectedMaterialName;
|
|
|
|
+ this.materialList[this.indexChangeMaterial].Specification =
|
|
|
|
+ this.selectedMaterialSpecification + this.selectedMaterialModel;
|
|
|
|
+ this.materialList[
|
|
|
|
+ this.indexChangeMaterial
|
|
|
|
+ ].materialCode = this.selectedMaterialModel;
|
|
|
|
+ this.materialList[this.indexChangeMaterial].isPound = getisPound;
|
|
|
|
+ //确定更改的物资有无米数
|
|
|
|
+ if (
|
|
|
|
+ this.selectedMaterialName.includes("盘螺") ||
|
|
|
|
+ this.selectedMaterialName.includes("盘圆") ||
|
|
|
|
+ this.selectedMaterialName.includes("盘元")
|
|
|
|
+ ) {
|
|
|
|
+ console.log("执行了这里");
|
|
|
|
+ this.materialList[this.indexChangeMaterial].haveMeter = 0;
|
|
|
|
+ this.materialList[this.indexChangeMaterial].meterNumber = null;
|
|
|
|
+ } else {
|
|
|
|
+ this.materialList[this.indexChangeMaterial].haveMeter = 1;
|
|
|
|
+ this.materialList[this.indexChangeMaterial].isDisable = 0;
|
|
|
|
+ this.materialList[this.indexChangeMaterial].meterNumber = null;
|
|
|
|
+ }
|
|
|
|
+ //重新初始化
|
|
|
|
+ this.indexChangeMaterial = null;
|
|
|
|
+ this.selectedMaterialId = null;
|
|
|
|
+ this.selectedMaterialName = null;
|
|
|
|
+ this.selectedMaterialSpecification = null;
|
|
|
|
+ this.selectedMaterialModel = null;
|
|
|
|
+ this.selectedMaterialCode = null;
|
|
|
|
+ //关闭弹出框
|
|
|
|
+ this.currentTable = false;
|
|
|
|
+ this.isOpenDrawer = 0;
|
|
|
|
+ //初始化查询数据
|
|
|
|
+ this.materialNameText = null;
|
|
|
|
+ this.materialSpecificationText = null;
|
|
|
|
+ }
|
|
|
|
+ },
|
|
cancelUpdateMaterial() {
|
|
cancelUpdateMaterial() {
|
|
|
|
+ this.getOrderList();
|
|
this.dialogTableVisible = false;
|
|
this.dialogTableVisible = false;
|
|
},
|
|
},
|
|
makeSureUpdateMaterial() {
|
|
makeSureUpdateMaterial() {
|
|
@@ -325,6 +805,17 @@ export default {
|
|
this.$message.error("件数必填且请输入正整数");
|
|
this.$message.error("件数必填且请输入正整数");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
+ this.materialList.forEach(e => {
|
|
|
|
+ if (e.materialName.includes("定尺")) {
|
|
|
|
+ if (!e.meterNumber) {
|
|
|
|
+ i++;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ if (i != 0) {
|
|
|
|
+ this.$message.error("定尺必须填写米数");
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
this.dialogTableVisible = false;
|
|
this.dialogTableVisible = false;
|
|
this.orderId = null;
|
|
this.orderId = null;
|
|
this.saleOrderMaterialId = null;
|
|
this.saleOrderMaterialId = null;
|
|
@@ -342,7 +833,13 @@ export default {
|
|
this.axios
|
|
this.axios
|
|
.post("/api/v1/ams/updateAllMaterialInSale", mapVal)
|
|
.post("/api/v1/ams/updateAllMaterialInSale", mapVal)
|
|
.then(res => {
|
|
.then(res => {
|
|
- console.log(res);
|
|
|
|
|
|
+ if (res.data.code == "200") {
|
|
|
|
+ this.$message.success("修改成功!");
|
|
|
|
+ this.getOrderList();
|
|
|
|
+ } else {
|
|
|
|
+ this.$message.warning("修改失败");
|
|
|
|
+ this.getOrderList();
|
|
|
|
+ }
|
|
});
|
|
});
|
|
},
|
|
},
|
|
makeSureMaterial() {
|
|
makeSureMaterial() {
|
|
@@ -382,11 +879,11 @@ export default {
|
|
meterNumber: null,
|
|
meterNumber: null,
|
|
isPound: getisPound,
|
|
isPound: getisPound,
|
|
//物资Id
|
|
//物资Id
|
|
- materialId: e.materialId
|
|
|
|
|
|
+ materialId: e.materialId,
|
|
|
|
+ haveMeter: 0
|
|
};
|
|
};
|
|
} else {
|
|
} else {
|
|
if (e.materialName.includes("米")) {
|
|
if (e.materialName.includes("米")) {
|
|
- console.log("着");
|
|
|
|
var addmap = {
|
|
var addmap = {
|
|
capacityNumber: this.capacityNumber,
|
|
capacityNumber: this.capacityNumber,
|
|
orderId: this.orderId,
|
|
orderId: this.orderId,
|
|
@@ -394,10 +891,12 @@ export default {
|
|
Specification: e.materialSpecification + e.materialModel,
|
|
Specification: e.materialSpecification + e.materialModel,
|
|
materialCode: e.materialCode,
|
|
materialCode: e.materialCode,
|
|
orderPlanWeight: null,
|
|
orderPlanWeight: null,
|
|
|
|
+ haveMeter: 1,
|
|
meterNumber: e.materialName.replace(/[^0-9]/gi, ""),
|
|
meterNumber: e.materialName.replace(/[^0-9]/gi, ""),
|
|
isPound: getisPound,
|
|
isPound: getisPound,
|
|
//物资Id
|
|
//物资Id
|
|
- materialId: e.materialId
|
|
|
|
|
|
+ materialId: e.materialId,
|
|
|
|
+ isDisable: 1
|
|
//有米数
|
|
//有米数
|
|
};
|
|
};
|
|
console.log(addmap);
|
|
console.log(addmap);
|
|
@@ -411,6 +910,7 @@ export default {
|
|
orderPlanWeight: null,
|
|
orderPlanWeight: null,
|
|
meterNumber: null,
|
|
meterNumber: null,
|
|
isPound: getisPound,
|
|
isPound: getisPound,
|
|
|
|
+ haveMeter: 1,
|
|
//物资Id
|
|
//物资Id
|
|
materialId: e.materialId
|
|
materialId: e.materialId
|
|
};
|
|
};
|
|
@@ -432,6 +932,11 @@ export default {
|
|
this.makeSureMaterial();
|
|
this.makeSureMaterial();
|
|
},
|
|
},
|
|
openDrawer() {
|
|
openDrawer() {
|
|
|
|
+ this.option.requestUrl =
|
|
|
|
+ "/api/v1/uc/getSteelMaterial?apiId=244&i=" + new Date();
|
|
|
|
+ this.materialModelText = null;
|
|
|
|
+ this.materialSpecificationText = null;
|
|
|
|
+ this.materialNameText = null;
|
|
this.table1 = true;
|
|
this.table1 = true;
|
|
},
|
|
},
|
|
//返回选中的物资信息
|
|
//返回选中的物资信息
|
|
@@ -445,7 +950,18 @@ export default {
|
|
"/api/v1/uc/getSteelMaterial?apiId=244&materialNameText=" +
|
|
"/api/v1/uc/getSteelMaterial?apiId=244&materialNameText=" +
|
|
this.materialNameText +
|
|
this.materialNameText +
|
|
"&materialSpecificationText=" +
|
|
"&materialSpecificationText=" +
|
|
- this.materialSpecificationText;
|
|
|
|
|
|
+ this.materialSpecificationText +
|
|
|
|
+ "&i=" +
|
|
|
|
+ new Date();
|
|
|
|
+ },
|
|
|
|
+ onclick1() {
|
|
|
|
+ this.option1.requestUrl =
|
|
|
|
+ "/api/v1/uc/getSteelMaterial?apiId=244&materialNameText=" +
|
|
|
|
+ this.materialNameText +
|
|
|
|
+ "&materialSpecificationText=" +
|
|
|
|
+ this.materialSpecificationText +
|
|
|
|
+ "&i=" +
|
|
|
|
+ new Date();
|
|
},
|
|
},
|
|
//开关是否删除
|
|
//开关是否删除
|
|
showDelete() {
|
|
showDelete() {
|
|
@@ -456,12 +972,25 @@ export default {
|
|
this.status = 1;
|
|
this.status = 1;
|
|
},
|
|
},
|
|
updateMaterial(scope) {
|
|
updateMaterial(scope) {
|
|
|
|
+ this.materialList = [];
|
|
this.materialList = this.tableData.filter((item, index) => {
|
|
this.materialList = this.tableData.filter((item, index) => {
|
|
return item.orderId == scope.row.orderId;
|
|
return item.orderId == scope.row.orderId;
|
|
});
|
|
});
|
|
this.materialList.forEach(e => {
|
|
this.materialList.forEach(e => {
|
|
this.capacityNumber = e.capacityNumber;
|
|
this.capacityNumber = e.capacityNumber;
|
|
this.orderId = e.orderId;
|
|
this.orderId = e.orderId;
|
|
|
|
+ if (
|
|
|
|
+ e.materialName.includes("盘螺") ||
|
|
|
|
+ e.materialName.includes("盘圆") ||
|
|
|
|
+ e.materialName.includes("盘元")
|
|
|
|
+ ) {
|
|
|
|
+ e.haveMeter = 0;
|
|
|
|
+ } else {
|
|
|
|
+ e.haveMeter = 1;
|
|
|
|
+ if (e.materialName.includes("米")) {
|
|
|
|
+ e.isDisable = 1;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
});
|
|
});
|
|
this.getSpanArr1(this.materialList);
|
|
this.getSpanArr1(this.materialList);
|
|
this.title = "处理" + "-" + this.capacityNumber + "-" + "异常物资信息";
|
|
this.title = "处理" + "-" + this.capacityNumber + "-" + "异常物资信息";
|
|
@@ -476,14 +1005,15 @@ export default {
|
|
new Date()
|
|
new Date()
|
|
)
|
|
)
|
|
.then(res => {
|
|
.then(res => {
|
|
|
|
+ this.tableData = [];
|
|
this.tableData = res.data.data;
|
|
this.tableData = res.data.data;
|
|
this.getSpanArr(this.tableData);
|
|
this.getSpanArr(this.tableData);
|
|
});
|
|
});
|
|
},
|
|
},
|
|
- onclick() {},
|
|
|
|
back() {
|
|
back() {
|
|
this.$router.push("/saleOrderSteel");
|
|
this.$router.push("/saleOrderSteel");
|
|
},
|
|
},
|
|
|
|
+ //合并方法
|
|
getSpanArr1(data) {
|
|
getSpanArr1(data) {
|
|
//每次调用方法初始化
|
|
//每次调用方法初始化
|
|
this.spanArr1 = [];
|
|
this.spanArr1 = [];
|
|
@@ -570,12 +1100,23 @@ export default {
|
|
margin-left: 20px;
|
|
margin-left: 20px;
|
|
}
|
|
}
|
|
.dialog {
|
|
.dialog {
|
|
- width: 600px;
|
|
|
|
.buttonx {
|
|
.buttonx {
|
|
display: flex;
|
|
display: flex;
|
|
justify-content: center;
|
|
justify-content: center;
|
|
align-items: center;
|
|
align-items: center;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ .addressDialog {
|
|
|
|
+ .addressDialog {
|
|
|
|
+ display: flex;
|
|
|
|
+ justify-content: center;
|
|
|
|
+ align-items: center;
|
|
|
|
+ }
|
|
|
|
+ .button-box {
|
|
|
|
+ display: flex;
|
|
|
|
+ justify-content: center;
|
|
|
|
+ align-items: center;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|