|
@@ -8,33 +8,24 @@
|
|
|
<ws-button :type="searchType==2?'primary':''" @click="handlestatus(2)">待结算</ws-button>
|
|
|
<ws-button :type="searchType==3?'primary':''" @click="handlestatus(3)">已结算</ws-button>
|
|
|
<ws-button :type="searchType==''?'primary':''" @click="handlestatus('')">全部</ws-button>
|
|
|
- <ws-button v-if='roleId=="9ad8abb997714ef29068f23c2ad3b125"||roleId=="4ef070439cd64784bce8844fd3f0f8e1"' type="primary" v-hasPermission="
|
|
|
- `report.procurementInReport.view`
|
|
|
- " @click="handlepass1()">通过</ws-button>
|
|
|
- <ws-button v-if='roleId=="9ad8abb997714ef29068f23c2ad3b125"||roleId=="4ef070439cd64784bce8844fd3f0f8e1"' type="primary" v-hasPermission="
|
|
|
- `report.procurementInReport.view`
|
|
|
- " @click="handlereject(3)">驳回</ws-button>
|
|
|
- <ws-button v-if='roleId=="cca3cf0ca2814d1e918f5b0a4380fe69"||roleId=="4ef070439cd64784bce8844fd3f0f8e1"' type="primary" v-hasPermission="
|
|
|
+ <ws-button type="primary" v-hasPermission="
|
|
|
`report.procurementInReport.view`
|
|
|
" @click="handlepass()">通过</ws-button>
|
|
|
- <ws-button v-if='roleId=="cca3cf0ca2814d1e918f5b0a4380fe69"||roleId=="4ef070439cd64784bce8844fd3f0f8e1"' type="primary" v-hasPermission="
|
|
|
+ <ws-button type="primary" v-hasPermission="
|
|
|
`report.procurementInReport.view`
|
|
|
- " @click="handlereject(2)">驳回</ws-button>
|
|
|
- <ws-button v-if='roleId=="3d7b9179552b4c3e9c2d7af43962e2e4"||roleId=="4ef070439cd64784bce8844fd3f0f8e1"' type="primary" v-hasPermission="
|
|
|
+ " @click="handlereject()">驳回</ws-button>
|
|
|
+ <ws-button type="primary" v-hasPermission="
|
|
|
`report.procurementInReport.payment`
|
|
|
" @click="handlepayment">付款</ws-button>
|
|
|
- <ws-button v-if='roleId=="3d7b9179552b4c3e9c2d7af43962e2e4"||roleId=="4ef070439cd64784bce8844fd3f0f8e1"' type="primary" v-hasPermission="
|
|
|
+ <ws-button type="primary" v-hasPermission="
|
|
|
`report.procurementInReport.draw`
|
|
|
" @click="handleninvoice">开发票</ws-button>
|
|
|
- <ws-button v-if='roleId=="4c2d50d8ff2943c1b7a1e947feefe048"||roleId=="4ef070439cd64784bce8844fd3f0f8e1"' type="primary" v-hasPermission="
|
|
|
+ <ws-button type="primary" v-hasPermission="
|
|
|
`report.procurementInReport.edit`
|
|
|
" @click="amend()">修改</ws-button>
|
|
|
- <ws-button v-if='roleId=="4c2d50d8ff2943c1b7a1e947feefe048"||roleId=="4ef070439cd64784bce8844fd3f0f8e1"' type="primary" v-hasPermission="
|
|
|
+ <ws-button type="primary" v-hasPermission="
|
|
|
`report.procurementInReport.carry`
|
|
|
" @click="carryover">补货结转</ws-button>
|
|
|
- <ws-button v-if='roleId=="4c2d50d8ff2943c1b7a1e947feefe048"||roleId=="4ef070439cd64784bce8844fd3f0f8e1"' type="primary" v-hasPermission="
|
|
|
- `report.procurementInReport.view`
|
|
|
- " @click="handleAudit()">审核</ws-button>
|
|
|
</el-col>
|
|
|
<el-col style='text-align:right;line-height:60px;padding-right:10px;' :span="8">
|
|
|
<ws-select
|
|
@@ -83,9 +74,10 @@
|
|
|
border
|
|
|
:summary-method="getSummaries"
|
|
|
show-summary
|
|
|
+
|
|
|
@selection-change="handleSelectionChange"
|
|
|
>
|
|
|
- <el-table-column type="selection" width="55"></el-table-column>
|
|
|
+ <el-table-column :selectable='selectInit' type="selection" width="55"></el-table-column>
|
|
|
<el-table-column type="index" label="序号" width="50"></el-table-column>
|
|
|
<el-table-column
|
|
|
class="table_td"
|
|
@@ -106,7 +98,9 @@
|
|
|
class="table_td"
|
|
|
prop="carNo"
|
|
|
label="车牌号"
|
|
|
- ></el-table-column>
|
|
|
+ ><template slot-scope="scope">
|
|
|
+ {{scope.row.carNo}}({{scope.row.tranCarNo}})
|
|
|
+ </template></el-table-column>
|
|
|
<el-table-column
|
|
|
class="table_td"
|
|
|
prop="warehousingDate"
|
|
@@ -232,7 +226,13 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
|
|
|
- <el-table-column label="状态" prop="status"></el-table-column>
|
|
|
+ <el-table-column label="状态" prop="status">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span v-if='scope.row.approveStatus!=null'>{{ scope.row.approveStatus }}</span>
|
|
|
+ <span v-else>{{ scope.row.status }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
</el-table>
|
|
|
|
|
|
<!-- 页数 -->
|
|
@@ -418,10 +418,10 @@
|
|
|
:append-to-body="true"
|
|
|
>
|
|
|
<el-form :model="form">
|
|
|
- <el-button :type="currect ? 'primary' : ''" @click="currect = true"
|
|
|
+ <el-button :type="currect ? 'primary' : ''" @click="cur(0)"
|
|
|
>本合同</el-button
|
|
|
>
|
|
|
- <el-button :type="!currect ? 'primary' : ''" @click="currect = false"
|
|
|
+ <el-button :type="!currect ? 'primary' : ''" @click="cur(1)"
|
|
|
>其他合同</el-button
|
|
|
>
|
|
|
<el-form-item
|
|
@@ -430,11 +430,11 @@
|
|
|
:label-width="formLabelWidth"
|
|
|
>
|
|
|
<ws-select
|
|
|
- v-if="carryovercontractnolist.length > 0"
|
|
|
+ v-if="carryovercontractnolist"
|
|
|
v-model="carryoverlist.contractNo"
|
|
|
placeholder="请选择合同"
|
|
|
clearable
|
|
|
- @change="contractchange"
|
|
|
+ @change="carryovercontractchange"
|
|
|
maxlength="500"
|
|
|
type="input"
|
|
|
>
|
|
@@ -475,7 +475,11 @@ import {
|
|
|
postpaymoney,
|
|
|
postopeninvoice,
|
|
|
postbatchopeninvoice,
|
|
|
+ getselectctcontractno
|
|
|
} from '@/model/statisticalReport/index'
|
|
|
+import {
|
|
|
+ posthandle
|
|
|
+} from '@/model/purchasingManagement/index'
|
|
|
import { downloadFile } from '@/utils/batchDown'
|
|
|
import Pagination from '@/components/Pagination'
|
|
|
import WsUpload from '@/components/WsUpload'
|
|
@@ -603,6 +607,35 @@ export default {
|
|
|
this.showType = this.isShow
|
|
|
},
|
|
|
methods: {
|
|
|
+ cur(status){
|
|
|
+ if(status==0){
|
|
|
+ this.currect=true
|
|
|
+ }else{
|
|
|
+ var that=this
|
|
|
+ this.currect=false
|
|
|
+ getselectctcontractno({customerName:this.modification[0].customerName,contractNo:this.modification[0].contractNo}).toPromise()
|
|
|
+ .then((response) => {
|
|
|
+
|
|
|
+ that.carryovercontractnolist=response
|
|
|
+ })
|
|
|
+ .catch((response) => {
|
|
|
+ console.log(response)
|
|
|
+ EventBus.$emit('error', response.message)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ selectInit(row){
|
|
|
+//在这里一定要记得类型匹配的上。
|
|
|
+ if(row.approveStatus==null){
|
|
|
+ return true
|
|
|
+ }else if(row.approveStatus!=null){
|
|
|
+ if(row.taskId==null){
|
|
|
+ return false
|
|
|
+ }else{
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
//付款
|
|
|
handlepayment() {
|
|
|
this.amountNotPayable = 0
|
|
@@ -803,6 +836,7 @@ export default {
|
|
|
|
|
|
//审核
|
|
|
handleAudit() {
|
|
|
+ var that=this
|
|
|
if (this.modification.length == 0) {
|
|
|
this.$message.warning('请选择一条要审核的条目')
|
|
|
} else {
|
|
@@ -811,69 +845,99 @@ export default {
|
|
|
confirmButtonText: '确定',
|
|
|
type: 'warning',
|
|
|
}).then(() => {
|
|
|
- postaudit({
|
|
|
- roleFlag: 1,
|
|
|
+ // postaudit({
|
|
|
+ // roleFlag: 1,
|
|
|
+ // purchaseReceiptReportList: this.modification,
|
|
|
+ // })
|
|
|
+ // .toPromise()
|
|
|
+ // .then((response) => {
|
|
|
+ // this.$message.success('审核成功')
|
|
|
+ // this.getList()
|
|
|
+ // })
|
|
|
+ that.audit(this.modification[0],0,true)
|
|
|
+
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ audit(item,index,status){
|
|
|
+ if(index<this.modification.length){
|
|
|
+ posthandle({ taskId: item.taskId,
|
|
|
+ approved: status,
|
|
|
+ auditMind: '34',
|
|
|
+ needReapply: false,})
|
|
|
+ .toPromise()
|
|
|
+ .then((response) => {
|
|
|
+ this.audit(this.modification[index+1],index+1,status)
|
|
|
+ }).catch((req) => {
|
|
|
+ this.$message.warning(req.message)
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ if(status){
|
|
|
+ this.$message.success('通过成功')
|
|
|
+ this.getList()
|
|
|
+ }else if(!status){
|
|
|
+ if(status1==2){
|
|
|
+ postaudit({
|
|
|
+ flag: 2,
|
|
|
purchaseReceiptReportList: this.modification,
|
|
|
})
|
|
|
.toPromise()
|
|
|
.then((response) => {
|
|
|
- this.$message.success('审核成功')
|
|
|
+ this.$message.success('驳回成功')
|
|
|
this.getList()
|
|
|
- }).catch
|
|
|
- })
|
|
|
+ })
|
|
|
+ .catch((req) => {
|
|
|
+ this.$message.success('驳回失败')
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
},
|
|
|
handlereject(status) {
|
|
|
+ var that=this
|
|
|
if (this.modification.length == 0) {
|
|
|
this.$message.warning('请选择要驳回的条目')
|
|
|
} else {
|
|
|
- this.$confirm(`驳回后任务将退回到统计,是否确定驳回?`, {
|
|
|
+ this.$confirm(`是否确定驳回?`, {
|
|
|
cancelButtonText: '取消',
|
|
|
confirmButtonText: '确定',
|
|
|
type: 'warning',
|
|
|
}).then(() => {
|
|
|
- postaudit({
|
|
|
- roleFlag: status,
|
|
|
- flag: 2,
|
|
|
- purchaseReceiptReportList: this.modification,
|
|
|
- })
|
|
|
- .toPromise()
|
|
|
- .then((response) => {
|
|
|
- this.$message.success('驳回成功')
|
|
|
- this.getList()
|
|
|
- })
|
|
|
- .catch((req) => {
|
|
|
- this.$message.success('驳回失败')
|
|
|
- })
|
|
|
+ // postaudit({
|
|
|
+ // roleFlag: status,
|
|
|
+ // flag: 2,
|
|
|
+ // purchaseReceiptReportList: this.modification,
|
|
|
+ // })
|
|
|
+ // .toPromise()
|
|
|
+ // .then((response) => {
|
|
|
+ // this.$message.success('驳回成功')
|
|
|
+ // this.getList()
|
|
|
+ // })
|
|
|
+ // .catch((req) => {
|
|
|
+ // this.$message.success('驳回失败')
|
|
|
+ // })
|
|
|
+ that.audit(this.modification[0],0,false)
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
handlepass() {
|
|
|
+ var that=this
|
|
|
if (this.modification.length == 0) {
|
|
|
this.$message.warning('请选择要通过的条目')
|
|
|
} else {
|
|
|
- this.$confirm(`审核通过后,任务将发送给决策人,是否确定通过?`, {
|
|
|
+ this.$confirm(`是否确定通过?`, {
|
|
|
cancelButtonText: '取消',
|
|
|
confirmButtonText: '确定',
|
|
|
type: 'warning',
|
|
|
}).then(() => {
|
|
|
- postaudit({
|
|
|
- roleFlag: 2,
|
|
|
- flag: 1,
|
|
|
- purchaseReceiptReportList: this.modification,
|
|
|
- })
|
|
|
- .toPromise()
|
|
|
- .then((response) => {
|
|
|
- this.$message.success('通过成功')
|
|
|
- this.getList()
|
|
|
- })
|
|
|
- .catch((req) => {
|
|
|
- this.$message.success('通过失败')
|
|
|
- })
|
|
|
+ that.audit(this.modification[0],0,true,2)
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
handlepass1() {
|
|
|
+ var that=this
|
|
|
if (this.modification.length == 0) {
|
|
|
this.$message.warning('请选择要通过的条目')
|
|
|
} else {
|
|
@@ -882,44 +946,67 @@ export default {
|
|
|
confirmButtonText: '确定',
|
|
|
type: 'warning',
|
|
|
}).then(() => {
|
|
|
- postaudit({
|
|
|
- roleFlag: 3,
|
|
|
- flag: 1,
|
|
|
- purchaseReceiptReportList: this.modification,
|
|
|
- })
|
|
|
- .toPromise()
|
|
|
- .then((response) => {
|
|
|
- this.$message.success('通过成功')
|
|
|
- this.getList()
|
|
|
- })
|
|
|
- .catch((req) => {
|
|
|
- this.$message.success('通过失败')
|
|
|
- })
|
|
|
+ // postaudit({
|
|
|
+ // roleFlag: 3,
|
|
|
+ // flag: 1,
|
|
|
+ // purchaseReceiptReportList: this.modification,
|
|
|
+ // })
|
|
|
+ // .toPromise()
|
|
|
+ // .then((response) => {
|
|
|
+ // this.$message.success('通过成功')
|
|
|
+ // this.getList()
|
|
|
+ // })
|
|
|
+ // .catch((req) => {
|
|
|
+ // this.$message.success('通过失败')
|
|
|
+ // })
|
|
|
+ that.audit(this.modification[0],0,true,3)
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
carryoverconfirm() {
|
|
|
+ var data={}
|
|
|
+ if(!this.carryoverlist.carryOverWeight){
|
|
|
+ this.$message.warning('结转重量不能为空')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if(this.carryoverlist.carryOverWeight>this.modification[0].netWeight){
|
|
|
+ this.$message.warning('结转重量不能超过净重')
|
|
|
+ return
|
|
|
+ }
|
|
|
if (this.currect == true) {
|
|
|
- postreplanishent({
|
|
|
+ data={
|
|
|
customerConfirmationStatusFlag:
|
|
|
this.modification[0].customerConfirmationStatusFlag,
|
|
|
- purchaseReceiptReport: {
|
|
|
+ id:this.modification[0].id,
|
|
|
+ contractNo:this.modification[0].contractNo,
|
|
|
+ carryOverWeight: this.carryoverlist.carryOverWeight,
|
|
|
+ purchaseReceiptReport: {
|
|
|
contractNo: this.carryoverlist.contractNo,
|
|
|
carryOverWeight: this.carryoverlist.carryOverWeight,
|
|
|
- },
|
|
|
+ },
|
|
|
amountNotPayable: this.modification[0].amountNotPayable,
|
|
|
- })
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ data={
|
|
|
+ customerConfirmationStatusFlag:
|
|
|
+ this.modification[0].customerConfirmationStatusFlag,
|
|
|
+ id:this.modification[0].id,
|
|
|
+ contractNo:this.carryoverlist.contractNo,
|
|
|
+ carryOverWeight: this.carryoverlist.carryOverWeight,
|
|
|
+ purchaseReceiptReport: {
|
|
|
+ contractNo: this.carryoverlist.contractNo,
|
|
|
+ carryOverWeight: this.carryoverlist.carryOverWeight,
|
|
|
+ },
|
|
|
+ amountNotPayable: this.modification[0].amountNotPayable,
|
|
|
+ }
|
|
|
+ }
|
|
|
+ postreplanishent(data)
|
|
|
.toPromise()
|
|
|
.then((response) => {
|
|
|
+ this.dialogFormVisible11=false
|
|
|
this.$message.success('结转成功')
|
|
|
this.getList()
|
|
|
})
|
|
|
- } else {
|
|
|
- if (this.carryovercontractnolist.length > 0) {
|
|
|
- } else {
|
|
|
- this.$message.warning('无可结转的其他合同')
|
|
|
- }
|
|
|
- }
|
|
|
},
|
|
|
amendconfirm() {
|
|
|
this.amendlist.id = this.modification[0].id
|
|
@@ -947,11 +1034,7 @@ export default {
|
|
|
this.$message.warning('请选择一条要结转的条目')
|
|
|
} else {
|
|
|
this.dialogFormVisible11 = true
|
|
|
- this.carryovercontractnolist = this.contractNoList.records.filter(
|
|
|
- (item) => {
|
|
|
- return this.modification[0].id != item.id
|
|
|
- }
|
|
|
- )
|
|
|
+
|
|
|
}
|
|
|
},
|
|
|
handleSelectionChange(val) {
|
|
@@ -974,6 +1057,13 @@ export default {
|
|
|
})
|
|
|
this.getList()
|
|
|
},
|
|
|
+ carryovercontractchange(e) {
|
|
|
+ for (let i = 0; i < this.carryovercontractnolist.length; i++) {
|
|
|
+ if(this.carryovercontractnolist[i].contractNo==e){
|
|
|
+ this.carryoverlist.netWeight=this.carryovercontractnolist[i].netWeight
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
updated() {
|
|
|
this.$nextTick(() => {
|
|
|
this.$refs.warehouseList.doLayout()
|
|
@@ -1042,30 +1132,37 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
getList() {
|
|
|
- if(this.roleId=='4c2d50d8ff2943c1b7a1e947feefe048'){
|
|
|
- this.roleFlag=1
|
|
|
- }else if(this.roleId=='cca3cf0ca2814d1e918f5b0a4380fe69'){
|
|
|
- this.roleFlag=2
|
|
|
- }else if(this.roleId=='9ad8abb997714ef29068f23c2ad3b125'){
|
|
|
- this.roleFlag=3
|
|
|
- }else if(this.roleId=='3d7b9179552b4c3e9c2d7af43962e2e4'){
|
|
|
- this.roleFlag=4
|
|
|
- }else if(this.roleId=="4ef070439cd64784bce8844fd3f0f8e1"){
|
|
|
- this.roleFlag=''
|
|
|
- }
|
|
|
+ // if(this.roleId=='4c2d50d8ff2943c1b7a1e947feefe048'){
|
|
|
+ // this.roleFlag=1
|
|
|
+ // }else if(this.roleId=='cca3cf0ca2814d1e918f5b0a4380fe69'){
|
|
|
+ // this.roleFlag=2
|
|
|
+ // }else if(this.roleId=='9ad8abb997714ef29068f23c2ad3b125'){
|
|
|
+ // this.roleFlag=3
|
|
|
+ // }else if(this.roleId=='3d7b9179552b4c3e9c2d7af43962e2e4'){
|
|
|
+ // this.roleFlag=4
|
|
|
+ // }else if(this.roleId=="4ef070439cd64784bce8844fd3f0f8e1"){
|
|
|
+ // this.roleFlag=''
|
|
|
+ // }
|
|
|
+
|
|
|
getpurchreceipt({
|
|
|
compId: sessionStorage.getItem('ws-pf_compId'),
|
|
|
currentPage: this.currentPage,
|
|
|
pageSize: this.pageSize,
|
|
|
searchType: this.searchType,
|
|
|
contractNo: this.contractNo,
|
|
|
- roleFlag: this.roleFlag,
|
|
|
+ // roleFlag: this.roleFlag,
|
|
|
})
|
|
|
.toPromise()
|
|
|
.then((response) => {
|
|
|
for (var i = 0; i < response.records.length; i++) {
|
|
|
response.records[i].identification = 'false'
|
|
|
+ response.records[i].settlementPrice = response.records[i].unitPrice
|
|
|
+ - Math.abs(response.records[i].basisPrice)
|
|
|
+ - Math.abs(response.records[i].unloadingCharge)
|
|
|
+ - Math.abs(response.records[i].invoiceFee)
|
|
|
+ - Math.abs(response.records[i].deductionAmount)
|
|
|
}
|
|
|
+
|
|
|
this.deptBudgetTotal=response.total
|
|
|
this.warehouseList = response
|
|
|
})
|