|
@@ -25,6 +25,7 @@
|
|
|
:listStyle="listStyle"
|
|
|
:queryList="queryList"
|
|
|
:setRowList="setRowList"
|
|
|
+ :tatolLabel="tatolLabel"
|
|
|
/>
|
|
|
<el-pagination
|
|
|
style="float: right;margin-top: 10px"
|
|
@@ -44,6 +45,7 @@
|
|
|
:dataList="dataList"
|
|
|
:inDex="inDex"
|
|
|
ref="avatar"
|
|
|
+ @writeOff="writeOff"
|
|
|
@submitForm="submitForm"
|
|
|
@returnToForm="returnToForm"
|
|
|
@submitAndSave="submitAndSave"
|
|
@@ -65,7 +67,7 @@
|
|
|
:tatolLabel="tatolLabel"
|
|
|
:isItHidden="isItHidden"
|
|
|
:customButton="contentButton"
|
|
|
- :listStyle="listStyle"
|
|
|
+ :listStyle="contentStyle"
|
|
|
:queryList="purchaseList"
|
|
|
:setRowList="setRowList"
|
|
|
:listData="listData"
|
|
@@ -151,7 +153,7 @@ import {
|
|
|
warehouse,
|
|
|
listDelete,
|
|
|
tableDeleteQuery,
|
|
|
- confirmDeletion
|
|
|
+ confirmDeletion, pleaseCheck
|
|
|
} from '@/api/purchaseRequest/index'
|
|
|
import Cookies from 'js-cookie'
|
|
|
|
|
@@ -161,7 +163,7 @@ export default {
|
|
|
return {
|
|
|
total:0,
|
|
|
formDataList:{
|
|
|
- fBilltype: 'SQ',
|
|
|
+ fBilltype: 'XS',
|
|
|
pageSize:10,
|
|
|
pageNum:1,
|
|
|
},
|
|
@@ -171,15 +173,17 @@ export default {
|
|
|
listData: {
|
|
|
fFeeid: [],
|
|
|
fFeeunitid: [],
|
|
|
- fStltypeid: []
|
|
|
+ fStltypeid: [],
|
|
|
},
|
|
|
+ setTimeout:'',
|
|
|
searchWhether: true,
|
|
|
pageDisplay: true,
|
|
|
dataList: {
|
|
|
fGoodsid: [],
|
|
|
fSbu: [],
|
|
|
fWarehouseid: [],
|
|
|
- fCorpid: []
|
|
|
+ fCorpid: [],
|
|
|
+ fMarketTypid:[]
|
|
|
},
|
|
|
contentList: [],
|
|
|
inDex: 4,
|
|
@@ -238,13 +242,21 @@ export default {
|
|
|
onabort: ''
|
|
|
}, {
|
|
|
surface: '8',
|
|
|
+ label: 'fBillstatusName',
|
|
|
+ name: '状态',
|
|
|
+ checked: 0,
|
|
|
+ width: 100,
|
|
|
+ onabort: ''
|
|
|
+ },
|
|
|
+ {
|
|
|
+ surface: '9',
|
|
|
label: 'fReviewDate',
|
|
|
name: '审核日期',
|
|
|
checked: 0,
|
|
|
width: 100,
|
|
|
onabort: ''
|
|
|
},{
|
|
|
- surface: '9',
|
|
|
+ surface: '10',
|
|
|
label: 'remark',
|
|
|
name: '备注',
|
|
|
checked: 0,
|
|
@@ -287,8 +299,7 @@ export default {
|
|
|
disabled: false,
|
|
|
onabort: 'this.value=this.value.replace(/[^\\-?\\d.]/g,"").replace(/^(\\-)*(\\d+)\\.(\\d\\d).*$/, "$1$2.$3")',
|
|
|
changeable: 2
|
|
|
- },
|
|
|
- {
|
|
|
+ }, {
|
|
|
surface: '4',
|
|
|
label: 'fPurchase',
|
|
|
name: '重量',
|
|
@@ -297,17 +308,16 @@ export default {
|
|
|
onabort: '',
|
|
|
disabled: false,
|
|
|
changeable: 2
|
|
|
- },
|
|
|
- {
|
|
|
+ }, {
|
|
|
surface: '5',
|
|
|
label: 'fQty',
|
|
|
name: '实际重量',
|
|
|
checked: 0,
|
|
|
width: 100,
|
|
|
- onabort: 'this.value=this.value.replace(/[^\\-?\\d.]/g,"").replace(/^(\\-)*(\\d+)\\.(\\d\\d).*$/, "$1$2.$3")',
|
|
|
+ onabort: '',
|
|
|
disabled: false,
|
|
|
changeable: 2
|
|
|
- }, {
|
|
|
+ },{
|
|
|
surface: '6',
|
|
|
label: 'fFeeunitid',
|
|
|
name: '计量单位',
|
|
@@ -325,19 +335,8 @@ export default {
|
|
|
onabort: 'this.value=this.value.replace(/[^\\-?\\d.]/g,"").replace(/^(\\-)*(\\d+)\\.(\\d\\d).*$/, "$1$2.$3")',
|
|
|
disabled: false,
|
|
|
changeable: 2
|
|
|
- },
|
|
|
- // {
|
|
|
- // surface: '8',
|
|
|
- // label: 'fStltypeid',
|
|
|
- // name: '付费方式',
|
|
|
- // checked: 0,
|
|
|
- // width: 100,
|
|
|
- // onabort: '',
|
|
|
- // disabled: false,
|
|
|
- // changeable: 1
|
|
|
- // },
|
|
|
- {
|
|
|
- surface: '9',
|
|
|
+ }, {
|
|
|
+ surface: '8',
|
|
|
label: 'remark',
|
|
|
name: '备注',
|
|
|
checked: 0,
|
|
@@ -345,16 +344,16 @@ export default {
|
|
|
onabort: '',
|
|
|
disabled: false,
|
|
|
changeable: 2
|
|
|
+ }, {
|
|
|
+ surface: '9',
|
|
|
+ label: 'createTime',
|
|
|
+ name: '申请日期',
|
|
|
+ checked: 0,
|
|
|
+ disabled: false,
|
|
|
+ width: 100,
|
|
|
+ onabort: ''
|
|
|
},
|
|
|
// {
|
|
|
- // surface: '10',
|
|
|
- // label: 'createTime',
|
|
|
- // name: '申请日期',
|
|
|
- // checked: 0,
|
|
|
- // disabled: false,
|
|
|
- // width: 100,
|
|
|
- // onabort: ''
|
|
|
- // }, {
|
|
|
// surface: '11',
|
|
|
// label: 'createBy',
|
|
|
// name: '申请人',
|
|
@@ -362,8 +361,7 @@ export default {
|
|
|
// checked: 0,
|
|
|
// width: 100,
|
|
|
// onabort: ''
|
|
|
- // },
|
|
|
- // {
|
|
|
+ // }, {
|
|
|
// surface: '12',
|
|
|
// label: 'fReviewDate',
|
|
|
// name: '审核日期',
|
|
@@ -384,11 +382,11 @@ export default {
|
|
|
}
|
|
|
],
|
|
|
queryList: {
|
|
|
- tableName: '采购申请',
|
|
|
+ tableName: '销售出库',
|
|
|
columnList: []
|
|
|
},
|
|
|
purchaseList: {
|
|
|
- tableName: '采购申请详情',
|
|
|
+ tableName: '销售出库详情',
|
|
|
columnList: []
|
|
|
},
|
|
|
setRowList: [],
|
|
@@ -467,21 +465,13 @@ export default {
|
|
|
icon: 'el-icon-edit-outline',
|
|
|
name: '请核',
|
|
|
disabled: false
|
|
|
- },
|
|
|
- {
|
|
|
+ },{
|
|
|
type: 'info',
|
|
|
size: 'mini',
|
|
|
icon: 'el-icon-edit-outline',
|
|
|
name: '申请发票',
|
|
|
disabled: false
|
|
|
},
|
|
|
- //{
|
|
|
- // type: 'info',
|
|
|
- // size: 'mini',
|
|
|
- // icon: 'el-icon-edit-outline',
|
|
|
- // name: '生成销售单',
|
|
|
- // disabled: false
|
|
|
- // }
|
|
|
],
|
|
|
formOption: [
|
|
|
{
|
|
@@ -503,7 +493,7 @@ export default {
|
|
|
}, {
|
|
|
span: 6,
|
|
|
label: 'fCorpid',
|
|
|
- name: '供应商',
|
|
|
+ name: '客户名称',
|
|
|
inputType: 2,
|
|
|
width: 200,
|
|
|
labelSize: '80',
|
|
@@ -518,16 +508,16 @@ export default {
|
|
|
rules: [{ required: false, message: ' ' }]
|
|
|
}, {
|
|
|
span: 6,
|
|
|
- label: 'moneys',
|
|
|
- name: '金额',
|
|
|
- inputType: 5,
|
|
|
+ label: 'fWarehouseid',
|
|
|
+ name: '仓库',
|
|
|
+ inputType: 1,
|
|
|
width: 200,
|
|
|
labelSize: '80',
|
|
|
rules: [{ required: false, message: ' ' }]
|
|
|
}, {
|
|
|
span: 6,
|
|
|
label: 'cLoadDate',
|
|
|
- name: '申请日期',
|
|
|
+ name: '出库日期',
|
|
|
inputType: 3,
|
|
|
width: 200,
|
|
|
labelSize: '80',
|
|
@@ -556,36 +546,40 @@ export default {
|
|
|
disabled: true,
|
|
|
rules: [{ required: true, message: ' ' }]
|
|
|
}, {
|
|
|
- index:'3',
|
|
|
+ index:'5',
|
|
|
span: 6,
|
|
|
- label: 'personNaem',
|
|
|
- name: '项目主管',
|
|
|
+ label: 'corpsName',
|
|
|
+ name: '客户名称',
|
|
|
inputType: 2,
|
|
|
width: 200,
|
|
|
labelSize: '80',
|
|
|
disabled: true,
|
|
|
rules: [{ required: false, message: ' ' }]
|
|
|
- }, {
|
|
|
- index:'4',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ index:'3',
|
|
|
span: 6,
|
|
|
- label: 'corpsName',
|
|
|
- name: '客户',
|
|
|
- inputType: 2,
|
|
|
+ label: 'fMarketTypid',
|
|
|
+ name: '出库类别',
|
|
|
+ inputType: 1,
|
|
|
width: 200,
|
|
|
labelSize: '80',
|
|
|
disabled: true,
|
|
|
rules: [{ required: false, message: ' ' }]
|
|
|
- }, {
|
|
|
- index:'5',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ index:'4',
|
|
|
span: 6,
|
|
|
- label: 'fCorpid',
|
|
|
- name: '供应商',
|
|
|
- inputType: 1,
|
|
|
+ label: 'fStudentsWeight',
|
|
|
+ name: '人数',
|
|
|
+ inputType: 2,
|
|
|
+ onabort: 'this.value=this.value.replace(/[^0-9]/g,\'\')',
|
|
|
width: 200,
|
|
|
- labelSize: '80',
|
|
|
disabled: true,
|
|
|
+ labelSize: '80',
|
|
|
rules: [{ required: true, message: ' ' }]
|
|
|
- }, {
|
|
|
+ },
|
|
|
+ {
|
|
|
index:'6',
|
|
|
span: 6,
|
|
|
label: 'fWarehouseid',
|
|
@@ -599,49 +593,27 @@ export default {
|
|
|
index:'7',
|
|
|
span: 6,
|
|
|
label: 'fBsdate',
|
|
|
- name: '提货日期',
|
|
|
+ name: '出库日期',
|
|
|
inputType: 6,
|
|
|
width: 200,
|
|
|
disabled: true,
|
|
|
labelSize: '80',
|
|
|
rules: [{ required: true, message: ' ' }]
|
|
|
- }, {
|
|
|
- index:'8',
|
|
|
- span: 6,
|
|
|
- label: 'createBy',
|
|
|
- name: '申请人',
|
|
|
- inputType: 2,
|
|
|
- width: 200,
|
|
|
- disabled: true,
|
|
|
- labelSize: '80',
|
|
|
- rules: [{ required: false, message: ' ' }]
|
|
|
},
|
|
|
+ // {
|
|
|
+ // index:'8',
|
|
|
+ // span: 6,
|
|
|
+ // label: 'createBy',
|
|
|
+ // name: '申请人',
|
|
|
+ // inputType: 2,
|
|
|
+ // width: 200,
|
|
|
+ // disabled: true,
|
|
|
+ // labelSize: '80',
|
|
|
+ // rules: [{ required: false, message: ' ' }]
|
|
|
+ // },
|
|
|
{
|
|
|
index:'9',
|
|
|
span: 6,
|
|
|
- label: 'fStudentsWeight',
|
|
|
- name: '学生人数',
|
|
|
- inputType: 2,
|
|
|
- onabort: 'this.value=this.value.replace(/[^0-9]/g,\'\')',
|
|
|
- width: 200,
|
|
|
- disabled: true,
|
|
|
- labelSize: '80',
|
|
|
- rules: [{ required: true, message: ' ' }]
|
|
|
- }, {
|
|
|
- index:'10',
|
|
|
- span: 6,
|
|
|
- label: 'fTeachersWeight',
|
|
|
- name: '教师人数',
|
|
|
- onabort: 'this.value=this.value.replace(/[^0-9]/g,\'\')',
|
|
|
- inputType: 2,
|
|
|
- width: 200,
|
|
|
- disabled: true,
|
|
|
- labelSize: '80',
|
|
|
- rules: [{ required: true, message: ' ' }]
|
|
|
- },
|
|
|
- {
|
|
|
- index:'11',
|
|
|
- span: 6,
|
|
|
label: 'fSbu',
|
|
|
name: '开票公司',
|
|
|
inputType: 1,
|
|
@@ -650,7 +622,7 @@ export default {
|
|
|
labelSize: '80',
|
|
|
rules: [{ required: true, message: ' ' }]
|
|
|
}, {
|
|
|
- index:'12',
|
|
|
+ index:'10',
|
|
|
span: 6,
|
|
|
label: 'remark',
|
|
|
name: '备注',
|
|
@@ -700,6 +672,16 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
})
|
|
|
+ this.getDicts('f_deliveryCategory').then(res => {
|
|
|
+ console.log(res)
|
|
|
+ for (let item in res.data) {
|
|
|
+ this.dataList.fMarketTypid.push({
|
|
|
+ label: res.data[item].dictLabel,
|
|
|
+ value: JSON.parse(res.data[item].dictValue)
|
|
|
+ })
|
|
|
+ console.log(this.listData.fMarketTypid)
|
|
|
+ }
|
|
|
+ })
|
|
|
queryItem().then(res => {
|
|
|
console.log(res)
|
|
|
for (let item in res.data) {
|
|
@@ -774,11 +756,10 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
//查询列数据
|
|
|
- getRow(data) {
|
|
|
- console.log(data.tableName)
|
|
|
+ getRow(data,list) {
|
|
|
select(data).then((res) => {
|
|
|
console.log(res)
|
|
|
- if (data.tableName === '采购申请详情') {
|
|
|
+ if (data.tableName === '销售出库详情') {
|
|
|
if (res.data.length != 0) {
|
|
|
this.purchaseList.columnList = res.data.filter((e) => e.checked == 0)
|
|
|
this.purchaseList.columnList = res.data
|
|
@@ -810,6 +791,11 @@ export default {
|
|
|
this.isItHidden = true
|
|
|
this.inDex = 4
|
|
|
}
|
|
|
+ this.$refs.avatar.form = {}
|
|
|
+ if (list){
|
|
|
+ this.$refs.avatar.form = list.warehouseBills
|
|
|
+ this.contentList = list.tWarehousebillsfees
|
|
|
+ }
|
|
|
})
|
|
|
},
|
|
|
returnToForm(row) {
|
|
@@ -826,10 +812,42 @@ export default {
|
|
|
tableName: this.purchaseList.tableName,
|
|
|
userId: Cookies.get('userName')
|
|
|
}
|
|
|
+ let list ={
|
|
|
+ warehouseBills:res.data.warehouseBills,
|
|
|
+ tWarehousebillsfees:res.data.tWarehousebillsfees
|
|
|
+ }
|
|
|
this.$refs.avatar.form = {}
|
|
|
- this.getRow(data)
|
|
|
+ this.getRow(data,list)
|
|
|
+ for(let li in this.contentButton){
|
|
|
+ if(this.contentButton[li].name == '返回列表' || this.contentButton[li].name == '修改'){
|
|
|
+ this.contentButton[li].disabled = false
|
|
|
+ }else {
|
|
|
+ this.contentButton[li].disabled = true
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ //请核
|
|
|
+ writeOff(){
|
|
|
+ let formData = new window.FormData()
|
|
|
+ formData.append('tWarehousebills', JSON.stringify(this.$refs.avatar.form))
|
|
|
+ formData.append('tWarehousebillsfees', JSON.stringify(this.contentList))
|
|
|
+ formData.append('fBilltype', 'XS')
|
|
|
+ pleaseCheck(formData).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.$message.success('请核成功')
|
|
|
this.$refs.avatar.form = res.data.warehouseBills
|
|
|
- this.contentList = res.data.tWarehousebillsfees
|
|
|
+ this.contentList = res.data.tWarehousebillsCntrs
|
|
|
+ this.contentOption.forEach(item => item.disabled = true)
|
|
|
+ this.contentStyle.forEach(item => item.disabled = true)
|
|
|
+ this.contentButton.forEach(item =>{
|
|
|
+ if (item.name == '返回列表'){
|
|
|
+ item.disabled = false
|
|
|
+ }else {
|
|
|
+ item.disabled = true
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -852,10 +870,7 @@ export default {
|
|
|
type: 'success',
|
|
|
message: '删除成功!'
|
|
|
})
|
|
|
- let list = {
|
|
|
- fBilltype: 'SQ'
|
|
|
- }
|
|
|
- this.query(list)
|
|
|
+ this.query(this.formDataList)
|
|
|
})
|
|
|
}).catch(() => {
|
|
|
this.$message({
|
|
@@ -872,12 +887,17 @@ export default {
|
|
|
//详情内容保存
|
|
|
submitAndSave(item) {
|
|
|
let formData = new window.FormData()
|
|
|
+ this.$refs.avatar.form.fMoney = 0
|
|
|
+ for(let li in this.contentList){
|
|
|
+ this.$refs.avatar.form.fMoney += Number(this.contentList[li].fAmount)
|
|
|
+ }
|
|
|
formData.append('tWarehousebills', JSON.stringify(this.$refs.avatar.form))
|
|
|
formData.append('tWarehousebillsfees', JSON.stringify(this.contentList))
|
|
|
- formData.append('fBilltype', 'SQ')
|
|
|
+ formData.append('fBilltype', 'XS')
|
|
|
submit(formData).then(res => {
|
|
|
if (res.code == 200) {
|
|
|
this.$message.success('保存成功')
|
|
|
+ console.log(res.data.warehouseBills)
|
|
|
this.$refs.avatar.form = res.data.warehouseBills
|
|
|
this.contentList = res.data.tWarehousebillsCntrs
|
|
|
console.log(this.dataList, this.contentList)
|
|
@@ -918,13 +938,13 @@ export default {
|
|
|
this.getRow(data)
|
|
|
|
|
|
this.contentOption.forEach(item => {
|
|
|
- if (item.label == 'personNaem' || item.label == 'corpsName' || item.label == 'createBy') {
|
|
|
+ if (item.label == 'personNaem' || item.label == 'corpsName' || item.label == 'fBillno') {
|
|
|
item.disabled = true
|
|
|
} else {
|
|
|
item.disabled = false
|
|
|
}
|
|
|
})
|
|
|
- this.$refs.avatar.form.createBy = Cookies.get('userName')
|
|
|
+ // this.$refs.avatar.form.createBy = Cookies.get('userName')
|
|
|
break
|
|
|
case '保存':
|
|
|
this.$refs.avatar.submitForm('submit')
|
|
@@ -938,14 +958,25 @@ export default {
|
|
|
}
|
|
|
break
|
|
|
case '修改':
|
|
|
- this.contentOption.forEach(item => {
|
|
|
- if (item.label == 'personNaem' || item.label == 'corpsName' || item.label == 'createBy') {
|
|
|
- item.disabled = true
|
|
|
- } else {
|
|
|
+ this.contentButton.forEach(item =>{
|
|
|
+ if (this.$refs.avatar.form.fBillstatus > 4){
|
|
|
+ if (item.name === '返回列表' || item.name === '修改' || item.name === '申请发票'){
|
|
|
+ item.disabled = false
|
|
|
+ }else {
|
|
|
+ item.disabled = true
|
|
|
+ }
|
|
|
+ }else {
|
|
|
item.disabled = false
|
|
|
+ this.contentStyle.forEach(item => item.disabled = false)
|
|
|
+ this.contentOption.forEach(item => {
|
|
|
+ if (item.label == 'personNaem' || item.label == 'corpsName' || item.label == 'fBillno') {
|
|
|
+ item.disabled = true
|
|
|
+ } else {
|
|
|
+ item.disabled = false
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
})
|
|
|
- this.contentStyle.forEach(item => item.disabled = false)
|
|
|
break
|
|
|
case '录入':
|
|
|
this.contentList.push({
|
|
@@ -964,17 +995,13 @@ export default {
|
|
|
})
|
|
|
break
|
|
|
case '返回列表':
|
|
|
- if (!this.$refs.avatar.form || this.contentList !== 0) {
|
|
|
+ if (!this.$refs.avatar.form.fId && this.contentList !== 0 || this.$refs.avatar.form.fBillstatus >= 4) {
|
|
|
data = {
|
|
|
tableName: this.queryList.tableName,
|
|
|
userId: Cookies.get('userName')
|
|
|
}
|
|
|
- this.$refs.avatar.form = {}
|
|
|
this.getRow(data)
|
|
|
- let list = {
|
|
|
- fBilltype: 'SQ'
|
|
|
- }
|
|
|
- this.query(list)
|
|
|
+ this.query(this.formDataList)
|
|
|
} else {
|
|
|
this.$confirm('当前数据未保存是否保存?', '提示', {
|
|
|
confirmButtonText: '保存',
|
|
@@ -982,22 +1009,23 @@ export default {
|
|
|
type: 'warning'
|
|
|
}).then(() => {
|
|
|
this.submitAndSave()
|
|
|
- console.log('111112')
|
|
|
}).catch(() => {
|
|
|
data = {
|
|
|
tableName: this.queryList.tableName,
|
|
|
userId: Cookies.get('userName')
|
|
|
}
|
|
|
- this.$refs.avatar.form = {}
|
|
|
this.getRow(data)
|
|
|
- let list = {
|
|
|
- fBilltype: 'SQ'
|
|
|
- }
|
|
|
- this.query(list)
|
|
|
- console.log('333')
|
|
|
+ this.query(this.formDataList)
|
|
|
})
|
|
|
}
|
|
|
break
|
|
|
+ case '请核':
|
|
|
+ if (this.$refs.avatar.form.fBillstatus < 4){
|
|
|
+ this.$refs.avatar.submitForm('check')
|
|
|
+ }else{
|
|
|
+ this.$message.error("请先保存")
|
|
|
+ }
|
|
|
+ break
|
|
|
default:
|
|
|
this.$message.error('该按钮暂无功能')
|
|
|
}
|
|
@@ -1024,9 +1052,7 @@ export default {
|
|
|
},
|
|
|
//表单验证通过执行搜索
|
|
|
submitForm() {
|
|
|
- console.log('111')
|
|
|
let list = this.formDataList
|
|
|
- console.log(this.$refs.avatar.form)
|
|
|
this.formDataList = this.$refs.avatar.form
|
|
|
this.formDataList.fBilltype = list.fBilltype
|
|
|
this.formDataList.pageSize = list.pageSize
|