Compare commits

..

No commits in common. "aa64b56bfa4a77444513e76b5f6032d009a8feec" and "5a5a134b220e7452f260b89fec011b1937061c48" have entirely different histories.

8 changed files with 42 additions and 131 deletions

View File

@ -1056,7 +1056,6 @@ var table = {
$.modal.loading("正在处理中,请稍候..."); $.modal.loading("正在处理中,请稍候...");
}, },
success: function (result) { success: function (result) {
let isDetail = window.localStorage.getItem('getDetail')
if (typeof callback == "function") { if (typeof callback == "function") {
callback(result); callback(result);
} }
@ -1064,10 +1063,6 @@ var table = {
$.modal.closeLoading(); $.modal.closeLoading();
return return
} }
if (isDetail) {
$.modal.closeLoading();
return
}
$.operate.ajaxSuccess(result); $.operate.ajaxSuccess(result);
} }
}; };

View File

@ -462,9 +462,6 @@
} }
$('[name="customerCode"]').val(rows[0].customerCode); $('[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); $.modal.close(index);
} }

View File

@ -501,8 +501,6 @@
} }
$('[name="customerCode"]').val(rows[0].customerCode); $('[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); $.modal.close(index);
} }

View File

@ -239,7 +239,7 @@
} }
}, },
{ {
field: 'hzSupportUserName', field: 'hzSupportUser',
title: '汇智负责人' title: '汇智负责人'
}, },
{ {
@ -414,11 +414,15 @@
full: true, full: true,
index: 1000, index: 1000,
width: 1050, width: 1050,
btn: ['确定', '关闭'],
yes: function (index, layero) { yes: function (index, layero) {
let body = parent.layer.getChildFrame('body', index) let body = parent.layer.getChildFrame('body', index)
if ($(body.find('#form-order-add').get(0)).validate().form()) { if ($(body.find('#form-order-add').get(0)).validate().form()) {
layero.find('iframe')[0].contentWindow.saveSelect() 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{ }else{
$.modal.alertWarning("请完善表单"); $.modal.alertWarning("请完善表单");

View File

@ -436,6 +436,7 @@
<div class="saveRemark">进货商已经签订框架协议</div> <div class="saveRemark">进货商已经签订框架协议</div>
<div><input type="radio" name="saveType" onclick="changeSaveType(1)">纸质合同流程</div> <div><input type="radio" name="saveType" onclick="changeSaveType(1)">纸质合同流程</div>
<div class="saveRemark">进货商未签订框架协议</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>&nbsp;&nbsp;<input type="radio" name="orderCheck" onclick="changeStatus(0)"><span></span></div>
</div> </div>
`, `,
yes: function (index, layero) { yes: function (index, layero) {
@ -448,20 +449,11 @@
function changeSaveType(val) { function changeSaveType(val) {
$('[name="processType"]').val(val) $('[name="processType"]').val(val)
} }
function changeStatus(val) { function changeStatus(val) {
$('[name="orderStatus"]').val(val) $('[name="orderStatus"]').val(val)
} }
function submitHandler(type) { function submitHandler() {
if (type == 'draft') {
if (!$('[name="projectCode"]').val()) {
$.modal.alertWarning("项目编号为必填");
return;
}
$.operate.save(prefix + "/add", $('#form-order-add').serialize());
return
}
if ($.validate.form()) { if ($.validate.form()) {
saveSelect() saveSelect()
} else { } else {
@ -475,7 +467,6 @@
return return
} }
window.localStorage.removeItem('projcetDataId') window.localStorage.removeItem('projcetDataId')
window.localStorage.setItem('getDetail', 1)
$.operate.get(ctx + `sip/project/query/${id}`, function (res) { $.operate.get(ctx + `sip/project/query/${id}`, function (res) {
let data = res.data let data = res.data
$('#projectNameBox').text(data.projectName) $('#projectNameBox').text(data.projectName)
@ -489,16 +480,15 @@
$('[name="agentCode"]').val(data.agentCode); $('[name="agentCode"]').val(data.agentCode);
changeBg() changeBg()
$('[name="industryType"]').val(data.industryType); $('[name="industryType"]').val(data.industryType);
initProjectList(data) initProjectList()
window.localStorage.removeItem('getDetail')
}) })
} }
$(function () { $(function () {
initProductList() initProductList()
initProjcet() initProjcet()
initSaveDraft()
$("input[name='estimatedOrderTime']").datetimepicker({ $("input[name='estimatedOrderTime']").datetimepicker({
format: "yyyy-mm-dd", format: "yyyy-mm-dd",
minView: "month", minView: "month",
@ -957,22 +947,7 @@ ${
} }
function initProjectList(data = {}) { function initProjectList() {
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() let id = $('[name="projectId"]').val()
$.operate.get(ctx + `sip/project/query/${id}`, function (res) { $.operate.get(ctx + `sip/project/query/${id}`, function (res) {
$('#productTable tbody').html('') $('#productTable tbody').html('')
@ -1000,27 +975,6 @@ ${
iframe.document.write(`<iframe src='${url}' style="width: 100%;height iframe.document.write(`<iframe src='${url}' style="width: 100%;height
:100%">`) :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> </script>
</body> </body>
</html> </html>

View File

@ -409,19 +409,24 @@
pageNum: 1, pageNum: 1,
isTable: 0, isTable: 0,
} }
$.operate.post(ctx + 'system/product/list', {...data, type: '1'}, (res) => { $.operate.post(ctx + 'system/product/list', {...data, type: '1'}, function (res) {
softwareProjectProductInfoList = res.rows softwareProjectProductInfoList = res.rows
softwareProjectProductInfoList.unshift({ softwareProjectProductInfoList.unshift({
model: '', model: '',
productCode: '' productCode: ''
}) })
$.operate.post(ctx + 'system/product/list', {...data, type: '2'}, (res) => { initProjectList()
})
$.operate.post(ctx + 'system/product/list', {...data, type: '2'}, function (res) {
hardwareProjectProductInfoList = res.rows hardwareProjectProductInfoList = res.rows
hardwareProjectProductInfoList.unshift({ hardwareProjectProductInfoList.unshift({
model: '', model: '',
productCode: '' productCode: ''
}) })
$.operate.post(ctx + 'system/product/list', {...data, type: '11,22'}, (res) => { initProjectList()
})
$.operate.post(ctx + 'system/product/list', {...data, type: '11,22'}, function (res) {
maintenanceProjectProductInfoList = res.rows maintenanceProjectProductInfoList = res.rows
maintenanceProjectProductInfoList.unshift({ maintenanceProjectProductInfoList.unshift({
model: '', model: '',
@ -429,9 +434,6 @@
}) })
initProjectList() initProjectList()
}); });
})
});
([[${projectOrderInfo.contractFileList}]] || []).forEach((ele) => { ([[${projectOrderInfo.contractFileList}]] || []).forEach((ele) => {
addFile(ele) addFile(ele)
}) })
@ -457,6 +459,7 @@
<div class="saveRemark">进货商已经签订框架协议</div> <div class="saveRemark">进货商已经签订框架协议</div>
<div><input type="radio" name="saveType" ${value == 1 ? 'checked' : ''} onclick="changeSaveType(1)">纸质合同流程</div> <div><input type="radio" name="saveType" ${value == 1 ? 'checked' : ''} onclick="changeSaveType(1)">纸质合同流程</div>
<div class="saveRemark">进货商未签订框架协议</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>&nbsp;&nbsp;<input type="radio" ${value2 == 0 ? 'checked' : ''} name="orderCheck" onclick="changeStatus(0)"><span></span></div>
</div> </div>
`, `,
yes: function (index, layero) { yes: function (index, layero) {
@ -469,15 +472,7 @@
layer.open(options) layer.open(options)
} }
function submitHandler(type) { function submitHandler() {
if (type == 'draft') {
if (!$('[name="projectCode"]').val()) {
$.modal.alertWarning("项目编号为必填");
return;
}
$.operate.save(prefix + "/edit", $('#form-order-edit').serialize());
return
}
if ($.validate.form()) { if ($.validate.form()) {
parent.$('.layui-layer-btn').hide() parent.$('.layui-layer-btn').hide()
saveSelect() saveSelect()
@ -492,7 +487,6 @@
$(function () { $(function () {
initProductList() initProductList()
initSaveDraft()
$("input[name='estimatedOrderTime']").datetimepicker({ $("input[name='estimatedOrderTime']").datetimepicker({
format: "yyyy-mm-dd", format: "yyyy-mm-dd",
minView: "month", minView: "month",
@ -959,22 +953,19 @@ ${
function initProjectList() { function initProjectList() {
let id = $('[name="projectId"]').val() let id = $('[name="projectId"]').val()
window.localStorage.setItem('getDetail', 1)
$.operate.get(ctx + `sip/project/query/${id}`, function (res) { $.operate.get(ctx + `sip/project/query/${id}`, function (res) {
$('#productTable tbody').html('') $('#productTable tbody').html('')
$('#productTable2 tbody').html('') $('#productTable2 tbody').html('')
$('#productTable3 tbody').html('') $('#productTable3 tbody').html('')
res.data.softwareProjectProductInfoList ? res.data.softwareProjectProductInfoList.forEach((ele) => { res.data.softwareProjectProductInfoList ? res.data.softwareProjectProductInfoList.forEach((ele) => {
addProduct(ele) addProduct(ele)
}) : ''; }) : ''
res.data.hardwareProjectProductInfoList ? res.data.hardwareProjectProductInfoList.forEach((ele) => { res.data.hardwareProjectProductInfoList ? res.data.hardwareProjectProductInfoList.forEach((ele) => {
addProduct2(ele) addProduct2(ele)
}) : ''; }) : ''
res.data.maintenanceProjectProductInfoList ? res.data.maintenanceProjectProductInfoList.forEach((ele) => { res.data.maintenanceProjectProductInfoList ? res.data.maintenanceProjectProductInfoList.forEach((ele) => {
addProduct3(ele) addProduct3(ele)
}) : ''; }) : ''
window.localStorage.removeItem('getDetail')
}) })
} }
@ -988,27 +979,6 @@ ${
iframe.document.write(`<iframe src='${url}' style="width: 100%;height iframe.document.write(`<iframe src='${url}' style="width: 100%;height
:100%">`) :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> </script>
</body> </body>
</html> </html>

View File

@ -121,10 +121,10 @@
field: 'createTime', field: 'createTime',
title: '下单时间' title: '下单时间'
}, },
{ // {
field: 'orderStatus', // field: 'orderStatus',
title: '订单状态' // title: '订单状态'
}, // },
{ {
field: 'dutyName', field: 'dutyName',
title: '汇智负责人' title: '汇智负责人'

View File

@ -80,13 +80,6 @@
field: 'customerName', field: 'customerName',
title: '最终客户' title: '最终客户'
}, },
{
field: '生成订单',
title: 'canGenerate',
formatter:(value,row)=>{
return value?`未生成`:'已生成'
}
},
{ {
field: 'bgProperty', field: 'bgProperty',
title: 'BG', title: 'BG',