|
@@ -20,6 +20,7 @@
|
|
|
@showSearch="showSearch"
|
|
|
@feedback="feedback"
|
|
|
@getList="getList"
|
|
|
+ :hasPermi="hasPermi"
|
|
|
:isItHidden="isItHidden"
|
|
|
:customButton="customButton"
|
|
|
:listStyle="listStyle"
|
|
@@ -64,6 +65,7 @@
|
|
|
@deletRows="deletRows"
|
|
|
@totalAmount="totalAmount"
|
|
|
@change="change"
|
|
|
+ :hasPermi="hasPermi"
|
|
|
:tatolLabel="tatolLabel"
|
|
|
:isItHidden="isItHidden"
|
|
|
:customButton="contentButton"
|
|
@@ -107,16 +109,16 @@
|
|
|
<tr>
|
|
|
<td class="column" style="width: 15%;border-top: none;">品名</td>
|
|
|
<td class="column" style="width: 15%;border-top: none;">单价</td>
|
|
|
- <td class="column" style="width: 15%;border-top: none;">采购计划(斤)</td>
|
|
|
- <td class="column" style="width: 15%;border-top: none;">实际重量(斤)</td>
|
|
|
+ <td class="column" style="width: 15%;border-top: none;">采购计划</td>
|
|
|
+ <td class="column" style="width: 15%;border-top: none;">实际重量</td>
|
|
|
<td class="column" style="width: 15%;border-top: none;">金额</td>
|
|
|
<td class="column" style="width: 20%;border-top: none;">备注</td>
|
|
|
</tr>
|
|
|
- <tr v-for="(item,index) in this.contentList" :key="index">
|
|
|
+ <tr v-for="(item,index) in contentList" :key="index">
|
|
|
<td class="column">{{item.feeName}}</td>
|
|
|
<td class="column">{{item.fUnitprice}}</td>
|
|
|
- <td class="column">{{item.fPurchase}}</td>
|
|
|
- <td class="column">{{item.fQty}}</td>
|
|
|
+ <td class="column">{{item.fPurchase}}({{item.fFeeunitName}})</td>
|
|
|
+ <td class="column">{{item.fQty}}({{item.fFeeunitName}})</td>
|
|
|
<td class="column">{{item.fAmount}}</td>
|
|
|
<td class="column">{{item.remark}}</td>
|
|
|
</tr>
|
|
@@ -166,7 +168,9 @@ import {
|
|
|
tableDeleteQuery,
|
|
|
confirmDeletion,
|
|
|
pleaseCheck,
|
|
|
- copyNew
|
|
|
+ copyNew,
|
|
|
+ revoke,
|
|
|
+ withdrawBy
|
|
|
} from '@/api/purchaseRequest/index'
|
|
|
import Cookies from 'js-cookie'
|
|
|
|
|
@@ -191,6 +195,10 @@ export default {
|
|
|
fFeeunitid: [],
|
|
|
fStltypeid: []
|
|
|
},
|
|
|
+ hasPermi:{
|
|
|
+ lookup:['anpin:stockControl:query'],
|
|
|
+ disappear:['anpin:stockControl:remove']
|
|
|
+ },
|
|
|
setTimeout:'',
|
|
|
searchWhether: true,
|
|
|
pageDisplay: true,
|
|
@@ -282,6 +290,7 @@ export default {
|
|
|
name: '操作',
|
|
|
checked: 0,
|
|
|
width: 160,
|
|
|
+ fixed:'right',
|
|
|
operation: '1',
|
|
|
onabort: ''
|
|
|
}
|
|
@@ -398,6 +407,7 @@ export default {
|
|
|
checked: 0,
|
|
|
disabled: false,
|
|
|
width: 160,
|
|
|
+ fixed:'right',
|
|
|
operation: '2',
|
|
|
onabort: ''
|
|
|
}
|
|
@@ -417,7 +427,8 @@ export default {
|
|
|
size: 'mini',
|
|
|
icon: 'el-icon-edit',
|
|
|
name: '新增',
|
|
|
- disabled: false
|
|
|
+ disabled: false,
|
|
|
+ hasPermi:['anpin:stockControl:anPingApply']
|
|
|
},
|
|
|
// {
|
|
|
// type:'warning',
|
|
@@ -431,13 +442,15 @@ export default {
|
|
|
size: 'mini',
|
|
|
icon: 'el-icon-upload2',
|
|
|
name: '导出',
|
|
|
- disabled: false
|
|
|
+ disabled: false,
|
|
|
+ hasPermi:['anpin:stockControl:export']
|
|
|
}, {
|
|
|
type: 'success',
|
|
|
size: 'mini',
|
|
|
icon: 'el-icon-c-scale-to-original',
|
|
|
name: '复制新增',
|
|
|
- disabled: false
|
|
|
+ disabled: false,
|
|
|
+ hasPermi:['anpin:stockControl:generateReceipts']
|
|
|
}
|
|
|
],
|
|
|
contentButton: [
|
|
@@ -550,7 +563,7 @@ export default {
|
|
|
label: 'cLoadDate',
|
|
|
name: '申请日期',
|
|
|
inputType: 3,
|
|
|
- width: 200,
|
|
|
+ width: 300,
|
|
|
labelSize: '80',
|
|
|
rules: [{ required: false, message: ' ' }]
|
|
|
}
|
|
@@ -909,6 +922,31 @@ export default {
|
|
|
if (list){
|
|
|
this.$refs.avatar.form = list.warehouseBills
|
|
|
this.contentList = list.tWarehousebillsfees
|
|
|
+ this.contentButton = this.$options.data().contentButton
|
|
|
+ if (this.$refs.avatar.form.fBillstatus === 6){
|
|
|
+ this.contentButton.push({
|
|
|
+ type: 'danger',
|
|
|
+ size: 'mini',
|
|
|
+ icon: 'el-icon-edit-outline',
|
|
|
+ name: '撤销采购',
|
|
|
+ disabled: false
|
|
|
+ })
|
|
|
+ }else if(this.$refs.avatar.form.fBillstatus === 4){
|
|
|
+ this.contentButton.push({
|
|
|
+ type: 'danger',
|
|
|
+ size: 'mini',
|
|
|
+ icon: 'el-icon-edit-outline',
|
|
|
+ name: '撤销审批',
|
|
|
+ disabled: false
|
|
|
+ })
|
|
|
+ }
|
|
|
+ this.contentButton.forEach(item =>{
|
|
|
+ if (item.name == '返回列表' || item.name == '修改' || item.name == '打印'){
|
|
|
+ item.disabled = false
|
|
|
+ }else {
|
|
|
+ item.disabled = true
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -939,6 +977,7 @@ export default {
|
|
|
}
|
|
|
this.$refs.avatar.form = {}
|
|
|
this.getRow(data,list)
|
|
|
+
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -1057,17 +1096,34 @@ export default {
|
|
|
this.$refs.avatar.submitForm('submit')
|
|
|
break
|
|
|
case '打印':
|
|
|
+ console.log(this.listData.fFeeid,this.contentList)
|
|
|
+ for (let item in this.contentList){
|
|
|
+ for (let li in this.listData.fFeeid){
|
|
|
+ if (this.contentList[item].fFeeid == this.listData.fFeeid[li].value){
|
|
|
+ this.contentList[item].feeName = this.listData.fFeeid[li].label
|
|
|
+ }
|
|
|
+ }
|
|
|
+ for(let i in this.listData.fFeeunitid){
|
|
|
+ if (this.contentList[item].fFeeunitid == this.listData.fFeeunitid[i].value){
|
|
|
+ this.contentList[item].fFeeunitName = this.listData.fFeeunitid[i].label
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
if (!this.$refs.avatar.form.fId){
|
|
|
this.$message.error('未保存,不允许打印');
|
|
|
+ }else if (this.$refs.avatar.form.fBillstatus >= 4){
|
|
|
+ this.formList = this.$refs.avatar.form
|
|
|
+ this.dialogVisible = true
|
|
|
}else {
|
|
|
this.formList = this.$refs.avatar.form
|
|
|
+ console.log(this.$refs.avatar.form.fBillstatus)
|
|
|
this.submitAndSave(1)
|
|
|
}
|
|
|
break
|
|
|
case '修改':
|
|
|
this.contentButton.forEach(item =>{
|
|
|
if (this.$refs.avatar.form.fBillstatus >= 4){
|
|
|
- if (item.name === '返回列表' || item.name === '修改' || item.name === '生成入库单' || item.name === '生成销售单' || item.name === '查看审批' || item.name === '审批'){
|
|
|
+ if (item.name === '返回列表' || item.name == '打印' || item.name === '修改' || item.name === '生成入库单' || item.name === '生成销售单' || item.name === '查看审批' || item.name === '审批' || item.name === '撤销采购' || item.name === '撤销审批'){
|
|
|
item.disabled = false
|
|
|
}else {
|
|
|
item.disabled = true
|
|
@@ -1187,6 +1243,51 @@ export default {
|
|
|
this.$message.warning('未选择列表,请选择后再点击');
|
|
|
}
|
|
|
break
|
|
|
+ case '撤销审批':
|
|
|
+ let date = new Date()
|
|
|
+ let y = date.getFullYear()
|
|
|
+ let m = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1)
|
|
|
+ let d = (date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate())
|
|
|
+ data = {
|
|
|
+ actId:520,
|
|
|
+ id:this.$refs.avatar.form.fId,
|
|
|
+ billId:this.$refs.avatar.form.fId,
|
|
|
+ auditItem:y + '-' + m + '-' + d
|
|
|
+ }
|
|
|
+ console.log(data)
|
|
|
+ revoke(data).then(res=>{
|
|
|
+ if (res.code === 200){
|
|
|
+ this.$message({
|
|
|
+ showClose: true,
|
|
|
+ message: '撤销成功',
|
|
|
+ type: 'success'
|
|
|
+ })
|
|
|
+ data = {
|
|
|
+ tableName: this.queryList.tableName,
|
|
|
+ userId: Cookies.get('userName')
|
|
|
+ }
|
|
|
+ this.getRow(data)
|
|
|
+ this.query(this.formDataList)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ break
|
|
|
+ case '撤销采购':
|
|
|
+ withdrawBy(this.$refs.avatar.form.fId).then(res=>{
|
|
|
+ if (res.code === 200){
|
|
|
+ this.$message({
|
|
|
+ showClose: true,
|
|
|
+ message: '撤销成功',
|
|
|
+ type: 'success'
|
|
|
+ })
|
|
|
+ data = {
|
|
|
+ tableName: this.queryList.tableName,
|
|
|
+ userId: Cookies.get('userName')
|
|
|
+ }
|
|
|
+ this.getRow(data)
|
|
|
+ this.query(this.formDataList)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ break
|
|
|
default:
|
|
|
this.$message.error('该按钮暂无功能')
|
|
|
}
|
|
@@ -1238,11 +1339,11 @@ export default {
|
|
|
this.$refs.avatar.submitForm()
|
|
|
} else if (res == '重置') {
|
|
|
this.$refs.avatar.form = {}
|
|
|
+ this.$refs.avatar.submitForm()
|
|
|
}
|
|
|
},
|
|
|
//表单验证通过执行搜索
|
|
|
submitForm() {
|
|
|
- console.log('111')
|
|
|
let list = this.formDataList
|
|
|
console.log(this.$refs.avatar.form)
|
|
|
this.formDataList = this.$refs.avatar.form
|