|
@@ -1146,6 +1146,7 @@ export default {
|
|
|
this.dialogFormVisible = true
|
|
|
},
|
|
|
currentRadioChange2(val) {
|
|
|
+ console.log("进入了该方法")
|
|
|
console.log(val)
|
|
|
//若具体地址有值,清空值
|
|
|
if (this.place != null) {
|
|
@@ -1197,10 +1198,10 @@ export default {
|
|
|
.then(res => {
|
|
|
if (res.data.code == '200') {
|
|
|
this.$message.success('修改详单单价成功!')
|
|
|
- this.$refs.tableRef.clearSelection()
|
|
|
+ //this.$refs.tableRef.clearSelection()
|
|
|
//重置未结算详单表单信息
|
|
|
// this.operation(this.steelMap)
|
|
|
- this.getSteelReport()
|
|
|
+ this.loadNewData()
|
|
|
this.dialogFormVisible = false
|
|
|
} else {
|
|
|
this.$message.error('修改失败:'+res.data.data)
|
|
@@ -1234,10 +1235,10 @@ export default {
|
|
|
.post('/api/v1/bms/updateBatchDetailsOrder', mapValue)
|
|
|
.then(res => {
|
|
|
if (res.data.code == '200') {
|
|
|
- this.$refs.tableRef.clearSelection()
|
|
|
+ //this.$refs.tableRef.clearSelection()
|
|
|
this.$message.success('修改详单单价和地址成功!')
|
|
|
// this.operation(this.steelMap)
|
|
|
- this.getSteelReport()
|
|
|
+ this.loadNewData()
|
|
|
this.dialogFormVisible = false
|
|
|
}else {
|
|
|
this.$message.error('修改失败:'+res.data.data)
|
|
@@ -2682,18 +2683,18 @@ export default {
|
|
|
.then(res => {
|
|
|
this.tableData = res.data.data
|
|
|
//遍历保留两位小数
|
|
|
- this.tableData.forEach(e=>{
|
|
|
- try {
|
|
|
- if(e.priceValue){
|
|
|
- e.priceValue=e.priceValue.toFixed(2);
|
|
|
- }
|
|
|
- if(e.detailsAmount){
|
|
|
- e.detailsAmount=e.detailsAmount.toFixed(2);
|
|
|
- }
|
|
|
- } catch (error) {
|
|
|
+ // this.tableData.forEach(e=>{
|
|
|
+ // try {
|
|
|
+ // if(e.priceValue){
|
|
|
+ // e.priceValue=e.priceValue.toFixed(2);
|
|
|
+ // }
|
|
|
+ // if(e.detailsAmount){
|
|
|
+ // e.detailsAmount=e.detailsAmount.toFixed(2);
|
|
|
+ // }
|
|
|
+ // } catch (error) {
|
|
|
|
|
|
- }
|
|
|
- })
|
|
|
+ // }
|
|
|
+ // })
|
|
|
this.totalHeight += this.itemHeight
|
|
|
this.visibleList = res.data.data
|
|
|
console.log(this.visibleList);
|
|
@@ -2729,18 +2730,18 @@ export default {
|
|
|
.then(res => {
|
|
|
this.tableData1 = res.data.data
|
|
|
//遍历保留两位小数
|
|
|
- this.tableData1.forEach(e=>{
|
|
|
- try {
|
|
|
- if(e.priceValue){
|
|
|
- e.priceValue=e.priceValue.toFixed(2);
|
|
|
- }
|
|
|
- if(e.detailsAmount){
|
|
|
- e.detailsAmount=e.detailsAmount.toFixed(2);
|
|
|
- }
|
|
|
- } catch (error) {
|
|
|
+ // this.tableData1.forEach(e=>{
|
|
|
+ // try {
|
|
|
+ // if(e.priceValue){
|
|
|
+ // e.priceValue=e.priceValue.toFixed(2);
|
|
|
+ // }
|
|
|
+ // if(e.detailsAmount){
|
|
|
+ // e.detailsAmount=e.detailsAmount.toFixed(2);
|
|
|
+ // }
|
|
|
+ // } catch (error) {
|
|
|
|
|
|
- }
|
|
|
- })
|
|
|
+ // }
|
|
|
+ // })
|
|
|
this.totalHeight += this.itemHeight
|
|
|
this.visibleList1 = res.data.data
|
|
|
console.log(this.visibleList1, 'this.visibleList1')
|
|
@@ -2754,6 +2755,52 @@ export default {
|
|
|
refresh() {
|
|
|
this.getSteelReport()
|
|
|
},
|
|
|
+ //仅仅更新变更数据
|
|
|
+ loadNewData(){
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: '正在更新数据,请稍候',
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
+ background: 'rgba(0, 0, 0, 0.7)'
|
|
|
+ })
|
|
|
+ let startTime = null
|
|
|
+ let endTime = null
|
|
|
+ if (this.startTime && this.endTime) {
|
|
|
+ startTime = sjTime(this.startTime)
|
|
|
+ endTime = sjTime(this.endTime)
|
|
|
+ }
|
|
|
+ let map= {
|
|
|
+ saleOrderMaterialIds:this.visibleList.map(e=>{
|
|
|
+ return e.saleOrderMaterialId
|
|
|
+ })
|
|
|
+ }
|
|
|
+ console.log("map:",map);
|
|
|
+ this.axios
|
|
|
+ .post(
|
|
|
+ '/api/v1/tms/getSaleSteelReportNew?startTime=' +
|
|
|
+ startTime +
|
|
|
+ '&endTime=' +
|
|
|
+ endTime,
|
|
|
+ map
|
|
|
+ )
|
|
|
+ .then(res => {
|
|
|
+ //遍历旧数组
|
|
|
+ this.visibleList.forEach(e1=>{
|
|
|
+ //遍历新数组
|
|
|
+ let temp = res.data.data.find(e2=>{
|
|
|
+ return e1.saleOrderMaterialId==e2.saleOrderMaterialId
|
|
|
+ })
|
|
|
+ //赋值
|
|
|
+ e1.priceValue=temp.priceValue;
|
|
|
+ e1.detailsAmount=temp.detailsAmount;
|
|
|
+ e1.actualAddress=temp.actualAddress;
|
|
|
+ })
|
|
|
+ loading.close();
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ loading.close()
|
|
|
+ })
|
|
|
+ },
|
|
|
//获取钢材统计报表
|
|
|
getSteelReport() {
|
|
|
const loading = this.$loading({
|
|
@@ -2834,19 +2881,6 @@ export default {
|
|
|
)
|
|
|
.then(res => {
|
|
|
this.tableData = res.data.data
|
|
|
- //遍历保留两位小数
|
|
|
- this.tableData.forEach(e=>{
|
|
|
- try {
|
|
|
- if(e.priceValue){
|
|
|
- e.priceValue=e.priceValue.toFixed(2);
|
|
|
- }
|
|
|
- if(e.detailsAmount){
|
|
|
- e.detailsAmount=e.detailsAmount.toFixed(2);
|
|
|
- }
|
|
|
- } catch (error) {
|
|
|
-
|
|
|
- }
|
|
|
- })
|
|
|
this.totalHeight += this.itemHeight
|
|
|
this.visibleList = []
|
|
|
this.visibleList = this.tableData.slice(
|
|
@@ -2886,19 +2920,6 @@ export default {
|
|
|
)
|
|
|
.then(res => {
|
|
|
this.tableData1 = res.data.data
|
|
|
- //遍历保留两位小数
|
|
|
- this.tableData1.forEach(e=>{
|
|
|
- try {
|
|
|
- if(e.priceValue){
|
|
|
- e.priceValue=e.priceValue.toFixed(2);
|
|
|
- }
|
|
|
- if(e.detailsAmount){
|
|
|
- e.detailsAmount=e.detailsAmount.toFixed(2);
|
|
|
- }
|
|
|
- } catch (error) {
|
|
|
-
|
|
|
- }
|
|
|
- })
|
|
|
this.totalHeight += this.itemHeight
|
|
|
this.visibleList1 = []
|
|
|
this.visibleList1 = this.tableData1.slice(
|