Browse Source

Merge remote-tracking branch 'origin/master'

master
rui_li 4 years ago
parent
commit
58c13041fd
  1. 82
      src/views/modules/purchaseorder/purchaseRequisition.vue
  2. 7
      src/views/modules/shopOrder/productionReport/common/productionLineYieldReport.vue

82
src/views/modules/purchaseorder/purchaseRequisition.vue

@ -27,9 +27,6 @@
class="el-button el-button--primary el-button--medium"> class="el-button el-button--primary el-button--medium">
{{ buttons.download }} {{ buttons.download }}
</download-excel> </download-excel>
<el-button v-if="isAuth(':prd:delete')" type="danger" @click="deleteHandle()"
:disabled="dataListSelections.length <= 0">{{ buttons.deleteList }}
</el-button>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
@ -185,13 +182,11 @@
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<span slot="label" @click="getBaseList(3)"><el-link>{{'供应商编码'}}</el-link> </span> <span slot="label" @click="getBaseList(3)"><el-link>{{'供应商编码'}}</el-link> </span>
<el-input v-model="currentPRDetailData.supplierid" <el-input v-model="currentPRDetailData.supplierid"
style="width: 120px"></el-input> style="width: 120px"></el-input>
</el-form-item> </el-form-item>
<el-form-item :label="'供应商名称'"> <el-form-item :label="'供应商名称'">
<el-input class="customer-input-color-red" v-model="currentPRDetailData.suppliername" readonly <el-input class="customer-input-color-red" v-model="currentPRDetailData.suppliername" readonly
style="width: 180px"></el-input> style="width: 180px"></el-input>
@ -216,11 +211,15 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="'工具编码'"> <el-form-item :label="'工具编码'">
<span v-if="showToolIdList" slot="label" @click="getBaseList(70)"><el-link>{{'工具编码'}}</el-link> </span>
<span v-else="showToolIdList" slot="label" >{{'工具编码'}}</span>
<el-input style="text-align: left;width: 120px" <el-input style="text-align: left;width: 120px"
v-model="currentPRDetailData.partno"></el-input> v-model="currentPRDetailData.partno"></el-input>
</el-form-item> </el-form-item>
<el-form-item :label="'工具名称'"> <el-form-item :label="'工具名称'">
<el-input style="text-align: left;width: 180px" <el-input style="text-align: left;width: 180px"
:readonly="showToolIdList"
:class="showToolIdList?'customer-input-color-red':''"
v-model="currentPRDetailData.partdesc"></el-input> v-model="currentPRDetailData.partdesc"></el-input>
</el-form-item> </el-form-item>
<el-form-item :label="'预估总价'"> <el-form-item :label="'预估总价'">
@ -228,9 +227,12 @@
v-model="currentPRDetailData.totalPrice" v-model="currentPRDetailData.totalPrice"
:disabled="true"></el-input> :disabled="true"></el-input>
</el-form-item> </el-form-item>
<el-form-item v-if="addFlagShow" :label="'是否新增'">
<el-radio v-model="currentPRDetailData.addFlag" label="1"></el-radio>
<el-radio v-model="currentPRDetailData.addFlag" label="2"></el-radio>
</el-form-item>
</el-form> </el-form>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
@ -414,6 +416,7 @@
orderref1: '', orderref1: '',
orderref2: '', orderref2: '',
sysOssEntityList: [], sysOssEntityList: [],
addFlag: ''
}, },
mainQueryData: { mainQueryData: {
startDate: '', startDate: '',
@ -449,6 +452,7 @@
value1: true, value1: true,
visible: false, visible: false,
showDefault: false, showDefault: false,
addFlagShow: true,
// table // table
queryTable: { queryTable: {
functionId: this.$route.meta.menuId, functionId: this.$route.meta.menuId,
@ -921,7 +925,7 @@
dataListLoading: false, dataListLoading: false,
dataListSelections: [], dataListSelections: [],
addOrUpdateVisible: false, addOrUpdateVisible: false,
showToolIdList: false
} }
}, },
@ -932,6 +936,11 @@
this.currentPRDetailData.partno = this.currentPRDetailData.partno.toUpperCase() this.currentPRDetailData.partno = this.currentPRDetailData.partno.toUpperCase()
this.currentPRDetailData.partdesc = this.currentPRDetailData.partdesc.toUpperCase() this.currentPRDetailData.partdesc = this.currentPRDetailData.partdesc.toUpperCase()
this.currentPRDetailData.supplierid = this.currentPRDetailData.supplierid.toUpperCase() this.currentPRDetailData.supplierid = this.currentPRDetailData.supplierid.toUpperCase()
if (this.currentPRDetailData.addFlag == '1' || this.currentPRDetailData.addFlag == ''){
this.showToolIdList = false
}else {
this.showToolIdList =true
}
} }
} }
}, },
@ -982,6 +991,10 @@
this.currentPRDetailData.suppliername = val.SupplierName this.currentPRDetailData.suppliername = val.SupplierName
} }
} }
if (this.tagNo === 70 ){
this.currentPRDetailData.partno = val.ToolID
this.currentPRDetailData.partdesc = val.ToolDescription
}
}, },
// //
getBaseList(val, number) { getBaseList(val, number) {
@ -996,6 +1009,9 @@
strVal = this.currentPRDetailData.supplierid strVal = this.currentPRDetailData.supplierid
} }
} }
if (val === 70 ){
strVal = this.currentPRDetailData.partno
}
this.$refs.baseList.init(val, strVal) this.$refs.baseList.init(val, strVal)
}) })
}, },
@ -1166,6 +1182,19 @@
}); });
return return
} }
if (this.addFlagShow){
if (this.currentPRDetailData.addFlag == ''){
this.$message.warning("请选择是否新增")
this.bannersBut = false
return
}
}else {
if (this.currentPRDetailData.partdesc == ''){
this.$message.warning("请输入工名称")
this.bannersBut = false
return
}
}
let partNo = this.currentPRDetailData.partno.toUpperCase() let partNo = this.currentPRDetailData.partno.toUpperCase()
this.currentPRDetailData.partno = partNo this.currentPRDetailData.partno = partNo
// let filter = this.supplierList.filter(item => item.supplierid === this.currentPRDetailData.supplierid); // let filter = this.supplierList.filter(item => item.supplierid === this.currentPRDetailData.supplierid);
@ -1179,17 +1208,12 @@
if (data.code == 0) { if (data.code == 0) {
this.bannersFlag = false this.bannersFlag = false
this.getDataList() this.getDataList()
}
this.$alert(data.msg, '操作提示', {
confirmButtonText: '确定',
callback: action => {
if (data.code == 0) {
this.$message.success(data.msg)
this.addPRDetailFlag = false this.addPRDetailFlag = false
}else {
this.$message.warning(data.msg)
} }
this.addPRDetailFlag = false
this.bannersBut = false this.bannersBut = false
}
});
}) })
}, },
initSupplier() { initSupplier() {
@ -1232,7 +1256,10 @@
this.currentPRDetailData.taxCode = '' this.currentPRDetailData.taxCode = ''
this.currentPRDetailData.partdesc = '' this.currentPRDetailData.partdesc = ''
this.currentPRDetailData.orderref1 = '' this.currentPRDetailData.orderref1 = ''
this.currentPRDetailData.addFlag = ''
this.addFlagShow = true
} else { } else {
this.addFlagShow = false
this.currentPRDetailData.requisitionno = row.requisitionno this.currentPRDetailData.requisitionno = row.requisitionno
this.currentPRDetailData.itemno = row.itemno this.currentPRDetailData.itemno = row.itemno
this.currentPRDetailData.supplierid = row.supplierid this.currentPRDetailData.supplierid = row.supplierid
@ -1486,30 +1513,7 @@
selectionChangeHandle(val) { selectionChangeHandle(val) {
this.dataListSelections = val this.dataListSelections = val
}, },
//
deleteHandle(id) {
var ids = id ? [id] : this.dataListSelections.map(item => {
return item.id
})
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$http({
url: this.$http.adornUrl('//prd/delete'),
method: 'post',
data: this.$http.adornData(ids, false)
}).then(({data}) => {
if (data && data.code === 0) {
this.$message.success('操作成功')
this.getDataList()
} else {
this.$message.error(data.msg)
}
})
})
},
createExportData() { createExportData() {
// ,, // ,,
// TODO: // TODO:

7
src/views/modules/shopOrder/productionReport/common/productionLineYieldReport.vue

@ -166,7 +166,8 @@
downtime: 0, downtime: 0,
partNo: '', partNo: '',
enterDate: '', enterDate: '',
remark: ''
remark: '',
workCenterNo: ''
}, },
pageData: { pageData: {
site: this.$store.state.user.site, site: this.$store.state.user.site,
@ -260,10 +261,12 @@
sfdcSetupTime: 0, sfdcSetupTime: 0,
sfdcSetupDownTime: 0, sfdcSetupDownTime: 0,
sfdcProdSetupTime: 0, sfdcProdSetupTime: 0,
sfdcManufactureTime: Number(this.itemData.produceTime)+Number(this.itemData.downtime)
sfdcManufactureTime: Number(this.itemData.produceTime) + Number(this.itemData.downtime),
workCenterNo: this.itemData.workCenterNo
} }
saveYieldReport(reportDto).then(({data}) => { saveYieldReport(reportDto).then(({data}) => {
if (data.code == 0) { if (data.code == 0) {
this.visible = false
this.$message.success(data.msg) this.$message.success(data.msg)
} else { } else {
this.$message.warning(data.msg) this.$message.warning(data.msg)

Loading…
Cancel
Save