master
parent
e6e41c6da0
commit
262bc47c2a
|
@ -1056,6 +1056,7 @@ var table = {
|
|||
$.modal.loading("正在处理中,请稍候...");
|
||||
},
|
||||
success: function (result) {
|
||||
let isDetail = window.localStorage.getItem('getDetail')
|
||||
if (typeof callback == "function") {
|
||||
callback(result);
|
||||
}
|
||||
|
@ -1063,6 +1064,10 @@ var table = {
|
|||
$.modal.closeLoading();
|
||||
return
|
||||
}
|
||||
if (isDetail) {
|
||||
$.modal.closeLoading();
|
||||
return
|
||||
}
|
||||
$.operate.ajaxSuccess(result);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -461,7 +461,10 @@
|
|||
return;
|
||||
}
|
||||
$('[name="customerCode"]').val(rows[0].customerCode);
|
||||
$(' [name="customerName"]').val(rows[0].customerName);
|
||||
$('[name="customerName"]').val(rows[0].customerName);
|
||||
$('[name="customerUserName"]').val(rows[0].contactPerson);
|
||||
$('[name="contactPhone"]').val(rows[0].contactPhone);
|
||||
|
||||
$.modal.close(index);
|
||||
}
|
||||
|
||||
|
|
|
@ -500,7 +500,9 @@
|
|||
return;
|
||||
}
|
||||
$('[name="customerCode"]').val(rows[0].customerCode);
|
||||
$(' [name="customerName"]').val(rows[0].customerName);
|
||||
$('[name="customerName"]').val(rows[0].customerName);
|
||||
$('[name="customerUserName"]').val(rows[0].contactPerson);
|
||||
$('[name="contactPhone"]').val(rows[0].contactPhone);
|
||||
$.modal.close(index);
|
||||
}
|
||||
|
||||
|
|
|
@ -239,7 +239,7 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
field: 'hzSupportUser',
|
||||
field: 'hzSupportUserName',
|
||||
title: '汇智负责人'
|
||||
},
|
||||
{
|
||||
|
@ -414,15 +414,11 @@
|
|||
full: true,
|
||||
index: 1000,
|
||||
width: 1050,
|
||||
btn: ['确定', '关闭'],
|
||||
yes: function (index, layero) {
|
||||
let body = parent.layer.getChildFrame('body', index)
|
||||
if ($(body.find('#form-order-add').get(0)).validate().form()) {
|
||||
layero.find('iframe')[0].contentWindow.saveSelect()
|
||||
// $.operate.save( ctx + "project/order/add", body.find('#form-order-add').serialize(), function (res) {
|
||||
// if (res.code == web_status.SUCCESS) {
|
||||
// parent.layer.close(index)
|
||||
// }
|
||||
// });
|
||||
}else{
|
||||
$.modal.alertWarning("请完善表单");
|
||||
|
||||
|
|
|
@ -436,7 +436,6 @@
|
|||
<div class="saveRemark">进货商已经签订框架协议</div>
|
||||
<div><input type="radio" name="saveType" onclick="changeSaveType(1)">纸质合同流程</div>
|
||||
<div class="saveRemark">进货商未签订框架协议</div>
|
||||
<div style="margin-top: 10px"><span style="margin-right: 5px;">保存草稿</span><input type="radio" name="orderCheck" checked onclick="changeStatus(1)"><span>否</span> <input type="radio" name="orderCheck" onclick="changeStatus(0)"><span>是</span></div>
|
||||
</div>
|
||||
`,
|
||||
yes: function (index, layero) {
|
||||
|
@ -449,11 +448,20 @@
|
|||
function changeSaveType(val) {
|
||||
$('[name="processType"]').val(val)
|
||||
}
|
||||
|
||||
function changeStatus(val) {
|
||||
$('[name="orderStatus"]').val(val)
|
||||
}
|
||||
|
||||
function submitHandler() {
|
||||
function submitHandler(type) {
|
||||
if (type == 'draft') {
|
||||
if (!$('[name="projectCode"]').val()) {
|
||||
$.modal.alertWarning("项目编号为必填");
|
||||
return;
|
||||
}
|
||||
$.operate.save(prefix + "/add", $('#form-order-add').serialize());
|
||||
return
|
||||
}
|
||||
if ($.validate.form()) {
|
||||
saveSelect()
|
||||
} else {
|
||||
|
@ -467,6 +475,7 @@
|
|||
return
|
||||
}
|
||||
window.localStorage.removeItem('projcetDataId')
|
||||
window.localStorage.setItem('getDetail', 1)
|
||||
$.operate.get(ctx + `sip/project/query/${id}`, function (res) {
|
||||
let data = res.data
|
||||
$('#projectNameBox').text(data.projectName)
|
||||
|
@ -480,15 +489,16 @@
|
|||
$('[name="agentCode"]').val(data.agentCode);
|
||||
changeBg()
|
||||
$('[name="industryType"]').val(data.industryType);
|
||||
initProjectList()
|
||||
initProjectList(data)
|
||||
window.localStorage.removeItem('getDetail')
|
||||
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
|
||||
$(function () {
|
||||
initProductList()
|
||||
initProjcet()
|
||||
initSaveDraft()
|
||||
$("input[name='estimatedOrderTime']").datetimepicker({
|
||||
format: "yyyy-mm-dd",
|
||||
minView: "month",
|
||||
|
@ -947,7 +957,22 @@ ${
|
|||
|
||||
}
|
||||
|
||||
function initProjectList() {
|
||||
function initProjectList(data = {}) {
|
||||
if (data.id) {
|
||||
$('#productTable tbody').html('')
|
||||
$('#productTable2 tbody').html('')
|
||||
$('#productTable3 tbody').html('')
|
||||
data.softwareProjectProductInfoList ? data.softwareProjectProductInfoList.forEach((ele) => {
|
||||
addProduct(ele)
|
||||
}) : ''
|
||||
data.hardwareProjectProductInfoList ? data.hardwareProjectProductInfoList.forEach((ele) => {
|
||||
addProduct2(ele)
|
||||
}) : ''
|
||||
data.maintenanceProjectProductInfoList ? data.maintenanceProjectProductInfoList.forEach((ele) => {
|
||||
addProduct3(ele)
|
||||
}) : ''
|
||||
return
|
||||
}
|
||||
let id = $('[name="projectId"]').val()
|
||||
$.operate.get(ctx + `sip/project/query/${id}`, function (res) {
|
||||
$('#productTable tbody').html('')
|
||||
|
@ -971,10 +996,31 @@ ${
|
|||
|
||||
function preview(filePath, fileName) {
|
||||
let iframe = window.open('', 'iframe')
|
||||
let url = ctx+prefix + `/file/download?filePath=` + encodeURI(filePath) + '&fileName=' + encodeURI(fileName)
|
||||
let url = ctx + prefix + `/file/download?filePath=` + encodeURI(filePath) + '&fileName=' + encodeURI(fileName)
|
||||
iframe.document.write(`<iframe src='${url}' style="width: 100%;height
|
||||
:100%">`)
|
||||
}
|
||||
|
||||
function initSaveDraft() {
|
||||
let draft = $(`
|
||||
<span class="saveDraft" style=" position: absolute;
|
||||
right: 160px;
|
||||
bottom: 12px;
|
||||
display: inline-block;
|
||||
background: #ff5722;
|
||||
padding: 6px 10px;
|
||||
border-radius: 5px;
|
||||
color: #fff;cursor: pointer"> 保存草稿</span>`)
|
||||
parent.$('.layui-layer-btn').before(draft)
|
||||
parent.$('.saveDraft').on('click', function () {
|
||||
$('[name="orderStatus"]').val(0)
|
||||
submitHandler('draft')
|
||||
})
|
||||
parent.$('.layui-layer-btn0').on('click', function () {
|
||||
$('[name="orderStatus"]').val(1)
|
||||
submitHandler()
|
||||
})
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -409,31 +409,29 @@
|
|||
pageNum: 1,
|
||||
isTable: 0,
|
||||
}
|
||||
$.operate.post(ctx + 'system/product/list', {...data, type: '1'}, function (res) {
|
||||
$.operate.post(ctx + 'system/product/list', {...data, type: '1'}, (res) => {
|
||||
softwareProjectProductInfoList = res.rows
|
||||
softwareProjectProductInfoList.unshift({
|
||||
model: '',
|
||||
productCode: ''
|
||||
})
|
||||
initProjectList()
|
||||
})
|
||||
$.operate.post(ctx + 'system/product/list', {...data, type: '2'}, function (res) {
|
||||
hardwareProjectProductInfoList = res.rows
|
||||
hardwareProjectProductInfoList.unshift({
|
||||
model: '',
|
||||
productCode: ''
|
||||
$.operate.post(ctx + 'system/product/list', {...data, type: '2'}, (res) => {
|
||||
hardwareProjectProductInfoList = res.rows
|
||||
hardwareProjectProductInfoList.unshift({
|
||||
model: '',
|
||||
productCode: ''
|
||||
})
|
||||
$.operate.post(ctx + 'system/product/list', {...data, type: '11,22'}, (res) => {
|
||||
maintenanceProjectProductInfoList = res.rows
|
||||
maintenanceProjectProductInfoList.unshift({
|
||||
model: '',
|
||||
productCode: ''
|
||||
})
|
||||
initProjectList()
|
||||
});
|
||||
})
|
||||
initProjectList()
|
||||
|
||||
})
|
||||
$.operate.post(ctx + 'system/product/list', {...data, type: '11,22'}, function (res) {
|
||||
maintenanceProjectProductInfoList = res.rows
|
||||
maintenanceProjectProductInfoList.unshift({
|
||||
model: '',
|
||||
productCode: ''
|
||||
})
|
||||
initProjectList()
|
||||
});
|
||||
|
||||
([[${projectOrderInfo.contractFileList}]] || []).forEach((ele) => {
|
||||
addFile(ele)
|
||||
})
|
||||
|
@ -459,7 +457,6 @@
|
|||
<div class="saveRemark">进货商已经签订框架协议</div>
|
||||
<div><input type="radio" name="saveType" ${value == 1 ? 'checked' : ''} onclick="changeSaveType(1)">纸质合同流程</div>
|
||||
<div class="saveRemark">进货商未签订框架协议</div>
|
||||
<div style="margin-top: 10px"><span style="margin-right: 5px;">保存草稿</span><input type="radio" name="orderCheck" ${value2 == 1 ? 'checked' : ''} onclick="changeStatus(1)"><span>否</span> <input type="radio" ${value2 == 0 ? 'checked' : ''} name="orderCheck" onclick="changeStatus(0)"><span>是</span></div>
|
||||
</div>
|
||||
`,
|
||||
yes: function (index, layero) {
|
||||
|
@ -472,7 +469,15 @@
|
|||
layer.open(options)
|
||||
}
|
||||
|
||||
function submitHandler() {
|
||||
function submitHandler(type) {
|
||||
if (type == 'draft') {
|
||||
if (!$('[name="projectCode"]').val()) {
|
||||
$.modal.alertWarning("项目编号为必填");
|
||||
return;
|
||||
}
|
||||
$.operate.save(prefix + "/edit", $('#form-order-edit').serialize());
|
||||
return
|
||||
}
|
||||
if ($.validate.form()) {
|
||||
parent.$('.layui-layer-btn').hide()
|
||||
saveSelect()
|
||||
|
@ -487,6 +492,7 @@
|
|||
|
||||
$(function () {
|
||||
initProductList()
|
||||
initSaveDraft()
|
||||
$("input[name='estimatedOrderTime']").datetimepicker({
|
||||
format: "yyyy-mm-dd",
|
||||
minView: "month",
|
||||
|
@ -953,19 +959,22 @@ ${
|
|||
|
||||
function initProjectList() {
|
||||
let id = $('[name="projectId"]').val()
|
||||
window.localStorage.setItem('getDetail', 1)
|
||||
$.operate.get(ctx + `sip/project/query/${id}`, function (res) {
|
||||
$('#productTable tbody').html('')
|
||||
$('#productTable2 tbody').html('')
|
||||
$('#productTable3 tbody').html('')
|
||||
res.data.softwareProjectProductInfoList ? res.data.softwareProjectProductInfoList.forEach((ele) => {
|
||||
addProduct(ele)
|
||||
}) : ''
|
||||
}) : '';
|
||||
res.data.hardwareProjectProductInfoList ? res.data.hardwareProjectProductInfoList.forEach((ele) => {
|
||||
addProduct2(ele)
|
||||
}) : ''
|
||||
}) : '';
|
||||
res.data.maintenanceProjectProductInfoList ? res.data.maintenanceProjectProductInfoList.forEach((ele) => {
|
||||
addProduct3(ele)
|
||||
}) : ''
|
||||
}) : '';
|
||||
window.localStorage.removeItem('getDetail')
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -979,6 +988,27 @@ ${
|
|||
iframe.document.write(`<iframe src='${url}' style="width: 100%;height
|
||||
:100%">`)
|
||||
}
|
||||
|
||||
function initSaveDraft() {
|
||||
let draft = $(`
|
||||
<span class="saveDraft" style=" position: absolute;
|
||||
right: 160px;
|
||||
bottom: 12px;
|
||||
display: inline-block;
|
||||
background: #ff5722;
|
||||
padding: 6px 10px;
|
||||
border-radius: 5px;
|
||||
color: #fff;cursor: pointer"> 保存草稿</span>`)
|
||||
parent.$('.layui-layer-btn').before(draft)
|
||||
parent.$('.saveDraft').on('click', function () {
|
||||
$('[name="orderStatus"]').val(0)
|
||||
submitHandler('draft')
|
||||
})
|
||||
parent.$('.layui-layer-btn0').on('click', function () {
|
||||
$('[name="orderStatus"]').val(1)
|
||||
submitHandler()
|
||||
})
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -121,10 +121,10 @@
|
|||
field: 'createTime',
|
||||
title: '下单时间'
|
||||
},
|
||||
// {
|
||||
// field: 'orderStatus',
|
||||
// title: '订单状态'
|
||||
// },
|
||||
{
|
||||
field: 'orderStatus',
|
||||
title: '订单状态'
|
||||
},
|
||||
{
|
||||
field: 'dutyName',
|
||||
title: '汇智负责人'
|
||||
|
|
|
@ -80,6 +80,13 @@
|
|||
field: 'customerName',
|
||||
title: '最终客户'
|
||||
},
|
||||
{
|
||||
field: '生成订单',
|
||||
title: 'canGenerate',
|
||||
formatter:(value,row)=>{
|
||||
return value?`未生成`:'已生成'
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'bgProperty',
|
||||
title: 'BG',
|
||||
|
|
Loading…
Reference in New Issue