著作权人信息
@@ -282,6 +306,56 @@
var viewerObj = {};
var goodsId = top.restAjax.params(window.location.href).goodsId;
+ $('#aiDescription').on('click', function() {
+ $("#goodsDescription").val("");
+ var loadLayerIndex = top.dialog.msg("AI正在思考中...", {icon: 16, time: 4000, shade: 0.3});
+ //实现化WebSocket对象,指定要连接的服务器地址与端口 建立连接
+ var Socket= new WebSocket("http://106.74.34.136:8083/center/xf-socket");
+ //打开事件
+ Socket.onopen = function() {
+ // 注册
+ var dataRegister = {"systemContent" : "", "content" : "", "userId" : goodsId};
+
+ // 发送
+ var dataContent = {"systemContent" : "软件名称叫" + $("#goodsName").val(), "content" : "帮我生成一个关于这个软件的介绍, 100字左右 , 直接回复内容, 其他的不要回复。"};
+ Socket.send(JSON.stringify(dataContent));
+ };
+ //获得消息事件
+ Socket.onmessage = function(msg) {
+ $("#goodsDescription").val($("#goodsDescription").val() + msg.data);
+ };
+ //关闭事件
+ Socket.onclose = function() {
+ };
+ //发生了错误事件
+ Socket.onerror = function() {
+ }
+ });
+
+ $('#logoImage').on('click', function() {
+ top.dialog.dialogData.uploadImage = "";
+ top.dialog.open({
+ url: 'route/goods/image?fileId='+ $('#goodsPhoto').val(),
+ title: '上传软著上架电子版',
+ width: '850px',
+ height: '500px',
+ onClose: function() {
+ var uploadImage = top.dialog.dialogData.uploadImage;
+ if(typeof(uploadImage) != 'undefined' && null != uploadImage && '' != uploadImage) {
+ $('#logoImage').attr('src', 'route/file/download/false/' + uploadImage);
+ $('#goodsPhoto').val(uploadImage);
+ $('#basicsLogoSpanDelete').show();
+ }
+ }
+ })
+ });
+
+ $('#basicsLogoSpanDelete').on('click', function() {
+ $('#goodsLocalPhoto').val("");
+ $('#logoImage').attr('src', 'assets/images/filetype/image-add.png');
+ $('#basicsLogoSpanDelete').hide();
+ });
+
$('#logoImage').on('click', function() {
});
@@ -369,7 +443,6 @@
xmSelectDom = xmSelect.render({
el: '#goodsType',
data: data,
- disabled: true,
prop: {
name: 'dataName',
value: 'dataId',
@@ -443,10 +516,18 @@
initGoodsTypeSelect(data.goodsType);
initGoodsLeaderIdcardTypeSelect(data.goodsLeaderIdcardType);
initGoodsLeaderCity1Select(data.goodsLeaderCity1, data.goodsLeaderCity2);
- new Viewer(document.getElementById("basicsLogoSpanDIV"), {
+ $("#logoImage").attr("src", "route/file/download/false/" + data.goodsPhoto);
+
+/* new Viewer(document.getElementById("basicsLogoSpanDIV"), {
url: "route/file/download/false/" + data.goodsPhoto,
fullscreen: false, // 不需要全屏
title: false, //不需要文件标题
+ });*/
+ $("#logoImage2").attr("src", "route/file/download/false/" + data.goodsLocalPhoto);
+ new Viewer(document.getElementById("basicsLogoSpanDIV2"), {
+ url: "route/file/download/false/" + data.goodsLocalPhoto,
+ fullscreen: false, // 不需要全屏
+ title: false, //不需要文件标题
});
if(data.goodsCheckStatus == "1") {
$("#subMit").removeClass("layui-disabled");
@@ -469,8 +550,7 @@
title: false,
btn: ['通过', '不通过'] //可以无限个按钮
}, function(index, layero){
-
- subCheck("2");
+ subCheck("2", "" , formData);
top.layer.close(index);
}, function(index){
top.layer.close(index);
@@ -480,7 +560,7 @@
value: '', // 输入框初始值
title: '输入不通过的原因' // 输入框标题
}, function(value, index1){
- subCheck("0", value);
+ subCheck("0", value, formData);
// 关闭输入框
top.layer.close(index1);
});
@@ -489,8 +569,30 @@
return false;
});
- function subCheck(status, remark) {
- top.restAjax.put(top.restAjax.path('api/goods/check', [goodsId]), {goodslogStatus: status, goodslogContent : remark, goodsId: goodsId}, null, function(code, data) {
+ laydate.render({
+ elem: '#goodsGetTime',
+ max: 0,
+ btns: ['clear','confirm'],
+ format: 'yyyy-MM-dd'
+ });
+
+ function subCheck(status, remark, formData) {
+ top.restAjax.put(top.restAjax.path('api/goods/check', [goodsId]), {
+ goodslogStatus: status,
+ goodslogContent : remark,
+ goodsId: goodsId,
+ goodsDescription: formData.field["goodsDescription"],
+ goodsSubName: formData.field["goodsSubName"],
+ goodsNumber: formData.field["goodsNumber"],
+ goodsVersion: formData.field["goodsVersion"],
+ goodsGetTime: formData.field["goodsGetTime"],
+ goodsDevelop: formData.field["goodsDevelop"],
+ goodsGetType: formData.field["goodsGetType"],
+ goodsLocalPhoto: formData.field["goodsLocalPhoto"],
+ goodsPhoto: formData.field["goodsPhoto"],
+ goodsType: xmSelectDom.getValue("valueStr"),
+ goodsFlag: top.restAjax.checkBoxToString(formData.field, 'goodsFlag')
+ }, null, function(code, data) {
var layerIndex = top.dialog.msg("信息审核完成.", {
time: 0,
shade: 0.3,
diff --git a/src/main/resources/templates/goods/list-system.html b/src/main/resources/templates/goods/list-system.html
index 5895694..89cfd1f 100644
--- a/src/main/resources/templates/goods/list-system.html
+++ b/src/main/resources/templates/goods/list-system.html
@@ -28,14 +28,14 @@
-
@@ -153,7 +156,7 @@
return rowData;
}
},
- {field: 'goodsName', width: 180, title: '软著名称', align:'center',
+ {field: 'goodsName', width: 280, title: '软著名称', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
@@ -162,7 +165,7 @@
return rowData;
}
},
- {field: 'goodsSubName', width: 180, title: '软著简称', align:'center',
+ /* {field: 'goodsSubName', width: 180, title: '软著简称', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
@@ -179,8 +182,8 @@
}
return rowData;
}
- },
- {field: 'goodsGetTime', width: 180, title: '软著取得时间', align:'center',
+ },*/
+ /* {field: 'goodsGetTime', width: 180, title: '软著取得时间', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
@@ -188,6 +191,21 @@
}
return rowData;
}
+ },*/
+ {field: 'goodsFlag', width: 200, title: '标签', align:'center', fixed: "right",
+ templet: function(row) {
+ var rowData = row[this.field];
+ if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
+ return '-';
+ }
+ var arr = rowData.split(",")
+ var rowData = '
';
+ for(var i = 0 ; i < arr.length ; i++) {
+ rowData += ' ';
+ }
+ rowData += '
';
+ return rowData;
+ }
},
{field: 'goodsPrice', width: 120, title: '售卖价格', align:'center', fixed: "right",
templet: function(row) {
@@ -438,7 +456,38 @@
}
});
}
- } else if(layEvent === 'downEvent') {
+ } else if(layEvent === 'teJiaEvent') {
+ if(checkDatas.length === 0) {
+ top.dialog.msg("至少选择一个软著商品");
+ } else {
+ var ids = '';
+ for(var i = 0, item; item = checkDatas[i++];) {
+ if(i > 1) {
+ ids += '_';
+ }
+ ids += item['goodsId'];
+ }
+ top.dialog.msg("确定改变这些商品的今日特价状态?", {
+ time: 0,
+ btn: [top.dataMessage.button.yes, top.dataMessage.button.no],
+ shade: 0.3,
+ yes: function (index) {
+ top.dialog.close(index);
+ var layIndex;
+ top.restAjax.put(top.restAjax.path('api/goods/update-flag/{goodsIds}', [ids]), {}, null, function (code, data) {
+ top.dialog.msg("修改完成", {time: 1000});
+ reloadTable();
+ }, function (code, data) {
+ top.dialog.msg(data.msg);
+ }, function () {
+ layIndex = top.dialog.msg("上架中...", {icon: 16, time: 0, shade: 0.3});
+ }, function () {
+ top.dialog.close(layIndex);
+ });
+ }
+ });
+ }
+ } else if(layEvent === 'downEvent') {
if(checkDatas.length === 0) {
top.dialog.msg(top.dataMessage.table.selectEdit);
} else if(checkDatas.length > 1) {
diff --git a/src/main/resources/templates/goods/list.html b/src/main/resources/templates/goods/list.html
index 73b086a..b45a797 100644
--- a/src/main/resources/templates/goods/list.html
+++ b/src/main/resources/templates/goods/list.html
@@ -28,15 +28,15 @@
-