diff --git a/src/views/modules/purchaseorder/purchaseRequisition.vue b/src/views/modules/purchaseorder/purchaseRequisition.vue
index 9d04bb3..97b19e0 100644
--- a/src/views/modules/purchaseorder/purchaseRequisition.vue
+++ b/src/views/modules/purchaseorder/purchaseRequisition.vue
@@ -27,9 +27,6 @@
class="el-button el-button--primary el-button--medium">
{{ buttons.download }}
- {{ buttons.deleteList }}
-
@@ -176,7 +173,7 @@
-
+
-
{{'供应商编码'}}
-
-
+
@@ -216,11 +211,15 @@
+ {{'工具编码'}}
+ {{'工具编码'}}
@@ -228,9 +227,12 @@
v-model="currentPRDetailData.totalPrice"
:disabled="true">
+
+ 是
+ 否
+
-
@@ -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 @@
}
}
-