diff --git a/sgzb-ui/src/api/store/newBuy.js b/sgzb-ui/src/api/store/newBuy.js
index 72120ba1..b3045a72 100644
--- a/sgzb-ui/src/api/store/newBuy.js
+++ b/sgzb-ui/src/api/store/newBuy.js
@@ -1,5 +1,5 @@
import request from '@/utils/request'
-// 查询列表
+// 查询新购任务列表
export function listPurchaseCheckInfo(query) {
return request({
url: '/material/purchaseCheckInfo/list',
@@ -7,7 +7,7 @@ export function listPurchaseCheckInfo(query) {
params: query
})
}
-//新增任务
+//新增新购任务
export function addPurchaseCheckInfo(data) {
return request({
url: '/material/purchaseCheckInfo',
@@ -15,12 +15,20 @@ export function listPurchaseCheckInfo(query) {
data: data
})
}
-
-//任务 详情
-export function getPurchaseCheckInfo(taskId) {
+ //编辑新购任务
+ export function updatePurchaseCheckInfo(data) {
return request({
- url: '/material/purchaseCheckInfo/' + taskId,
- method: 'get'
+ url: '/material/purchaseCheckInfo',
+ method: 'put',
+ data: data
+ })
+}
+//任务 详情
+export function getPurchaseCheckInfo(query) {
+ return request({
+ url: '/material/purchaseCheckInfo/getDetails',
+ method: 'get',
+ params: query
})
}
//消息通知
@@ -83,9 +91,47 @@ export function delMacode(taskIds) {
}
-
-
-
+//新购验收-编号管理-绑定弹窗详情列表
+export function getMacodeList(query) {
+ return request({
+ url: '/material/purchaseMacode/list',
+ method: 'get',
+ params: query
+ })
+}
+
+//新购验收-编号管理-绑定弹窗详情列表
+export function getMacodeDetailList(query) {
+ return request({
+ url: '/material/purchaseMacode/getInfo',
+ method: 'get',
+ params: query
+ })
+}
+//新购验收-编号管理-生成编码
+export function makeEquipmentNumber(data) {
+ return request({
+ url: '/material/purchaseMacode/equipmentNumber',
+ method: 'post',
+ data: data
+ })
+}
+//新购验收-编号管理-保存
+export function editPurchaseMacode(data) {
+ return request({
+ url: '/material/purchaseMacode',
+ method: 'post',
+ data: data
+ })
+}
+
+// 删除
+export function delMacodeList(maCode) {
+ return request({
+ url: '/material/purchaseMacode/' + maCode,
+ method: 'delete'
+ })
+}
diff --git a/sgzb-ui/src/views/store/newBuy/newDevices/newDevicesAccept.vue b/sgzb-ui/src/views/store/newBuy/newDevices/newDevicesAccept.vue
index e5542494..fa6930c0 100644
--- a/sgzb-ui/src/views/store/newBuy/newDevices/newDevicesAccept.vue
+++ b/sgzb-ui/src/views/store/newBuy/newDevices/newDevicesAccept.vue
@@ -1,9 +1,9 @@
-
+
通知
采购验收管理
-
-
-
-
-
-
-
-
-
-
-
+
+ 批量验收
+
+
-
-
+ -->
@@ -73,8 +68,11 @@
-
-
+
+
+ {{ scope.row.checkUrlName }}
+
+
@@ -96,23 +94,12 @@
type="text"
icon="el-icon-edit"
>编码管理 -->
-
+
-
+
@@ -123,18 +110,27 @@
-
-
+
+
通过
不通过
-
-
+
+
-
+
+
+
+
+
+
+
+
+
+ 通过
+ 不通过
+
+
+
+
+
+
+
+
+
+
+
@@ -151,7 +174,7 @@
-
+
@@ -213,6 +236,9 @@
+
+
+
@@ -220,6 +246,7 @@
import { listType, getType, delType, addType, updateType, refreshCache } from "@/api/system/dict/type";
import { getPurchaseCheckInfo,bmNoticeInfo,updatePurchaseCheckDetails } from "@/api/store/newBuy";
import { getUserByRoleList } from "@/api/system/user";
+import { imgUpLoad,fileUpLoad } from "@/api/system/upload";
export default {
name: "Dict",
@@ -254,16 +281,26 @@ export default {
title: "",
// 是否显示弹出层
open: false,
+ openAll: false,
// 日期范围
dateRange: [],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
- dictName: undefined,
- dictType: undefined,
- status: undefined
+ keyWord: undefined,
},
+ //图片上传参数---
+ imageUrl:'',
+ imageName:'',
+ fileList:[],
+ field101fileList:[],
+ //上传地址
+ uploadUrl:'http://192.168.0.14:21624/system',//线上服务器地址+system
+ // uploadUrl:'http://10.40.92.140:9201',//本地测试
+ dialogImageUrl: '',
+ dialogVisible: false,
+ //--------------
// 表单参数
form: {},
// 表单校验
@@ -271,12 +308,23 @@ export default {
checkResult: [
{ required: true, message: "验收结论不能为空", trigger: "blur" }
],
- inputNum: [
+ checkNum: [
{ required: true, message: "验收通过数量不能为空", trigger: "blur" }
],
checkUrl: [
{ required: true, message: "验收图片不能为空", trigger: "blur" }
],
+ },
+ // 表单参数
+ aform: {},
+ // 表单校验
+ arules: {
+ checkResult: [
+ { required: true, message: "验收结论不能为空", trigger: "blur" }
+ ],
+ checkUrl: [
+ { required: true, message: "验收图片不能为空", trigger: "blur" }
+ ],
},
peopleOpen:false,
noticeOpen:false,
@@ -303,29 +351,17 @@ export default {
//获取任务详情-列表数据
getTaskInfo(){
this.loading = true;
- getPurchaseCheckInfo(this.taskId).then(response => {
+ getPurchaseCheckInfo({taskId:this.taskId,keyWord:this.queryParams.keyWord}).then(response => {
this.taskInfo = response.data
this.equipmentList = response.data.checkDetailsList;
this.loading = false;
})
},
-
// 返回列表页
jumpList(){
const obj = { path: "/store/newBuy/newDevicesList" }
this.$tab.closeOpenPage(obj);
},
-
- /** 查询字典类型列表 */
- getList() {
- this.loading = true;
- listType(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
- this.equipmentList = response.rows;
- this.total = response.total;
- this.loading = false;
- }
- );
- },
// 取消按钮
cancel() {
this.open = false;
@@ -347,7 +383,7 @@ export default {
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
- this.getList();
+ this.getTaskInfo();
},
/** 重置按钮操作 */
resetQuery() {
@@ -409,9 +445,9 @@ export default {
})
},
configNotice(){
- console.log(this.nform.notice,'message')
- console.log(this.taskInfo.taskId,'taskId')
- console.log(this.noticeUserList,'bmNoticeInfoList')
+ // console.log(this.nform.notice,'message')
+ // console.log(this.taskInfo.taskId,'taskId')
+ // console.log(this.noticeUserList,'bmNoticeInfoList')
this.noticeUserList.forEach((item,index)=>{
item.noticeUser = item.userId;
item.phone = item.phonenumber;
@@ -429,7 +465,7 @@ export default {
type: 'success'
})
this.noticeOpen = false
-
+ this.getTaskInfo()
}
})
@@ -437,32 +473,45 @@ export default {
},
// 多选框选中数据
handleSelectionChange(selection) {
- this.ids = selection.map(item => item.dictId)
+ this.ids = selection.map(item => item)
this.single = selection.length!=1
this.multiple = !selection.length
},
- /** 修改按钮操作 */
+ /** 验收按钮操作 */
handleCheck(row) {
- // this.reset();
- // const dictId = row.dictId || this.ids
- // getType(dictId).then(response => {
console.log(row)
let rowData = row
rowData.checkNum = rowData.purchaseNum;
+ rowData.checkResult = rowData.purchaseNum || "通过";
this.form = rowData;
this.open = true;
+ this.imageUrl = rowData.checkUrl
this.title = "验收";
- // });
+ },
+ /** 批量验收按钮操作 */
+ handleListCheck() {
+ console.log(this.ids)
+
+ this.aform = {
+ checkResult:'通过',
+ checkUrl:'',
+ checkUrlName:'',
+ };
+ this.imageUrl = ''
+ this.openAll = true;
+ this.title = "批量验收";
},
/** 提交按钮 */
submitForm: function() {
+ console.log(this.form)
+ let equipments = [this.form]
+ console.log(equipments)
this.$refs["form"].validate(valid => {
if (valid) {
- let param = [this.form]
- updatePurchaseCheckDetails(param).then(response => {
+ updatePurchaseCheckDetails(equipments).then(response => {
if(response.code == 200){
this.$message({
- message: '操作成功',
+ message: '验收成功',
type: 'success'
})
this.open = false;
@@ -472,16 +521,65 @@ export default {
}
});
},
- /** 删除按钮操作 */
- handleDelete(row) {
- const dictIds = row.dictId || this.ids;
- this.$modal.confirm('是否确认删除该数据项?').then(function() {
- return delType(dictIds);
- }).then(() => {
- this.getList();
- this.$modal.msgSuccess("删除成功");
- }).catch(() => {});
+ submitListForm: function() {
+ console.log(this.aform)
+ this.ids.forEach(item=>{
+ item.checkNum = item.purchaseNum
+ item.checkResult = this.aform.checkResult
+ item.checkUrl = this.aform.checkUrl
+ item.checkUrlName = this.aform.checkUrlName
+ })
+ console.log(this.ids)
+ let equipments = this.ids
+ console.log(equipments)
+ this.$refs["aform"].validate(valid => {
+ if (valid) {
+ updatePurchaseCheckDetails(equipments).then(response => {
+ if(response.code == 200){
+ this.$message({
+ message: '验收成功',
+ type: 'success'
+ })
+ this.openAll = false;
+ this.open = false;
+ this.getTaskInfo();
+ }
+ });
+ }
+ });
},
+ // 图片上传
+ imgUpLoad(param,name,index) {
+ console.log(param,'image')
+ param.type = 'ma'
+ imgUpLoad(param).then(res => {
+ if(res.code == 200) {
+ if(this.open){
+ this.form.checkUrl = res.data.fileUrl;
+ this.form.checkUrlName = res.data.fileName;
+ }
+ if(this.openAll){
+ this.aform.checkUrl = res.data.fileUrl;
+ this.aform.checkUrlName = res.data.fileName;
+ }
+ this.imageUrl = res.data.fileUrl;
+ this.imageName = res.data.fileName;
+ }else{
+ // this.$msgError(res.msg)
+ this.$modal.msgError(res.msg);
+ }
+ }).catch((error) => {
+ // this.$msgError(error)
+ this.$modal.msgError(error);
+ })
+ },
+ //图片查看
+ openImg(url){
+ this.dialogImageUrl = this.uploadUrl + url;
+ this.dialogVisible = true;
+ },
+
+
/** 导出按钮操作 */
handleExport() {
this.download('system/dict/type/export', {
diff --git a/sgzb-ui/src/views/store/newBuy/newDevices/newDevicesArrival.vue b/sgzb-ui/src/views/store/newBuy/newDevices/newDevicesArrival.vue
index 86c8286c..e33cfb68 100644
--- a/sgzb-ui/src/views/store/newBuy/newDevices/newDevicesArrival.vue
+++ b/sgzb-ui/src/views/store/newBuy/newDevices/newDevicesArrival.vue
@@ -2,39 +2,44 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -67,7 +72,6 @@
:key="item.userId"
:label="item.userName"
:value="item.userId"
- v-if="item.status !='1'"
>
@@ -89,7 +93,7 @@
plain
icon="el-icon-plus"
size="mini"
- @click="handleAdd"
+ @click="handleSave"
>保存
@@ -131,7 +135,7 @@
-
+
@@ -139,7 +143,7 @@
-
+
@@ -191,7 +195,7 @@