|
@@ -464,7 +464,7 @@ export default {
|
|
|
name: '录入明细',
|
|
|
nameTwo:'详情页',
|
|
|
// plain: true,
|
|
|
- disabled: false,
|
|
|
+ disabled: false
|
|
|
},
|
|
|
{
|
|
|
type: 'success',
|
|
@@ -523,13 +523,13 @@ export default {
|
|
|
disabled: false,
|
|
|
hasPermi:['anpin:stockControl:cannibalize']
|
|
|
},{
|
|
|
- type: 'info',
|
|
|
- size: 'mini',
|
|
|
- icon: 'el-icon-edit-outline',
|
|
|
- name: '撤销调拨',
|
|
|
- disabled: false,
|
|
|
- hasPermi:['anpin:stockControl:cannibalize']
|
|
|
- }
|
|
|
+ type: 'info',
|
|
|
+ size: 'mini',
|
|
|
+ icon: 'el-icon-edit-outline',
|
|
|
+ name: '撤销调拨',
|
|
|
+ disabled: false,
|
|
|
+ hasPermi:['anpin:stockControl:cannibalize']
|
|
|
+ }
|
|
|
],
|
|
|
// 首页表头
|
|
|
listStyle: [
|
|
@@ -649,6 +649,7 @@ export default {
|
|
|
checked: 0,
|
|
|
width: 100,
|
|
|
onabort: '',
|
|
|
+ disabled: false,
|
|
|
fixed: 'left'
|
|
|
},
|
|
|
{
|
|
@@ -658,6 +659,7 @@ export default {
|
|
|
checked: 0,
|
|
|
width: 100,
|
|
|
onabort: '',
|
|
|
+ disabled: false,
|
|
|
//changeable: 1 下拉 2 input 3 date
|
|
|
changeable: 1
|
|
|
},
|
|
@@ -668,6 +670,7 @@ export default {
|
|
|
checked: 0,
|
|
|
width: 100,
|
|
|
onabort: '',
|
|
|
+ disabled: false,
|
|
|
changeable: 1
|
|
|
},
|
|
|
{
|
|
@@ -677,6 +680,7 @@ export default {
|
|
|
checked: 0,
|
|
|
width: 100,
|
|
|
onabort: '',
|
|
|
+ disabled: false,
|
|
|
changeable: 1
|
|
|
},
|
|
|
{
|
|
@@ -686,112 +690,125 @@ export default {
|
|
|
checked: 0,
|
|
|
width: 100,
|
|
|
onabort: '',
|
|
|
+ disabled: false,
|
|
|
changeable: 1
|
|
|
},
|
|
|
{
|
|
|
- surface: '7',
|
|
|
+ surface: '6',
|
|
|
label: 'fGrossweightblc',
|
|
|
name: '库存数量',
|
|
|
checked: 0,
|
|
|
width: 100,
|
|
|
onabort: '',
|
|
|
- disabled: true
|
|
|
+ changeable: 0,
|
|
|
+ disabled: false
|
|
|
},
|
|
|
{
|
|
|
- surface: '8',
|
|
|
+ surface: '7',
|
|
|
label: 'fVolumnblc',
|
|
|
name: '库存单价',
|
|
|
checked: 0,
|
|
|
width: 100,
|
|
|
onabort: '',
|
|
|
- disabled: true
|
|
|
+ // changeable: 2,
|
|
|
+ disabled: false
|
|
|
},
|
|
|
{
|
|
|
- surface: '9',
|
|
|
+ surface: '8',
|
|
|
label: 'fAllotWarehouseid',
|
|
|
name: '调入库区',
|
|
|
checked: 0,
|
|
|
width: 100,
|
|
|
onabort: '',
|
|
|
+ disabled: false,
|
|
|
changeable: 1
|
|
|
},
|
|
|
{
|
|
|
- surface: '10',
|
|
|
+ surface: '9',
|
|
|
label: 'fQty',
|
|
|
name: '数量',
|
|
|
checked: 0,
|
|
|
width: 100,
|
|
|
onabort: '',
|
|
|
+ disabled: false,
|
|
|
changeable: 2
|
|
|
},
|
|
|
{
|
|
|
- surface: '11',
|
|
|
+ surface: '10',
|
|
|
label: 'fUnitprice',
|
|
|
name: '单价',
|
|
|
checked: 0,
|
|
|
width: 100,
|
|
|
onabort: '',
|
|
|
+ disabled: false,
|
|
|
changeable: 2
|
|
|
},
|
|
|
{
|
|
|
- surface: '12',
|
|
|
+ surface: '11',
|
|
|
label: 'fAmount',
|
|
|
name: '金额',
|
|
|
checked: 0,
|
|
|
width: 100,
|
|
|
onabort: '',
|
|
|
+ disabled: false,
|
|
|
changeable: 2
|
|
|
},
|
|
|
{
|
|
|
- surface: '13',
|
|
|
+ surface: '12',
|
|
|
label: 'fStltypeid',
|
|
|
name: '付费方式',
|
|
|
checked: 0,
|
|
|
width: 100,
|
|
|
onabort: '',
|
|
|
+ disabled: false,
|
|
|
changeable: 1
|
|
|
},
|
|
|
{
|
|
|
- surface: '14',
|
|
|
+ surface: '13',
|
|
|
label: 'remark',
|
|
|
name: '备注',
|
|
|
checked: 0,
|
|
|
width: 100,
|
|
|
onabort: '',
|
|
|
+ disabled: false,
|
|
|
changeable: 2
|
|
|
},
|
|
|
{
|
|
|
- surface: '15',
|
|
|
+ surface: '14',
|
|
|
label: 'createTime',
|
|
|
name: '申请日期',
|
|
|
checked: 0,
|
|
|
width: 100,
|
|
|
+ disabled: false,
|
|
|
onabort: ''
|
|
|
},
|
|
|
{
|
|
|
- surface: '16',
|
|
|
+ surface: '15',
|
|
|
label: 'createBy',
|
|
|
name: '操作员',
|
|
|
checked: 0,
|
|
|
width: 100,
|
|
|
+ disabled: false,
|
|
|
onabort: ''
|
|
|
},
|
|
|
{
|
|
|
- surface: '17',
|
|
|
+ surface: '16',
|
|
|
label: 'fReviewDate',
|
|
|
name: '审核日期',
|
|
|
checked: 0,
|
|
|
width: 100,
|
|
|
+ disabled: false,
|
|
|
onabort: ''
|
|
|
},
|
|
|
{
|
|
|
- surface: '18',
|
|
|
+ surface: '17',
|
|
|
label: 'operation',
|
|
|
name: '操作',
|
|
|
checked: 0,
|
|
|
width: 160,
|
|
|
fixed:'right',
|
|
|
operation: '2',
|
|
|
+ disabled: false,
|
|
|
onabort: ''
|
|
|
},
|
|
|
],
|
|
@@ -1022,6 +1039,7 @@ export default {
|
|
|
warehouseBills:res.data.warehouseBills,
|
|
|
tWarehousebillsfees:res.data.tWarehousebillsfees
|
|
|
}
|
|
|
+ console.log(list)
|
|
|
this.getRow(data,list,'',i)
|
|
|
})
|
|
|
// viewSingle(scope.row.fId).then(res => {
|
|
@@ -1164,6 +1182,20 @@ export default {
|
|
|
}
|
|
|
break
|
|
|
case '修改':
|
|
|
+ // this.purchaseList.columnList.forEach(item => item.disabled = false)
|
|
|
+ this.purchaseList.columnList.forEach(item => {
|
|
|
+ this.$set(item,'disabled',false)
|
|
|
+ })
|
|
|
+ console.log(this.purchaseList.columnList)
|
|
|
+ console.log(this.$refs.listComponent.queryList.columnList)
|
|
|
+ this.contentStyle.forEach(item => item.disabled = false)
|
|
|
+ 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 =>{
|
|
|
if (this.$refs.avatar.form.fBillstatus >= 4){
|
|
|
if (item.name === '返回列表' || item.name == '打印' || item.name === '修改' || item.name === '生成入库单' || item.name === '生成销售单'||item.name === '生成出库单' || item.name === '查看审批' || item.name === '审批' || item.name === '撤销采购' || item.name === '撤销审批'){
|
|
@@ -1173,15 +1205,6 @@ export default {
|
|
|
}
|
|
|
}else {
|
|
|
item.disabled = false
|
|
|
- this.purchaseList.columnList.forEach(item => item.disabled = false)
|
|
|
- this.contentStyle.forEach(item => item.disabled = false)
|
|
|
- this.contentOption.forEach(item => {
|
|
|
- if (item.label == 'personNaem' || item.label == 'corpsName' || item.label == 'createBy' || item.label == 'fBillno') {
|
|
|
- item.disabled = true
|
|
|
- } else {
|
|
|
- item.disabled = false
|
|
|
- }
|
|
|
- })
|
|
|
}
|
|
|
})
|
|
|
break
|
|
@@ -1222,47 +1245,63 @@ export default {
|
|
|
if (this.contentList.length === 0) {
|
|
|
this.$message.error("请维护明细")
|
|
|
} else {
|
|
|
- let pass = false;
|
|
|
- this.contentList.forEach(item => {
|
|
|
- if (item.fGrossweightblc === 0) {
|
|
|
- pass = true
|
|
|
- }
|
|
|
- })
|
|
|
- if (pass) {
|
|
|
- this.$message.error('当前库存数量为0,请修改调拨信息')
|
|
|
- return
|
|
|
- }
|
|
|
- for(let item in this.contentList) {
|
|
|
- let num = Number(item) + 1
|
|
|
- if (!this.contentList[item].fUnitprice) {
|
|
|
- this.$message.error("请维护第" + num + "行单价")
|
|
|
- return false
|
|
|
- }
|
|
|
- if(!this.contentList[item].fQty){
|
|
|
- this.$message.error("请维护第" + num + "数量")
|
|
|
- return false
|
|
|
- }
|
|
|
- if (!this.contentList[item].fFeeunitid) {
|
|
|
- this.$message.error("请维护第" + num + "行计量单位")
|
|
|
- return false
|
|
|
- }
|
|
|
- if (!this.contentList[item].fAmount) {
|
|
|
- this.$message.error("请维护第" + num + "行金额")
|
|
|
- return false
|
|
|
- }
|
|
|
- }
|
|
|
- // fTypeid 1确认 2撤销
|
|
|
- let data = {
|
|
|
- fId: this.$refs.avatar.form.fId,
|
|
|
- fTypeid: 1
|
|
|
+ if (!this.$refs.avatar.form.fId) {
|
|
|
+ let formData = new window.FormData()
|
|
|
+ formData.append('tWarehousebills', JSON.stringify(Object.assign({},this.$refs.avatar.form, this.formOut, this.formIn)))
|
|
|
+ formData.append('tWarehousebillsfees', JSON.stringify(this.contentList))
|
|
|
+ formData.append('fBilltype', 'DB')
|
|
|
+ submit(formData).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ console.log(res)
|
|
|
+ if(res){
|
|
|
+ this.$refs.avatar.form = res.data.warehouseBills
|
|
|
+ }
|
|
|
+ this.contentList = res.data.tWarehousebillsCntrs
|
|
|
+
|
|
|
+ let pass = false;
|
|
|
+ this.contentList.forEach(item => {
|
|
|
+ if (item.fGrossweightblc === 0) {
|
|
|
+ pass = true
|
|
|
+ }
|
|
|
+ })
|
|
|
+ if (pass) {
|
|
|
+ this.$message.error('当前库存数量为0,请修改调拨信息')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ for(let item in this.contentList) {
|
|
|
+ let num = Number(item) + 1
|
|
|
+ if (!this.contentList[item].fUnitprice) {
|
|
|
+ this.$message.error("请维护第" + num + "行单价")
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ if(!this.contentList[item].fQty){
|
|
|
+ this.$message.error("请维护第" + num + "数量")
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ if (!this.contentList[item].fFeeunitid) {
|
|
|
+ this.$message.error("请维护第" + num + "行计量单位")
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ if (!this.contentList[item].fAmount) {
|
|
|
+ this.$message.error("请维护第" + num + "行金额")
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // fTypeid 1确认 2撤销
|
|
|
+ let data = {
|
|
|
+ fId: this.$refs.avatar.form.fId,
|
|
|
+ fTypeid: 1
|
|
|
+ }
|
|
|
+ isAllocation(data).then(res => {
|
|
|
+ this.$message({
|
|
|
+ message: '调拨成功',
|
|
|
+ type: 'success',
|
|
|
+ showClose:true
|
|
|
+ });
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
- isAllocation(data).then(res => {
|
|
|
- this.$message({
|
|
|
- message: '调拨成功',
|
|
|
- type: 'success',
|
|
|
- showClose:true
|
|
|
- });
|
|
|
- })
|
|
|
}
|
|
|
break
|
|
|
case '撤销调拨':
|
|
@@ -1276,6 +1315,8 @@ export default {
|
|
|
type: 'success',
|
|
|
showClose:true
|
|
|
});
|
|
|
+ this.query();
|
|
|
+ this.pageDisplay = true;
|
|
|
})
|
|
|
break
|
|
|
case '生成入库单':
|
|
@@ -1461,7 +1502,6 @@ export default {
|
|
|
query(data) {
|
|
|
console.log(data)
|
|
|
allocationListQuery(data).then(res => {
|
|
|
- console.log('11111')
|
|
|
this.tableData = res.rows
|
|
|
this.total = res.total
|
|
|
})
|
|
@@ -1675,6 +1715,7 @@ export default {
|
|
|
},
|
|
|
//详情内容保存
|
|
|
submitAndSave(item,res) {
|
|
|
+ console.log(item,res)
|
|
|
let pass = false;
|
|
|
this.contentList.forEach(item => {
|
|
|
if (item.fGrossweightblc === 0) {
|
|
@@ -1816,7 +1857,6 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
change(scope){
|
|
|
- console.log(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){
|