master
parent
e6e41c6da0
commit
262bc47c2a
|
@ -1056,6 +1056,7 @@ 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);
|
||||||
}
|
}
|
||||||
|
@ -1063,6 +1064,10 @@ var table = {
|
||||||
$.modal.closeLoading();
|
$.modal.closeLoading();
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if (isDetail) {
|
||||||
|
$.modal.closeLoading();
|
||||||
|
return
|
||||||
|
}
|
||||||
$.operate.ajaxSuccess(result);
|
$.operate.ajaxSuccess(result);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -462,6 +462,9 @@
|
||||||
}
|
}
|
||||||
$('[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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -501,6 +501,8 @@
|
||||||
}
|
}
|
||||||
$('[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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -239,7 +239,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'hzSupportUser',
|
field: 'hzSupportUserName',
|
||||||
title: '汇智负责人'
|
title: '汇智负责人'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -414,15 +414,11 @@
|
||||||
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("请完善表单");
|
||||||
|
|
||||||
|
|
|
@ -436,7 +436,6 @@
|
||||||
<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> <input type="radio" name="orderCheck" onclick="changeStatus(0)"><span>是</span></div>
|
|
||||||
</div>
|
</div>
|
||||||
`,
|
`,
|
||||||
yes: function (index, layero) {
|
yes: function (index, layero) {
|
||||||
|
@ -449,11 +448,20 @@
|
||||||
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() {
|
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()) {
|
if ($.validate.form()) {
|
||||||
saveSelect()
|
saveSelect()
|
||||||
} else {
|
} else {
|
||||||
|
@ -467,6 +475,7 @@
|
||||||
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)
|
||||||
|
@ -480,15 +489,16 @@
|
||||||
$('[name="agentCode"]').val(data.agentCode);
|
$('[name="agentCode"]').val(data.agentCode);
|
||||||
changeBg()
|
changeBg()
|
||||||
$('[name="industryType"]').val(data.industryType);
|
$('[name="industryType"]').val(data.industryType);
|
||||||
initProjectList()
|
initProjectList(data)
|
||||||
|
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",
|
||||||
|
@ -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()
|
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('')
|
||||||
|
@ -975,6 +1000,27 @@ ${
|
||||||
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>
|
|
@ -409,24 +409,19 @@
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
isTable: 0,
|
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 = res.rows
|
||||||
softwareProjectProductInfoList.unshift({
|
softwareProjectProductInfoList.unshift({
|
||||||
model: '',
|
model: '',
|
||||||
productCode: ''
|
productCode: ''
|
||||||
})
|
})
|
||||||
initProjectList()
|
$.operate.post(ctx + 'system/product/list', {...data, type: '2'}, (res) => {
|
||||||
})
|
|
||||||
$.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: ''
|
||||||
})
|
})
|
||||||
initProjectList()
|
$.operate.post(ctx + 'system/product/list', {...data, type: '11,22'}, (res) => {
|
||||||
|
|
||||||
})
|
|
||||||
$.operate.post(ctx + 'system/product/list', {...data, type: '11,22'}, function (res) {
|
|
||||||
maintenanceProjectProductInfoList = res.rows
|
maintenanceProjectProductInfoList = res.rows
|
||||||
maintenanceProjectProductInfoList.unshift({
|
maintenanceProjectProductInfoList.unshift({
|
||||||
model: '',
|
model: '',
|
||||||
|
@ -434,6 +429,9 @@
|
||||||
})
|
})
|
||||||
initProjectList()
|
initProjectList()
|
||||||
});
|
});
|
||||||
|
})
|
||||||
|
});
|
||||||
|
|
||||||
([[${projectOrderInfo.contractFileList}]] || []).forEach((ele) => {
|
([[${projectOrderInfo.contractFileList}]] || []).forEach((ele) => {
|
||||||
addFile(ele)
|
addFile(ele)
|
||||||
})
|
})
|
||||||
|
@ -459,7 +457,6 @@
|
||||||
<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> <input type="radio" ${value2 == 0 ? 'checked' : ''} name="orderCheck" onclick="changeStatus(0)"><span>是</span></div>
|
|
||||||
</div>
|
</div>
|
||||||
`,
|
`,
|
||||||
yes: function (index, layero) {
|
yes: function (index, layero) {
|
||||||
|
@ -472,7 +469,15 @@
|
||||||
layer.open(options)
|
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()) {
|
if ($.validate.form()) {
|
||||||
parent.$('.layui-layer-btn').hide()
|
parent.$('.layui-layer-btn').hide()
|
||||||
saveSelect()
|
saveSelect()
|
||||||
|
@ -487,6 +492,7 @@
|
||||||
|
|
||||||
$(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",
|
||||||
|
@ -953,19 +959,22 @@ ${
|
||||||
|
|
||||||
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')
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -979,6 +988,27 @@ ${
|
||||||
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>
|
|
@ -121,10 +121,10 @@
|
||||||
field: 'createTime',
|
field: 'createTime',
|
||||||
title: '下单时间'
|
title: '下单时间'
|
||||||
},
|
},
|
||||||
// {
|
{
|
||||||
// field: 'orderStatus',
|
field: 'orderStatus',
|
||||||
// title: '订单状态'
|
title: '订单状态'
|
||||||
// },
|
},
|
||||||
{
|
{
|
||||||
field: 'dutyName',
|
field: 'dutyName',
|
||||||
title: '汇智负责人'
|
title: '汇智负责人'
|
||||||
|
|
|
@ -80,6 +80,13 @@
|
||||||
field: 'customerName',
|
field: 'customerName',
|
||||||
title: '最终客户'
|
title: '最终客户'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
field: '生成订单',
|
||||||
|
title: 'canGenerate',
|
||||||
|
formatter:(value,row)=>{
|
||||||
|
return value?`未生成`:'已生成'
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
field: 'bgProperty',
|
field: 'bgProperty',
|
||||||
title: 'BG',
|
title: 'BG',
|
||||||
|
|
Loading…
Reference in New Issue