|
@@ -39,6 +39,22 @@
|
|
|
</el-pagination>
|
|
|
</div>
|
|
|
<div v-else class="app-container">
|
|
|
+ <div style="display: flex;margin-bottom: 10px">
|
|
|
+ <el-breadcrumb>
|
|
|
+ <el-breadcrumb-item style="font-weight: 700">采购申请</el-breadcrumb-item>
|
|
|
+ <el-breadcrumb-item style="font-weight: 700">采购申请详情页</el-breadcrumb-item>
|
|
|
+ <el-breadcrumb-item style="margin-top: -7px;">
|
|
|
+ <el-button
|
|
|
+ style="margin-left: 10px"
|
|
|
+ size="mini"
|
|
|
+ type="danger" plain
|
|
|
+ @click="backToList"
|
|
|
+ icon="el-icon-arrow-left">
|
|
|
+ 返回列表</el-button>
|
|
|
+ </el-breadcrumb-item>
|
|
|
+ </el-breadcrumb>
|
|
|
+ </div>
|
|
|
+ <h1 style="text-align: center;margin-top: -42px">采购申请单</h1>
|
|
|
<formComponent
|
|
|
v-if="searchWhether"
|
|
|
:formOption="contentOption"
|
|
@@ -440,7 +456,7 @@ export default {
|
|
|
type: 'primary',
|
|
|
size: 'mini',
|
|
|
icon: 'el-icon-edit',
|
|
|
- name: '新增',
|
|
|
+ name: '新单',
|
|
|
disabled: false,
|
|
|
hasPermi:['anpin:stockControl:anPingApply']
|
|
|
},
|
|
@@ -462,23 +478,16 @@ export default {
|
|
|
type: 'success',
|
|
|
size: 'mini',
|
|
|
icon: 'el-icon-c-scale-to-original',
|
|
|
- name: '复制新增',
|
|
|
+ name: '复制新单',
|
|
|
disabled: false,
|
|
|
hasPermi:['anpin:stockControl:generateReceipts']
|
|
|
}
|
|
|
],
|
|
|
- contentButton: [
|
|
|
- {
|
|
|
- type: 'danger',
|
|
|
- size: 'mini',
|
|
|
- icon: 'el-icon-arrow-left',
|
|
|
- name: '返回列表',
|
|
|
- disabled: false
|
|
|
- }, {
|
|
|
+ contentButton: [{
|
|
|
type: 'primary',
|
|
|
size: 'mini',
|
|
|
icon: 'el-icon-plus',
|
|
|
- name: '录入',
|
|
|
+ name: '录入明细',
|
|
|
disabled: false
|
|
|
}, {
|
|
|
type: 'primary',
|
|
@@ -491,14 +500,16 @@ export default {
|
|
|
type: 'primary',
|
|
|
size: 'mini',
|
|
|
icon: 'el-icon-plus',
|
|
|
- name: '新增(详情页)',
|
|
|
+ name: '新单',
|
|
|
+ nameTwo:'详情页',
|
|
|
plain: true,
|
|
|
disabled: false
|
|
|
},{
|
|
|
type: 'primary',
|
|
|
size: 'mini',
|
|
|
icon: 'el-icon-plus',
|
|
|
- name: '复制新增(行)',
|
|
|
+ name: '复制新单',
|
|
|
+ nameTwo:'详情页',
|
|
|
plain: true,
|
|
|
disabled: false
|
|
|
},{
|
|
@@ -1018,13 +1029,13 @@ export default {
|
|
|
}
|
|
|
this.contentButton.forEach(item =>{
|
|
|
if(this.$refs.avatar.form.fBillstatus < 4){
|
|
|
- if (item.name == '录入' || item.name == '保存' || item.name == '请核'){
|
|
|
+ if (item.name == '录入明细' || item.name == '保存' || item.name == '请核'){
|
|
|
item.disabled = true
|
|
|
}else {
|
|
|
item.disabled = false
|
|
|
}
|
|
|
}else{
|
|
|
- if (item.name == '录入' || item.name == '保存' || item.name == '请核' || item.name == '修改'){
|
|
|
+ if (item.name == '录入明细' || item.name == '保存' || item.name == '请核' || item.name == '修改'){
|
|
|
item.disabled = true
|
|
|
}else {
|
|
|
item.disabled = false
|
|
@@ -1043,7 +1054,7 @@ export default {
|
|
|
this.contentStyle.forEach(item => item.disabled = true)
|
|
|
console.log(this.contentStyle)
|
|
|
// this.contentButton.forEach(item =>{
|
|
|
- // if (item.name == '录入' || item.name == '保存' || item.name == '请核'){
|
|
|
+ // if (item.name == '录入明细' || item.name == '保存' || item.name == '请核'){
|
|
|
// item.disabled = true
|
|
|
// }else {
|
|
|
// item.disabled = false
|
|
@@ -1097,7 +1108,7 @@ export default {
|
|
|
selectionbox(selection) {
|
|
|
if (selection.length > 1){
|
|
|
this.customButton.forEach(item =>{
|
|
|
- if (item.name === '复制新增'){
|
|
|
+ if (item.name === '复制新单'){
|
|
|
item.disabled = true
|
|
|
}else {
|
|
|
item.disabled = false
|
|
@@ -1151,35 +1162,84 @@ export default {
|
|
|
Printing(){
|
|
|
this.$print(this.$refs.print)
|
|
|
},
|
|
|
- //所以按钮
|
|
|
- buttonList(row) {
|
|
|
- console.log(row)
|
|
|
+ //返回列表
|
|
|
+ backToList(){
|
|
|
let data
|
|
|
- switch (row.name) {
|
|
|
- case '新增':
|
|
|
- this.contentList = []
|
|
|
+ if (!this.$refs.avatar.form.fId && this.contentList !== 0 || this.$refs.avatar.form.fBillstatus > 3 && !this.$route.query.data) {
|
|
|
+ data = {
|
|
|
+ tableName: this.queryList.tableName,
|
|
|
+ userId: Cookies.get('userName')
|
|
|
+ }
|
|
|
+ this.getRow(data)
|
|
|
+ this.query(this.formDataList)
|
|
|
+ } else if(this.$route.query.data){
|
|
|
+ this.cancelTwo();
|
|
|
+ this.$router.push({path:'/index'})
|
|
|
+ }else {
|
|
|
+ this.$confirm('当前数据未保存是否保存?', '提示', {
|
|
|
+ confirmButtonText: '保存',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ this.submitAndSave(2)
|
|
|
+ }).catch(() => {
|
|
|
data = {
|
|
|
- tableName: this.purchaseList.tableName,
|
|
|
+ tableName: this.queryList.tableName,
|
|
|
userId: Cookies.get('userName')
|
|
|
}
|
|
|
- this.$refs.avatar.form = {}
|
|
|
this.getRow(data)
|
|
|
- this.contentOption.forEach(item => {
|
|
|
- if (item.label == 'personNaem' || item.label == 'corpsName' || item.label == 'createBy' || item.label == 'fBillno') {
|
|
|
- item.disabled = true
|
|
|
- } else {
|
|
|
- item.disabled = false
|
|
|
+ this.query(this.formDataList)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //所以按钮
|
|
|
+ buttonList(row) {
|
|
|
+ console.log(row)
|
|
|
+ let data
|
|
|
+ switch (row.name) {
|
|
|
+ case '新单':
|
|
|
+ if (row.nameTwo === '详情页'){
|
|
|
+ this.contentList = []
|
|
|
+ data = {
|
|
|
+ tableName: this.purchaseList.tableName,
|
|
|
+ userId: Cookies.get('userName')
|
|
|
}
|
|
|
- })
|
|
|
- this.contentButton.forEach(item => item.disabled = false)
|
|
|
- this.contentStyle.forEach(item => item.disabled = false)
|
|
|
- this.$refs.avatar.form.createBy = Cookies.get('userName')
|
|
|
+ this.$refs.avatar.form = {}
|
|
|
+ this.getRow(data)
|
|
|
+ this.$refs.avatar.clearVerification()
|
|
|
+ this.contentOption.forEach(item => {
|
|
|
+ if (item.label == 'personNaem' || item.label == 'corpsName' || item.label == 'createBy' || item.label == 'fBillno') {
|
|
|
+ item.disabled = true
|
|
|
+ } else {
|
|
|
+ item.disabled = false
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.contentButton.forEach(item => item.disabled = false)
|
|
|
+ this.contentStyle.forEach(item => item.disabled = false)
|
|
|
+ this.$refs.avatar.form.createBy = Cookies.get('userName')
|
|
|
+ }else {
|
|
|
+ this.contentList = []
|
|
|
+ data = {
|
|
|
+ tableName: this.purchaseList.tableName,
|
|
|
+ userId: Cookies.get('userName')
|
|
|
+ }
|
|
|
+ this.$refs.avatar.form = {}
|
|
|
+ this.getRow(data)
|
|
|
+ this.contentOption.forEach(item => {
|
|
|
+ if (item.label == 'personNaem' || item.label == 'corpsName' || item.label == 'createBy' || item.label == 'fBillno') {
|
|
|
+ item.disabled = true
|
|
|
+ } else {
|
|
|
+ item.disabled = false
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.contentButton.forEach(item => item.disabled = false)
|
|
|
+ this.contentStyle.forEach(item => item.disabled = false)
|
|
|
+ this.$refs.avatar.form.createBy = Cookies.get('userName')
|
|
|
+ }
|
|
|
break
|
|
|
case '保存':
|
|
|
this.$refs.avatar.submitForm('submit')
|
|
|
break
|
|
|
- case '新增(详情页)':
|
|
|
- break
|
|
|
case '打印':
|
|
|
console.log(this.listData.fFeeid,this.contentList)
|
|
|
for (let item in this.contentList){
|
|
@@ -1227,7 +1287,7 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
break
|
|
|
- case '录入':
|
|
|
+ case '录入明细':
|
|
|
this.contentList.push({
|
|
|
fFeeid: '',
|
|
|
fUnitprice: '',
|
|
@@ -1249,35 +1309,6 @@ export default {
|
|
|
case '审批':
|
|
|
this.addOrUpdateHand()
|
|
|
break
|
|
|
- case '返回列表':
|
|
|
- console.log(this.$route.query.data)
|
|
|
- if (!this.$refs.avatar.form.fId && this.contentList !== 0 || this.$refs.avatar.form.fBillstatus > 3 && !this.$route.query.data) {
|
|
|
- data = {
|
|
|
- tableName: this.queryList.tableName,
|
|
|
- userId: Cookies.get('userName')
|
|
|
- }
|
|
|
- this.getRow(data)
|
|
|
- this.query(this.formDataList)
|
|
|
- } else if(this.$route.query.data){
|
|
|
- this.cancelTwo();
|
|
|
- this.$router.push({path:'/index'})
|
|
|
- }else {
|
|
|
- this.$confirm('当前数据未保存是否保存?', '提示', {
|
|
|
- confirmButtonText: '保存',
|
|
|
- cancelButtonText: '取消',
|
|
|
- type: 'warning'
|
|
|
- }).then(() => {
|
|
|
- this.submitAndSave(2)
|
|
|
- }).catch(() => {
|
|
|
- data = {
|
|
|
- tableName: this.queryList.tableName,
|
|
|
- userId: Cookies.get('userName')
|
|
|
- }
|
|
|
- this.getRow(data)
|
|
|
- this.query(this.formDataList)
|
|
|
- })
|
|
|
- }
|
|
|
- break
|
|
|
case '请核':
|
|
|
if (this.$refs.avatar.form.fBillstatus < 4){
|
|
|
this.$refs.avatar.submitForm('check')
|
|
@@ -1324,15 +1355,17 @@ export default {
|
|
|
});
|
|
|
})
|
|
|
break
|
|
|
- case '复制新增':
|
|
|
- if (this.selection.length > 0){
|
|
|
+ case '复制新单':
|
|
|
+
|
|
|
+ if (row.nameTwo === '详情页'){
|
|
|
+ console.log(this.$refs.avatar.form)
|
|
|
let datae = {
|
|
|
- fId:this.selection[0].fId,
|
|
|
+ fId:this.$refs.avatar.form.fId,
|
|
|
fBilltype:'SQ'
|
|
|
}
|
|
|
copyNew(datae).then(res=>{
|
|
|
this.$message({
|
|
|
- message: '复制新增成功',
|
|
|
+ message: '复制新单成功',
|
|
|
type: 'success',
|
|
|
showClose:true
|
|
|
});
|
|
@@ -1345,7 +1378,28 @@ export default {
|
|
|
this.viewMethod(scope)
|
|
|
})
|
|
|
}else {
|
|
|
- this.$message.warning('未选择列表,请选择后再点击');
|
|
|
+ if (this.selection.length > 0){
|
|
|
+ let datae = {
|
|
|
+ fId:this.selection[0].fId,
|
|
|
+ fBilltype:'SQ'
|
|
|
+ }
|
|
|
+ copyNew(datae).then(res=>{
|
|
|
+ this.$message({
|
|
|
+ message: '复制新单成功',
|
|
|
+ type: 'success',
|
|
|
+ showClose:true
|
|
|
+ });
|
|
|
+ let scope = {
|
|
|
+ row:{
|
|
|
+ fId:res.data
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.query(this.formDataList)
|
|
|
+ this.viewMethod(scope)
|
|
|
+ })
|
|
|
+ }else {
|
|
|
+ this.$message.warning('未选择列表,请选择后再点击');
|
|
|
+ }
|
|
|
}
|
|
|
break
|
|
|
case '撤销审批':
|