|
|
@@ -1,5 +1,6 @@
|
|
|
-function showSelectProductDialog() {
|
|
|
- var productNo = $("#productNo").val();
|
|
|
+
|
|
|
+function showSelectProductDialog(pNo) {
|
|
|
+ var productNo = pNo||$("#productNo").val();
|
|
|
if (!productNo) {
|
|
|
return;
|
|
|
}
|
|
|
@@ -8,65 +9,72 @@
|
|
|
abp.message.warn(`此产品已被弃用,只支持新产品查询使用!`);
|
|
|
return;
|
|
|
}
|
|
|
- let model = $("#Model").val();
|
|
|
- let modelNo = getNumByProductNo(productNo, 1);
|
|
|
- let material = $("#Material").val();
|
|
|
- let materialNo = getNumByProductNo(productNo, 2);
|
|
|
- let rigidity = $("#Rigidity").val();
|
|
|
- let rigidityNo = getNumByProductNo(productNo, 3);
|
|
|
- let surfaceColor = $("#SurfaceColor").val();
|
|
|
- let surfaceColorNo = getNumByProductNo(productNo, 4);
|
|
|
- tmpSearch[0].KeyWords = 's' + modelNo;
|
|
|
- if (isFirstEnter) {
|
|
|
- initQueryTable();
|
|
|
- } else {
|
|
|
- $tableProductionOrder.iwbTable('setSearchList', tmpSearch);
|
|
|
- $tableProductionOrder.iwbTable('refresh');
|
|
|
- $tableProductStore.iwbTable('setSearchList', tmpSearch);
|
|
|
- $tableProductStore.iwbTable('refresh');
|
|
|
- $tableSemiStore.iwbTable('setSearchList', tmpSearch);
|
|
|
- $tableSemiStore.iwbTable('refresh');
|
|
|
- }
|
|
|
- $('.tool-rc-group').html(
|
|
|
- `<label style=" margin-right: 10px; font-size: 1.5rem;" class="iwb-checkbox"><input name="propType" data-index="1" type="checkbox" disabled checked value="${
|
|
|
- modelNo}" /><span></span>规格:(${model})</label>
|
|
|
- <label style=" margin-right: 10px; font-size: 1.5rem;" class="iwb-checkbox"><input name="propType" data-index="2" type="checkbox" value="${
|
|
|
- materialNo}" /><span></span>材质:(${material})</label>
|
|
|
- <label style=" margin-right: 10px; font-size: 1.5rem;" class="iwb-checkbox"><input name="propType" data-index="3" type="checkbox" value="${
|
|
|
- rigidityNo}" /><span></span>硬度:(${rigidity})</label>
|
|
|
- <label style=" margin-right: 10px; font-size: 1.5rem;" class="iwb-checkbox"><input name="propType" data-index="4" type="checkbox" value="${
|
|
|
- surfaceColorNo}" /><span></span>表色:(${surfaceColor})</label >`);
|
|
|
+ SaveAjax({
|
|
|
+ url: window.appUrl + 'Common/GetNewProductInfo?productNo=' + productNo,
|
|
|
+ isValidate: false,
|
|
|
+ isAlert: false,
|
|
|
+ async: false,
|
|
|
+ success: function (res) {
|
|
|
+ if (res) {
|
|
|
+ let model = res.model;// $("#Model").val();
|
|
|
+ let modelNo = getNumByProductNo(productNo, 1);
|
|
|
+ let material = res.material;// $("#Material").val();
|
|
|
+ let materialNo = getNumByProductNo(productNo, 2);
|
|
|
+ let rigidity = res.rigidity;//$("#Rigidity").val();
|
|
|
+ let rigidityNo = getNumByProductNo(productNo, 3);
|
|
|
+ let surfaceColor = res.surfaceColor;// $("#SurfaceColor").val();
|
|
|
+ let surfaceColorNo = getNumByProductNo(productNo, 4);
|
|
|
+ tmpSearch[0].KeyWords = 's' + modelNo;
|
|
|
+ if (isFirstEnter) {
|
|
|
+ initQueryTable();
|
|
|
+ } else {
|
|
|
+ $tableProductionOrder.iwbTable('setSearchList', tmpSearch);
|
|
|
+ $tableProductionOrder.iwbTable('refresh');
|
|
|
+ $tableProductStore.iwbTable('setSearchList', tmpSearch);
|
|
|
+ $tableProductStore.iwbTable('refresh');
|
|
|
+ $tableSemiStore.iwbTable('setSearchList', tmpSearch);
|
|
|
+ $tableSemiStore.iwbTable('refresh');
|
|
|
+ }
|
|
|
+ $('.tool-rc-group').html(
|
|
|
+ `<label style=" margin-right: 10px; font-size: 1.5rem;" class="iwb-checkbox"><input name="propType" data-index="1" type="checkbox" disabled checked value="${modelNo}" /><span></span>规格:(${model})</label>
|
|
|
+ <label style=" margin-right: 10px; font-size: 1.5rem;" class="iwb-checkbox"><input name="propType" data-index="2" type="checkbox" value="${materialNo}" /><span></span>材质:(${material})</label>
|
|
|
+ <label style=" margin-right: 10px; font-size: 1.5rem;" class="iwb-checkbox"><input name="propType" data-index="3" type="checkbox" value="${rigidityNo}" /><span></span>硬度:(${rigidity})</label>
|
|
|
+ <label style=" margin-right: 10px; font-size: 1.5rem;" class="iwb-checkbox"><input name="propType" data-index="4" type="checkbox" value="${surfaceColorNo}" /><span></span>表色:(${surfaceColor})</label >`);
|
|
|
|
|
|
- $('.tool-rc-group input[name="propType"]').on('change',
|
|
|
- function(e) {
|
|
|
- let $checkbox = $(this);
|
|
|
- let flag = $checkbox.is(':checked');
|
|
|
- let $as = $('.tool-rc-group input[name="propType"]');
|
|
|
- if (flag) {
|
|
|
- $.each($as,
|
|
|
- function(i, v) {
|
|
|
- if ($(v).data('index') < $checkbox.data('index')) {
|
|
|
- $(v).prop("checked", "checked");
|
|
|
- }
|
|
|
- });
|
|
|
- } else {
|
|
|
- $.each($as,
|
|
|
- function (i, v) {
|
|
|
- if ($(v).data('index') > $checkbox.data('index')) {
|
|
|
- $(v).prop("checked", false);
|
|
|
+ $('.tool-rc-group input[name="propType"]').on('change',
|
|
|
+ function (e) {
|
|
|
+ let $checkbox = $(this);
|
|
|
+ let flag = $checkbox.is(':checked');
|
|
|
+ let $as = $('.tool-rc-group input[name="propType"]');
|
|
|
+ if (flag) {
|
|
|
+ $.each($as,
|
|
|
+ function (i, v) {
|
|
|
+ if ($(v).data('index') < $checkbox.data('index')) {
|
|
|
+ $(v).prop("checked", "checked");
|
|
|
+ }
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ $.each($as,
|
|
|
+ function (i, v) {
|
|
|
+ if ($(v).data('index') > $checkbox.data('index')) {
|
|
|
+ $(v).prop("checked", false);
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
+ searchProductInfo();
|
|
|
+ e.stopPropagation();
|
|
|
});
|
|
|
- }
|
|
|
- searchProductInfo();
|
|
|
- e.stopPropagation();
|
|
|
- });
|
|
|
|
|
|
- $("#modal_queryProductionStore").modal('show');
|
|
|
+ $("#modal_queryProductionStore").modal('show');
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
}
|
|
|
var isFirstEnter = true;
|
|
|
|
|
|
function initQueryTable() {
|
|
|
- console.log(tmpSearch)
|
|
|
+ //console.log(tmpSearch)
|
|
|
$tableProductionOrder = LoadTable1(
|
|
|
{
|
|
|
table: $("#tableProductionOrder"),
|
|
|
@@ -156,4 +164,47 @@ function getNumByProductNo(pNo, type) {
|
|
|
break;
|
|
|
}
|
|
|
return result;
|
|
|
+}
|
|
|
+
|
|
|
+function ProductionOrderStatusFormatter(v, r) {
|
|
|
+ var name = $("#hide-ProductionOrderStatus option[value='" + v + "']").text();
|
|
|
+ var str = '';
|
|
|
+ switch (v) {
|
|
|
+ case 1:
|
|
|
+ str += '<span class="label label-info">' + name + '</span>';
|
|
|
+ break;
|
|
|
+ case 2:
|
|
|
+ str += '<span class="label label-iwb">' + name + '</span>';
|
|
|
+ break;
|
|
|
+ case 3:
|
|
|
+ str += '<span class="label label-danger">' + name + '</span>';
|
|
|
+ break;
|
|
|
+ case 4:
|
|
|
+ str += '<span class="label label-success">' + name + '</span>';
|
|
|
+ if (r.isChecked) {
|
|
|
+ str += '<span class="label label-success" style="margin-left:5px"> 已检验 </span>';
|
|
|
+ } else {
|
|
|
+ str += '<span class="label label-warning" style="margin-left:5px"> 待检验 </span>';
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case 5:
|
|
|
+ str += '<span class="label label-success">' + name + '</span>';
|
|
|
+ if (r.isChecked) {
|
|
|
+ str += '<span class="label label-success" style="margin-left:5px"> 已检验 </span>';
|
|
|
+ } else {
|
|
|
+ str += '<span class="label label-warning" style="margin-left:5px"> 待检验 </span>';
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ str += '<span class="label label-warning">' + name + '</span>';
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ if (r.hasExported) {
|
|
|
+ str += '<span class="label label-success" style="margin-left:5px"> 已导出 </span>';
|
|
|
+ }
|
|
|
+ if (r.isLock == 'Y') {
|
|
|
+ str += '<span class="label label-danger" style="margin-left:5px"> 已删除 </span>';
|
|
|
+ }
|
|
|
+ return str;
|
|
|
+
|
|
|
}
|