|
@@ -845,6 +845,12 @@
|
|
|
}
|
|
|
|
|
|
}
|
|
|
+ else if(res.data.code != 200){
|
|
|
+ uni.showModal({
|
|
|
+ content:res.data.message,
|
|
|
+ showCancel:false
|
|
|
+ })
|
|
|
+ }
|
|
|
})
|
|
|
console.log(this.gridList)
|
|
|
this.gridListInit = this.gridList
|
|
@@ -1626,9 +1632,280 @@
|
|
|
'acquisitionQuality.initial')) {
|
|
|
text = "确定提交钎样信息?"
|
|
|
this.gridList.brazer = 1
|
|
|
+ uni.showModal({
|
|
|
+ content: text,
|
|
|
+ showCancel: true,
|
|
|
+ confirmText: '提交',
|
|
|
+ success: function(res) {
|
|
|
+ if (res.confirm) {
|
|
|
+ that.gridList.serviceManagementType = that.typevalue
|
|
|
+ if (that.typevalue == 3) {
|
|
|
+ that.$api.doRequest('get', '/paymentManagement/cumulant', {
|
|
|
+ compId: uni.getStorageSync('pcUserInfo').compId,
|
|
|
+ customerNumberCard: that.gridList.customerNumberCard,
|
|
|
+ goodsName: that.gridList.goodsName,
|
|
|
+ })
|
|
|
+ .then(response => {
|
|
|
+ if (response.data.code == 200) {
|
|
|
+ for (let i = 0; i < that.purchasePriceList.length; i++) {
|
|
|
+ if (
|
|
|
+ that.gridList.goodsName == that.purchasePriceList[i]
|
|
|
+ .goodsName
|
|
|
+ ) {
|
|
|
+ let count = (that.purchasePriceList[i].saleLimit -
|
|
|
+ response.data.data / 1000).toFixed(2)
|
|
|
+ console.log(count, that.purchasePriceList[i].saleLimit,
|
|
|
+ response.data.data)
|
|
|
+
|
|
|
+ if (Number(count) <= 0) {
|
|
|
+ count = 0
|
|
|
+ that.$api.msg('该客户累计销售' + that.gridList.goodsName +
|
|
|
+ (
|
|
|
+ response.data.data / 1000).toFixed(2) +
|
|
|
+ '吨,还可售粮' +
|
|
|
+ count + '吨', )
|
|
|
+
|
|
|
+ } else {
|
|
|
+ that.gridList.inOutFlag = 2
|
|
|
+ that.$api.doRequest('post',
|
|
|
+ '/warehouseInOutInfo/InOutWarehouse',
|
|
|
+ that.gridList)
|
|
|
+ .then(res => {
|
|
|
+ if (that.utils.getCurrectRoles(
|
|
|
+ 'acquisitionQuality.qview')) {
|
|
|
+ if (!that.utils.getCurrectRoles(
|
|
|
+ 'acquisitionQuality.initial'
|
|
|
+ )) {
|
|
|
+ that.gridList.statusFlag = 7
|
|
|
+ } else {
|
|
|
+ that.gridList.statusFlag = 0
|
|
|
+ }
|
|
|
+ }
|
|
|
+ that.gridList.warehouseInOutId = res
|
|
|
+ .data.data
|
|
|
+ that.$api.doRequest('post',
|
|
|
+ '/qualityInspectionManagement/api/addQualityInspection',
|
|
|
+ that.gridList)
|
|
|
+ .then(res => {
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ that.$api.msg('提交成功')
|
|
|
+ that.gridList
|
|
|
+ .warehouseId = that
|
|
|
+ .cangid
|
|
|
+ that.gridList.compId =
|
|
|
+ uni.getStorageSync(
|
|
|
+ 'pcUserInfo')
|
|
|
+ .compId
|
|
|
+ uni.setStorageSync(
|
|
|
+ "quality_print",
|
|
|
+ that.gridList)
|
|
|
+ if (that.utils
|
|
|
+ .getCurrectRoles(
|
|
|
+ 'acquisitionQuality.initial'
|
|
|
+ )) {
|
|
|
+ that.isShowPrint =
|
|
|
+ true
|
|
|
+ } else {
|
|
|
+ uni.navigateBack({})
|
|
|
+ }
|
|
|
+
|
|
|
+ console.log(
|
|
|
+ 'that.gridList',
|
|
|
+ that.gridList)
|
|
|
+ // uni.navigateBack({})
|
|
|
+ } else {
|
|
|
+ that.$api.msg('提交失败')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+
|
|
|
+ that.gridList.inOutFlag = 2
|
|
|
+ that.$api.doRequest('post',
|
|
|
+ '/warehouseInOutInfo/InOutWarehouse',
|
|
|
+ that.gridList)
|
|
|
+ .then(res => {
|
|
|
+
|
|
|
+ that.gridList.warehouseInOutId = res.data.data
|
|
|
+ that.$api.doRequest('post',
|
|
|
+ '/qualityInspectionManagement/api/addQualityInspection',
|
|
|
+ that.gridList)
|
|
|
+ .then(res => {
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ that.$api.msg('提交成功')
|
|
|
+ that.gridList.warehouseId = that.cangid
|
|
|
+ that.gridList.compId = uni.getStorageSync(
|
|
|
+ 'pcUserInfo').compId
|
|
|
+ uni.setStorageSync("quality_print", that.gridList)
|
|
|
+ if (that.utils.getCurrectRoles(
|
|
|
+ 'acquisitionQuality.initial')) {
|
|
|
+ that.isShowPrint = true
|
|
|
+ } else {
|
|
|
+ uni.navigateBack({})
|
|
|
+ }
|
|
|
+
|
|
|
+ console.log('that.gridList', that.gridList)
|
|
|
+ // uni.navigateBack({})
|
|
|
+ } else {
|
|
|
+ that.$api.msg('提交失败')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
} else {
|
|
|
text = "确定提交质检信息?"
|
|
|
this.gridList.brazer = 0
|
|
|
+ this.$api.doRequest('get', '/qualityInspectionManagement/api/goodsName', {
|
|
|
+ warehouseId: this.cangid
|
|
|
+ }).then(res => {
|
|
|
+ if(res.data.code != 200 && that.typevalue == 3){
|
|
|
+ uni.showModal({
|
|
|
+ content:res.data.message,
|
|
|
+ showCancel:false
|
|
|
+ })
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ uni.showModal({
|
|
|
+ content: text,
|
|
|
+ showCancel: true,
|
|
|
+ confirmText: '提交',
|
|
|
+ success: function(res) {
|
|
|
+ if (res.confirm) {
|
|
|
+ that.gridList.serviceManagementType = that.typevalue
|
|
|
+ if (that.typevalue == 3) {
|
|
|
+ that.$api.doRequest('get', '/paymentManagement/cumulant', {
|
|
|
+ compId: uni.getStorageSync('pcUserInfo').compId,
|
|
|
+ customerNumberCard: that.gridList.customerNumberCard,
|
|
|
+ goodsName: that.gridList.goodsName,
|
|
|
+ })
|
|
|
+ .then(response => {
|
|
|
+ if (response.data.code == 200) {
|
|
|
+ for (let i = 0; i < that.purchasePriceList.length; i++) {
|
|
|
+ if (
|
|
|
+ that.gridList.goodsName == that.purchasePriceList[i]
|
|
|
+ .goodsName
|
|
|
+ ) {
|
|
|
+ let count = (that.purchasePriceList[i].saleLimit -
|
|
|
+ response.data.data / 1000).toFixed(2)
|
|
|
+ console.log(count, that.purchasePriceList[i].saleLimit,
|
|
|
+ response.data.data)
|
|
|
+
|
|
|
+ if (Number(count) <= 0) {
|
|
|
+ count = 0
|
|
|
+ that.$api.msg('该客户累计销售' + that.gridList.goodsName +
|
|
|
+ (
|
|
|
+ response.data.data / 1000).toFixed(2) +
|
|
|
+ '吨,还可售粮' +
|
|
|
+ count + '吨', )
|
|
|
+
|
|
|
+ } else {
|
|
|
+ that.gridList.inOutFlag = 2
|
|
|
+ that.$api.doRequest('post',
|
|
|
+ '/warehouseInOutInfo/InOutWarehouse',
|
|
|
+ that.gridList)
|
|
|
+ .then(res => {
|
|
|
+ if (that.utils.getCurrectRoles(
|
|
|
+ 'acquisitionQuality.qview')) {
|
|
|
+ if (!that.utils.getCurrectRoles(
|
|
|
+ 'acquisitionQuality.initial'
|
|
|
+ )) {
|
|
|
+ that.gridList.statusFlag = 7
|
|
|
+ } else {
|
|
|
+ that.gridList.statusFlag = 0
|
|
|
+ }
|
|
|
+ }
|
|
|
+ that.gridList.warehouseInOutId = res
|
|
|
+ .data.data
|
|
|
+ that.$api.doRequest('post',
|
|
|
+ '/qualityInspectionManagement/api/addQualityInspection',
|
|
|
+ that.gridList)
|
|
|
+ .then(res => {
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ that.$api.msg('提交成功')
|
|
|
+ that.gridList
|
|
|
+ .warehouseId = that
|
|
|
+ .cangid
|
|
|
+ that.gridList.compId =
|
|
|
+ uni.getStorageSync(
|
|
|
+ 'pcUserInfo')
|
|
|
+ .compId
|
|
|
+ uni.setStorageSync(
|
|
|
+ "quality_print",
|
|
|
+ that.gridList)
|
|
|
+ if (that.utils
|
|
|
+ .getCurrectRoles(
|
|
|
+ 'acquisitionQuality.initial'
|
|
|
+ )) {
|
|
|
+ that.isShowPrint =
|
|
|
+ true
|
|
|
+ } else {
|
|
|
+ uni.navigateBack({})
|
|
|
+ }
|
|
|
+
|
|
|
+ console.log(
|
|
|
+ 'that.gridList',
|
|
|
+ that.gridList)
|
|
|
+ // uni.navigateBack({})
|
|
|
+ } else {
|
|
|
+ that.$api.msg('提交失败')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+
|
|
|
+ that.gridList.inOutFlag = 2
|
|
|
+ that.$api.doRequest('post',
|
|
|
+ '/warehouseInOutInfo/InOutWarehouse',
|
|
|
+ that.gridList)
|
|
|
+ .then(res => {
|
|
|
+
|
|
|
+ that.gridList.warehouseInOutId = res.data.data
|
|
|
+ that.$api.doRequest('post',
|
|
|
+ '/qualityInspectionManagement/api/addQualityInspection',
|
|
|
+ that.gridList)
|
|
|
+ .then(res => {
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ that.$api.msg('提交成功')
|
|
|
+ that.gridList.warehouseId = that.cangid
|
|
|
+ that.gridList.compId = uni.getStorageSync(
|
|
|
+ 'pcUserInfo').compId
|
|
|
+ uni.setStorageSync("quality_print", that.gridList)
|
|
|
+ if (that.utils.getCurrectRoles(
|
|
|
+ 'acquisitionQuality.initial')) {
|
|
|
+ that.isShowPrint = true
|
|
|
+ } else {
|
|
|
+ uni.navigateBack({})
|
|
|
+ }
|
|
|
+
|
|
|
+ console.log('that.gridList', that.gridList)
|
|
|
+ // uni.navigateBack({})
|
|
|
+ } else {
|
|
|
+ that.$api.msg('提交失败')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
// if (!this.gridList.storageTagNo) {
|
|
@@ -1652,135 +1929,135 @@
|
|
|
// return
|
|
|
// }
|
|
|
|
|
|
- uni.showModal({
|
|
|
- content: text,
|
|
|
- showCancel: true,
|
|
|
- confirmText: '提交',
|
|
|
- success: function(res) {
|
|
|
- if (res.confirm) {
|
|
|
- that.gridList.serviceManagementType = that.typevalue
|
|
|
- if (that.typevalue == 3) {
|
|
|
- that.$api.doRequest('get', '/paymentManagement/cumulant', {
|
|
|
- compId: uni.getStorageSync('pcUserInfo').compId,
|
|
|
- customerNumberCard: that.gridList.customerNumberCard,
|
|
|
- goodsName: that.gridList.goodsName,
|
|
|
- })
|
|
|
- .then(response => {
|
|
|
- if (response.data.code == 200) {
|
|
|
- for (let i = 0; i < that.purchasePriceList.length; i++) {
|
|
|
- if (
|
|
|
- that.gridList.goodsName == that.purchasePriceList[i]
|
|
|
- .goodsName
|
|
|
- ) {
|
|
|
- let count = (that.purchasePriceList[i].saleLimit -
|
|
|
- response.data.data / 1000).toFixed(2)
|
|
|
- console.log(count, that.purchasePriceList[i].saleLimit,
|
|
|
- response.data.data)
|
|
|
+ // uni.showModal({
|
|
|
+ // content: text,
|
|
|
+ // showCancel: true,
|
|
|
+ // confirmText: '提交',
|
|
|
+ // success: function(res) {
|
|
|
+ // if (res.confirm) {
|
|
|
+ // that.gridList.serviceManagementType = that.typevalue
|
|
|
+ // if (that.typevalue == 3) {
|
|
|
+ // that.$api.doRequest('get', '/paymentManagement/cumulant', {
|
|
|
+ // compId: uni.getStorageSync('pcUserInfo').compId,
|
|
|
+ // customerNumberCard: that.gridList.customerNumberCard,
|
|
|
+ // goodsName: that.gridList.goodsName,
|
|
|
+ // })
|
|
|
+ // .then(response => {
|
|
|
+ // if (response.data.code == 200) {
|
|
|
+ // for (let i = 0; i < that.purchasePriceList.length; i++) {
|
|
|
+ // if (
|
|
|
+ // that.gridList.goodsName == that.purchasePriceList[i]
|
|
|
+ // .goodsName
|
|
|
+ // ) {
|
|
|
+ // let count = (that.purchasePriceList[i].saleLimit -
|
|
|
+ // response.data.data / 1000).toFixed(2)
|
|
|
+ // console.log(count, that.purchasePriceList[i].saleLimit,
|
|
|
+ // response.data.data)
|
|
|
|
|
|
- if (Number(count) <= 0) {
|
|
|
- count = 0
|
|
|
- that.$api.msg('该客户累计销售' + that.gridList.goodsName +
|
|
|
- (
|
|
|
- response.data.data / 1000).toFixed(2) +
|
|
|
- '吨,还可售粮' +
|
|
|
- count + '吨', )
|
|
|
+ // if (Number(count) <= 0) {
|
|
|
+ // count = 0
|
|
|
+ // that.$api.msg('该客户累计销售' + that.gridList.goodsName +
|
|
|
+ // (
|
|
|
+ // response.data.data / 1000).toFixed(2) +
|
|
|
+ // '吨,还可售粮' +
|
|
|
+ // count + '吨', )
|
|
|
|
|
|
- } else {
|
|
|
- that.gridList.inOutFlag = 2
|
|
|
- that.$api.doRequest('post',
|
|
|
- '/warehouseInOutInfo/InOutWarehouse',
|
|
|
- that.gridList)
|
|
|
- .then(res => {
|
|
|
- if (that.utils.getCurrectRoles(
|
|
|
- 'acquisitionQuality.qview')) {
|
|
|
- if (!that.utils.getCurrectRoles(
|
|
|
- 'acquisitionQuality.initial'
|
|
|
- )) {
|
|
|
- that.gridList.statusFlag = 7
|
|
|
- } else {
|
|
|
- that.gridList.statusFlag = 0
|
|
|
- }
|
|
|
- }
|
|
|
- that.gridList.warehouseInOutId = res
|
|
|
- .data.data
|
|
|
- that.$api.doRequest('post',
|
|
|
- '/qualityInspectionManagement/api/addQualityInspection',
|
|
|
- that.gridList)
|
|
|
- .then(res => {
|
|
|
- if (res.data.code == 200) {
|
|
|
- that.$api.msg('提交成功')
|
|
|
- that.gridList
|
|
|
- .warehouseId = that
|
|
|
- .cangid
|
|
|
- that.gridList.compId =
|
|
|
- uni.getStorageSync(
|
|
|
- 'pcUserInfo')
|
|
|
- .compId
|
|
|
- uni.setStorageSync(
|
|
|
- "quality_print",
|
|
|
- that.gridList)
|
|
|
- if (that.utils
|
|
|
- .getCurrectRoles(
|
|
|
- 'acquisitionQuality.initial'
|
|
|
- )) {
|
|
|
- that.isShowPrint =
|
|
|
- true
|
|
|
- } else {
|
|
|
- uni.navigateBack({})
|
|
|
- }
|
|
|
+ // } else {
|
|
|
+ // that.gridList.inOutFlag = 2
|
|
|
+ // that.$api.doRequest('post',
|
|
|
+ // '/warehouseInOutInfo/InOutWarehouse',
|
|
|
+ // that.gridList)
|
|
|
+ // .then(res => {
|
|
|
+ // if (that.utils.getCurrectRoles(
|
|
|
+ // 'acquisitionQuality.qview')) {
|
|
|
+ // if (!that.utils.getCurrectRoles(
|
|
|
+ // 'acquisitionQuality.initial'
|
|
|
+ // )) {
|
|
|
+ // that.gridList.statusFlag = 7
|
|
|
+ // } else {
|
|
|
+ // that.gridList.statusFlag = 0
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // that.gridList.warehouseInOutId = res
|
|
|
+ // .data.data
|
|
|
+ // that.$api.doRequest('post',
|
|
|
+ // '/qualityInspectionManagement/api/addQualityInspection',
|
|
|
+ // that.gridList)
|
|
|
+ // .then(res => {
|
|
|
+ // if (res.data.code == 200) {
|
|
|
+ // that.$api.msg('提交成功')
|
|
|
+ // that.gridList
|
|
|
+ // .warehouseId = that
|
|
|
+ // .cangid
|
|
|
+ // that.gridList.compId =
|
|
|
+ // uni.getStorageSync(
|
|
|
+ // 'pcUserInfo')
|
|
|
+ // .compId
|
|
|
+ // uni.setStorageSync(
|
|
|
+ // "quality_print",
|
|
|
+ // that.gridList)
|
|
|
+ // if (that.utils
|
|
|
+ // .getCurrectRoles(
|
|
|
+ // 'acquisitionQuality.initial'
|
|
|
+ // )) {
|
|
|
+ // that.isShowPrint =
|
|
|
+ // true
|
|
|
+ // } else {
|
|
|
+ // uni.navigateBack({})
|
|
|
+ // }
|
|
|
|
|
|
- console.log(
|
|
|
- 'that.gridList',
|
|
|
- that.gridList)
|
|
|
- // uni.navigateBack({})
|
|
|
- } else {
|
|
|
- that.$api.msg('提交失败')
|
|
|
- }
|
|
|
- })
|
|
|
- })
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- })
|
|
|
- } else {
|
|
|
+ // console.log(
|
|
|
+ // 'that.gridList',
|
|
|
+ // that.gridList)
|
|
|
+ // // uni.navigateBack({})
|
|
|
+ // } else {
|
|
|
+ // that.$api.msg('提交失败')
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // } else {
|
|
|
|
|
|
- that.gridList.inOutFlag = 2
|
|
|
- that.$api.doRequest('post',
|
|
|
- '/warehouseInOutInfo/InOutWarehouse',
|
|
|
- that.gridList)
|
|
|
- .then(res => {
|
|
|
+ // that.gridList.inOutFlag = 2
|
|
|
+ // that.$api.doRequest('post',
|
|
|
+ // '/warehouseInOutInfo/InOutWarehouse',
|
|
|
+ // that.gridList)
|
|
|
+ // .then(res => {
|
|
|
|
|
|
- that.gridList.warehouseInOutId = res.data.data
|
|
|
- that.$api.doRequest('post',
|
|
|
- '/qualityInspectionManagement/api/addQualityInspection',
|
|
|
- that.gridList)
|
|
|
- .then(res => {
|
|
|
- if (res.data.code == 200) {
|
|
|
- that.$api.msg('提交成功')
|
|
|
- that.gridList.warehouseId = that.cangid
|
|
|
- that.gridList.compId = uni.getStorageSync(
|
|
|
- 'pcUserInfo').compId
|
|
|
- uni.setStorageSync("quality_print", that.gridList)
|
|
|
- if (that.utils.getCurrectRoles(
|
|
|
- 'acquisitionQuality.initial')) {
|
|
|
- that.isShowPrint = true
|
|
|
- } else {
|
|
|
- uni.navigateBack({})
|
|
|
- }
|
|
|
+ // that.gridList.warehouseInOutId = res.data.data
|
|
|
+ // that.$api.doRequest('post',
|
|
|
+ // '/qualityInspectionManagement/api/addQualityInspection',
|
|
|
+ // that.gridList)
|
|
|
+ // .then(res => {
|
|
|
+ // if (res.data.code == 200) {
|
|
|
+ // that.$api.msg('提交成功')
|
|
|
+ // that.gridList.warehouseId = that.cangid
|
|
|
+ // that.gridList.compId = uni.getStorageSync(
|
|
|
+ // 'pcUserInfo').compId
|
|
|
+ // uni.setStorageSync("quality_print", that.gridList)
|
|
|
+ // if (that.utils.getCurrectRoles(
|
|
|
+ // 'acquisitionQuality.initial')) {
|
|
|
+ // that.isShowPrint = true
|
|
|
+ // } else {
|
|
|
+ // uni.navigateBack({})
|
|
|
+ // }
|
|
|
|
|
|
- console.log('that.gridList', that.gridList)
|
|
|
- // uni.navigateBack({})
|
|
|
- } else {
|
|
|
- that.$api.msg('提交失败')
|
|
|
- }
|
|
|
- })
|
|
|
- })
|
|
|
- }
|
|
|
+ // console.log('that.gridList', that.gridList)
|
|
|
+ // // uni.navigateBack({})
|
|
|
+ // } else {
|
|
|
+ // that.$api.msg('提交失败')
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // })
|
|
|
+ // }
|
|
|
|
|
|
- }
|
|
|
- }
|
|
|
- })
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // })
|
|
|
},
|
|
|
gradepicker(e) {
|
|
|
console.log(e)
|