Browse Source

Merge remote-tracking branch 'origin/master'

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

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

@ -27,9 +27,6 @@
class="el-button el-button--primary el-button--medium">
{{ buttons.download }}
</download-excel>
<el-button v-if="isAuth(':prd:delete')" type="danger" @click="deleteHandle()"
:disabled="dataListSelections.length <= 0">{{ buttons.deleteList }}
</el-button>
</el-col>
</el-row>
<el-row>
@ -176,7 +173,7 @@
<el-col :span="24">
<el-form class="sxm" :inline="true" label-position="top">
<el-form-item :label="inputSearch5">
<el-select v-model="currentPRDetailData.orderType" filterable style="width: 120px">
<el-select v-model="currentPRDetailData.orderType" filterable style="width: 120px">
<el-option
v-for="(item,index) in auditTypeList"
:key="index"
@ -185,14 +182,12 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<span slot="label" @click="getBaseList(3)"><el-link>{{'供应商编码'}}</el-link> </span>
<el-input v-model="currentPRDetailData.supplierid"
style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'供应商名称'">
<el-form-item :label="'供应商名称'">
<el-input class="customer-input-color-red" v-model="currentPRDetailData.suppliername" readonly
style="width: 180px"></el-input>
</el-form-item>
@ -216,11 +211,15 @@
</el-select>
</el-form-item>
<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"
v-model="currentPRDetailData.partno"></el-input>
</el-form-item>
<el-form-item :label="'工具名称'">
<el-input style="text-align: left;width: 180px"
:readonly="showToolIdList"
:class="showToolIdList?'customer-input-color-red':''"
v-model="currentPRDetailData.partdesc"></el-input>
</el-form-item>
<el-form-item :label="'预估总价'">
@ -228,9 +227,12 @@
v-model="currentPRDetailData.totalPrice"
:disabled="true"></el-input>
</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-col>
</el-row>
<el-row>
<el-col :span="24">
@ -414,6 +416,7 @@
orderref1: '',
orderref2: '',
sysOssEntityList: [],
addFlag: ''
},
mainQueryData: {
startDate: '',
@ -449,6 +452,7 @@
value1: true,
visible: false,
showDefault: false,
addFlagShow: true,
// table
queryTable: {
functionId: this.$route.meta.menuId,
@ -921,19 +925,24 @@
dataListLoading: false,
dataListSelections: [],
addOrUpdateVisible: false,
showToolIdList: false
}
},
watch:{
watch: {
currentPRDetailData: {
deep: true,
handler: function (newV, oldV) {
this.currentPRDetailData.partno = this.currentPRDetailData.partno .toUpperCase()
this.currentPRDetailData.partdesc = this.currentPRDetailData.partdesc.toUpperCase()
this.currentPRDetailData.supplierid = this.currentPRDetailData.supplierid.toUpperCase()
deep: true,
handler: function (newV, oldV) {
this.currentPRDetailData.partno = this.currentPRDetailData.partno.toUpperCase()
this.currentPRDetailData.partdesc = this.currentPRDetailData.partdesc.toUpperCase()
this.currentPRDetailData.supplierid = this.currentPRDetailData.supplierid.toUpperCase()
if (this.currentPRDetailData.addFlag == '1' || this.currentPRDetailData.addFlag == ''){
this.showToolIdList = false
}else {
this.showToolIdList =true
}
}
}
},
mounted() {
this.$nextTick(() => {
@ -975,27 +984,34 @@
},
getBaseData(val) {
if (this.tagNo === 3) {
if (this.number == 1){
this.mainQueryData.supplierid = val.SupplierID
}else {
if (this.number == 1) {
this.mainQueryData.supplierid = val.SupplierID
} else {
this.currentPRDetailData.supplierid = val.SupplierID
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) {
this.number = number
this.tagNo = val
this.$nextTick(() => {
let strVal = "";
if (val === 3) {
if (number == 1){
if (number == 1) {
strVal = this.mainQueryData.supplierid
}else {
} else {
strVal = this.currentPRDetailData.supplierid
}
}
if (val === 70 ){
strVal = this.currentPRDetailData.partno
}
this.$refs.baseList.init(val, strVal)
})
},
@ -1081,7 +1097,7 @@
if (data.code == 0) {
this.$message.success(data.msg)
this.getDataList()
}else {
} else {
this.$message.warning(data.msg)
}
})
@ -1166,6 +1182,19 @@
});
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()
this.currentPRDetailData.partno = partNo
// let filter = this.supplierList.filter(item => item.supplierid === this.currentPRDetailData.supplierid);
@ -1179,17 +1208,12 @@
if (data.code == 0) {
this.bannersFlag = false
this.getDataList()
this.$message.success(data.msg)
this.addPRDetailFlag = false
}else {
this.$message.warning(data.msg)
}
this.$alert(data.msg, '操作提示', {
confirmButtonText: '确定',
callback: action => {
if (data.code == 0) {
this.addPRDetailFlag = false
}
this.addPRDetailFlag = false
this.bannersBut = false
}
});
this.bannersBut = false
})
},
initSupplier() {
@ -1232,7 +1256,10 @@
this.currentPRDetailData.taxCode = ''
this.currentPRDetailData.partdesc = ''
this.currentPRDetailData.orderref1 = ''
this.currentPRDetailData.addFlag = ''
this.addFlagShow = true
} else {
this.addFlagShow = false
this.currentPRDetailData.requisitionno = row.requisitionno
this.currentPRDetailData.itemno = row.itemno
this.currentPRDetailData.supplierid = row.supplierid
@ -1486,30 +1513,7 @@
selectionChangeHandle(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() {
// ,,
// TODO:
@ -1550,7 +1554,7 @@
}
}
</script>
<style scoped lang="scss">
<style scoped lang="scss">
.sl-svg {

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

@ -166,7 +166,8 @@
downtime: 0,
partNo: '',
enterDate: '',
remark: ''
remark: '',
workCenterNo: ''
},
pageData: {
site: this.$store.state.user.site,
@ -260,10 +261,12 @@
sfdcSetupTime: 0,
sfdcSetupDownTime: 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}) => {
if (data.code == 0) {
this.visible = false
this.$message.success(data.msg)
} else {
this.$message.warning(data.msg)

Loading…
Cancel
Save